Sound.sequence:play freezes Playdate (white light) and Mac Simulator crashes

My Playtime clocks app is crashing the Simulator (1.13.4) entirely with no error message. Meanwhile, the device crashes with...

Run loop stalled for more than 10 seconds
  pc=0×080BFA80 1г=0×080B1BC5

G

... and then the LED lights up white.

Commenting out my playdate.sound.sequence:play line prevents the crash—which doesn't happen immediately on playing a sound, but does after playing multiple times. (The number of sounds that play before it crashes varies weirdly: the app lasts longer when scrolling my gridview by dpad instead of crank, for instance!)

Also, FWIW, the suggested :clearNotes() workaround for this memory leak is not working. The leak remains—however the crash does not happen due to memory totally filling: there is still plenty to spare.

Any troubleshooting advice? I'm trying to get a bugfix out (and a Catalog build) but the audio that seemed to work before is causing new problems, maybe with recent OS/SDK releases?

TIA!

The symptom looks to be the same as this one: Crash: Track:setInstrument() while a note is playing (missing Lua Wrapper), though I'm not 100% sure yet that it's the same underlying bug. I don't have a fix for that yet but I'll take a look today. (The leak fix is currently scheduled for 1.14.1, ftr.)

1 Like

It does sound likely to be related maybe. Let me know if you'd like a copy of my project (which seems to crash more easily than the released Playtime, maybe due to working around other audio issues).

I tried adding playdate.sound.sequence:stop before my playdate.sound.sequence:play in case that might help, but it doesn't. I don't see a clear workaround in that other thread that I can apply.

I'm thinking I should maybe pause development of Playtime for a bit, pending more details or a fix. I've considered removing the existing version from Itch—but it seems OK if you avoid cranking too much on the gallery screen, and the alarm seems to play fine (except with the "Surprise" clock).

OS 1.13.7 fixed this crash/freeze. Awesome!

1 Like