I was reading the PICO-8 manual and playing around in the command line with the print
functionality for sounds such as:
PRINT "\ACE-G" -- MINOR TRIAD |
However if you were to type in double (or more) flats/sharps:
PRINT "\ACE--G" PRINT "\AC##EG" |
Then PICO-8 immediately closes without warning by SIGTRAP:
Process: pico8 [58630] Path: /Applications/PICO-8.app/Contents/MacOS/pico8 Identifier: com.lexaloffle.pico8 Version: 0.2.7 (0.2.7) Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2025-08-20 17:32:53.0360 -0500 OS Version: macOS 15.6 (24G84) Report Version: 12 Anonymous UUID: 01217DBF-B08E-382C-E758-048216A400FA Sleep/Wake UUID: E01F0963-2650-4FED-9FB1-A9EF074A1277 Time Awake Since Boot: 1000000 seconds Time Since Wake: 11683 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x0000000100dc5928 Termination Reason: Namespace SIGNAL, Code 5 Trace/BPT trap: 5 Terminating Process: exc handler [58630] Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 pico8 0x100dc5928 get_pitch_for_char + 104 1 pico8 0x100dc5174 pico8_print_char + 3444 2 pico8 0x100dc6030 pico8_print_text + 948 3 pico8 0x100db1260 p8_print + 776 4 pico8 0x100d6ed38 luaD_precall + 1260 5 pico8 0x100d6f230 luaV_execute + 448 6 pico8 0x100d5b910 luaD_rawrunprotected + 84 7 pico8 0x100d73524 lua_resume + 88 8 pico8 0x100d9b078 run_slice_section + 640 9 pico8 0x100d9b2e0 run_slice + 124 10 pico8 0x100d553cc codo_main_update + 2936 11 pico8 0x100df8f70 codo_main + 404 12 dyld 0x19ba66b98 start + 6076 |
I don't know if PICO-8 necessarily needs double sharps or flats, but having the app suddenly close was confusing. Could also be hard to debug if code accidentally had a double sharp/flat written in a print statement (although I'm not sure printing sounds is used often in practice)



The same SIGTRAP also occurs when adding a flat/sharp to an empty note:
print "\ac.-" |
In this situation it seems PICO could ignore flats/sharps on empty notes, or write a warning/error message



@ nicole-antonia I wonder if this is specific to the macOS version. On my Linux laptop, no crash occurs in any of the same scenarios that cause yours.
[Please log in to post a comment]