Skip to content

Fix button-spamming hang when rapidly launching scripts - #881

Open
danielsheh02 wants to merge 1 commit into
trikset:masterfrom
danielsheh02:fix-scripts-button-spamming
Open

Fix button-spamming hang when rapidly launching scripts#881
danielsheh02 wants to merge 1 commit into
trikset:masterfrom
danielsheh02:fix-scripts-button-spamming

Conversation

@danielsheh02

Copy link
Copy Markdown
Contributor
  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.

    1. 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.
  4. Also fixed TonePlayer::stop() crash (snd_pcm_drain ALSA assertion) when stopping already-stopped audio output.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant