New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error at the end of a remapped m6 #217
Comments
I don't really understand remap and/or stdglue.py but I have a feeling that INTERP_EXECUTE_FINISH is intended to cause a "synch" after a tool change, ie make sure that the readeahed queue is emptied and recalculated with new tool data. I don't think we are seeing the line where the actual error occurs in any of the messages. But I could be wrong. |
If I undertand correctly the error is related to the re execution of the epilog. When a python epilog returns
The next call to Signed-off-by: John Morris john@zultron.com |
@dhweizel Thanks for reporting this. I'm going to have a little trouble finding time to look at this before January, but I'll try. I'm very sorry you must have had to look at this extremely hairy part of the codebase! |
@zultron Thanks for your quick response. I wish to add that Andy found that the error shows more easy if you just just open sim/remap/rack The code IS very complex but the variety of different log functions amazed me |
@dhwiezel, the error turns out to be in Thanks again for the hard work you did to track down and report this problem. That made it a lot easier to reproduce and fix. |
Good news !!! |
The functionality to return `INTERP_EXECUTE_FINISH` in a python remap function has always existed, but was broken until PR LinuxCNC#135. The fix revealed a bug in the standard remap `change_epilog()` function, which was not written as a python generator function. Thanks to @dhwiezel for discovering and reporting this bug. Fixes LinuxCNC#217. Signed-off-by: John Morris john@zultron.com
I just changed to master. The machine uses a m6 remap copied of the vismach sample and works ok on 2.7 and now , on master, raises an error at the end of the tool change.
emc/task/emctask.cc 397: interp_error: exception during generator call: TypeError: 'NoneType' object is not callable
exception during generator call: TypeError: 'NoneType' object is not callable
Interpreter stack: - int Interp::pycall(setup_pointer, context_pointer, const char*, const char*, in - int Interp::execute_return(setup_pointer, context_pointer, int) - int Interp::convert_control_functions(block_pointer, setup_pointer) - int Interp::_execute(const char*)
emcTaskPlanExecute((null)) returned 5
There is the same error in the vismach sample : Here are the steps I follow to reproduce the issue:
the ini file says:
REMAP=M6 modalgroup=6 prolog=change_prolog ngc=toolchange epilog=change_epilog
There is no error if I delete epilog=change_epilog
The error apears to be related to change_epilog of stdglue.py
in the line 198 : return INTERP_EXECUTE_FINISH
if I change to : return INTERP_OK it works as expected
I don't know the implications of the change but I found this return vaue used in another stdglue.py file in the master (gmoccapy)
edit: typo
The text was updated successfully, but these errors were encountered: