Repository navigation
Conversation
TryRefreshTree runs from a 750 ms timer, which also fires inside any other code that enters the event loop; its update and update idletasks then processed user events (e.g. clicks on the menubar) in the middle of that code. EndCreatePreprocessTBar ended with an update while GiD goes from postprocess to preprocess (EndGIDPostProcess event). Neither needs it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Two procs called a full
update:spdAux::TryRefreshTree(scripts/spdAuxiliar.tcl) callsupdateandupdate idletasks, and reschedules itself every 750 ms withafter 750while a model is open. A timer callback also runs inside any other code that enters the event loop, so thisupdateprocessed user events (clicks on the menubar, other timers) in the middle of that code. The proc already runs from a timer, so the pending events have been processed before it starts.Kratos::EndCreatePreprocessTBar(scripts/Menus.tcl) ended withupdate. It runs fromKratos::Event_EndGIDPostProcess, while GiD goes from postprocess to preprocess and rebuilds its menus.ReleaseToolbar,destroyandunsetdo not need it.How we found it: GiD crashed when the menubar was clicked while going back from postprocess to preprocess with a Fluid 2D model (the cylinder-in-flow example, after animating the pressure). The click was processed inside these nested
updatecalls. The crash itself was a Tk bug, reported as tk/a680524fb0, and GiD now also defers its menu rebuild, but theseupdatecalls are what let user events in during the switch.The design of the tree refresh is unchanged: the
refreshTreeTurnflag is set byspdAux::RequestRefreshand checked every 750 ms.Tested with GiD 18.3 (developer version) on Windows, on the cylinder-in-flow example, going to postprocess, animating and back to preprocess:
updateduring the switch.spdAux::RequestRefreshthe tree is refreshed in the next 750 ms period (refreshTreeTurnback to 0).🤖 Generated with Claude Code