Fix button-spamming hang when rapidly launching scripts - #881
Open
danielsheh02 wants to merge 1 commit into
Open
Fix button-spamming hang when rapidly launching scripts#881danielsheh02 wants to merge 1 commit into
danielsheh02 wants to merge 1 commit into
Conversation
1) TrikScriptRunner::abort() now blocks on a QEventLoop until the completed signal arrives before launching the next script — eliminates the mAbortInProgress deadlock caused by re-entrant abort calls. 2) Separated resetBrick() from abort() in JS/Python runners — brick reset is now deferred until after the script has fully stopped, preventing races between hardware reset and the new script starting. 3) Added PendingRun mechanism: run requests that arrive while abort is in progress are queued and started automatically once abort completes. 4) 4) Fixed QML stack corruption when a new script starts before the previous RunningCodeComponent is popped; deferred abortScript() call to avoid destroying QML components from within their own signal handlers. 5) Also fixed TonePlayer::stop() crash (snd_pcm_drain ALSA assertion) when stopping already-stopped audio output.
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.
TrikScriptRunner::abort() now blocks on a QEventLoop until the completed signal arrives before launching the next script — eliminates the mAbortInProgress deadlock caused by re-entrant abort calls.
Separated resetBrick() from abort() in JS/Python runners — brick reset is now deferred until after the script has fully stopped, preventing races between hardware reset and the new script starting.
Added PendingRun mechanism: run requests that arrive while abort is in progress are queued and started automatically once abort completes.
Also fixed TonePlayer::stop() crash (snd_pcm_drain ALSA assertion) when stopping already-stopped audio output.