david-pfx / PuzzleScriptNext

A direct successor to PuzzleScript, building on the work of PuzzleScript Plus, Pattern:Script and others.
http://www.puzzlescriptnext.polyomino.com
MIT License
13 stars 6 forks source link

Malformed sfx triggers uncaught "TypeError" in browser console #101

Closed angilbert closed 1 month ago

angilbert commented 1 month ago

Reproduction Steps

  1. Launch https://david-pfx.github.io/PuzzleScriptNext/src/editor.html
  2. Open browser console
  3. Add any non-numeric character to the end of an sfx line (e.g. ';' or 'q')
  4. click on the line to hear the sfx
  5. An uncaught "TypeError" is observed in console
  6. Further edits of the same line are now difficult (back out the change using CTRL-Z)

What did you expect would happen? No crash - editor stays responsive

OS & Browser version, desktop/mobile MAC/Desktop/Chrome (also observed with FireFox)

Screenshots, example projects, other relevant issues, etc.

Screenshot 2024-09-07 at 11 53 03
angilbert commented 1 month ago

Looks to be a regression issue on dev-release. Stable release is fine.

david-pfx commented 1 month ago

Thanks! The real bug is that it doesn't detect the error. Fixed.