-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Description
Rapidly clicking the Run (red) button multiple times eventually causes a runtime error and crashes execution.
The application throws:
Uncaught TypeError: Cannot read properties of undefined (reading 'unhighlight')
at Blocks.unhighlight (blocks.js:2974)
at logo.js:1725
This appears to be caused by overlapping executions without proper highlight state cleanup when the Run button is spam-clicked quickly.
The application should not crash due to rapid user interaction.
Expected Behavior
The Run button should either:
Ignore clicks while execution is already in progress
Debounce rapid clicks
Or safely handle concurrent executions without breaking highlight state
Under no circumstances should rapid clicking result in a runtime error.
Steps to Reproduce
Start Music Blocks locally.
Add:
start
one note
one pitch block
Rapidly click the Run (red) button multiple times.
Observe the runtime error in the browser console.
Environment
macOS
Node v18.20.8
npm v10.8.2
Latest master branch
Checklist
I have read and followed the project's code of conduct.
I have searched for similar issues before creating this one.
I have provided all the necessary information to understand and reproduce the issue.
I am willing to contribute to the resolution of this issue.