hal_glib: defer file-loaded when the interp is already running - #4399
Merged
Conversation
GSTAT only emits 'file-loaded' if the poll that first sees stat.file change finds the interp IDLE. A client doing program_open + AUTO_RUN back to back starts the program within ms, so every 100 ms poll sees the file with the interp busy, the remap guard swallows the change, and the signal is never emitted: gmoccapy sits at 'No Program loaded' with an empty editor and preview after an externally driven run, and whether it does depends on poll timing. Emit a skipped change on the first poll with the interp back at IDLE. Remap protection unchanged: merge() ignores the file name at call level != 0.
grandixximo
marked this pull request as ready for review
August 17, 2026 23:21
Contributor
Author
|
This is to make the UI smoke test more consistent, but also a bug fix, the GUI should not show 'No Program loaded' while a program is loaded and running. |
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.
GSTAT only emits 'file-loaded' if the poll that first sees stat.file change finds the interp IDLE; the guard exists to skip reloads when the "new file" is a remap procedure. A client doing program_open + AUTO_RUN back to back starts the program within a few ms, so every ~100 ms poll sees the new file with the interp busy, the change is swallowed, and the signal never fires: gmoccapy sits at "No Program loaded" with an empty editor and preview after an externally driven run. Seen in the ui-smoke CI screenshots (#4136), where it flip-flopped with runner timing.
Fix: emit a skipped change on the first poll with the interp back at IDLE. Remap protection unchanged (merge() ignores the file name at call level != 0). qtvcp inherits via Status(GStat). Verified locally: gmoccapy shows the program after a run that previously left it empty.