task: unblock tool-change abort by setting io.status=DONE#4031
Open
grandixximo wants to merge 1 commit into
Open
task: unblock tool-change abort by setting io.status=DONE#4031grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
After commit 764655e moved IO handling from the out-of-process iocontrol into Task, EMC_TOOL_ABORT no longer flips emcioStatus.status back to RCS_DONE. The old NML dispatcher set RCS_DONE by default for every command; the new in-process emcIoAbort cleared the tool_change and tool_prepare pins but left status stuck at RCS_EXEC from the prior emcToolLoad/emcToolPrepare call. emctaskmain's MDI, auto and state-restore paths gate on io.status == RCS_DONE, so an abort received while tool-change was pending wedged the UI and prevented further MDI or program runs. Closes LinuxCNC#3675
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3675 (2.10 regression: aborting during a tool-change wedges the UI; MDI and further auto runs are dead until restart).
After 764655e moved IO handling from the out-of-process
iocontrolintoTask,EMC_TOOL_ABORTno longer flipsemcioStatus.statusback toRCS_DONE. The old NML dispatcher inioControl.ccsetRCS_DONEby default for every command before the switch; the new in-processTask::emcIoAbortclears thetool_change/tool_preparepins but leaves status stuck atRCS_EXECfrom the prioremcToolLoad/emcToolPrepare.emctaskmain's MDI, auto and state-restore paths gate onio.status == RCS_DONE, so abort while tool-change is pending wedges everything.One-line fix: set
emcioStatus.status = RCS_STATUS::DONEat the end ofTask::emcIoAbort, restoring the old default.@rene-dev, sorry for stepping on this one. Bisect from #3675 pointed at 764655e so I had a clear lead and went ahead. Happy to defer if you'd prefer to take it.
Test plan
M6 T1 G43/M6 T2 G43,iocontrol.0.tool-changedunlinked,linuxcnc.command().abort()whiletool-change=1): UI sluggish/unresponsive, MDI dead.