While working on my Lua game I started getting a crash pretty consistently (but always at different times) after upgrading to SDK 2.0. This only seems to happen when testing the game on device, and not in the simulator (which I mostly run on MacOS).
Looking at some of the crash reports (which I've also sent via Settings -> System -> Send Crash Report), and referencing this post by @dave it would appear, if I understand correctly, that the crash happens in firmware code, for example:
Is there anything else I can do to understand more about what could be causing this and debug, given the language I'm using here is Lua rather than C? Or is there anything else that stands out from those crash dumps that I may not be deciphering correctly?
Alternatively, am I able to get the prior firmware 1.13.7 from anywhere, to double check if this is an issue with 2.0 or something I'm causing somehow?
Hi, quick question about this issue, I was wondering if there was any more info logged on the system crash screen? Can you press B to see more info about the call stack?
Unfortunately it doesn't look like it I should've mentioned that this generally shows up as an Error e0 so only offers the option to press A to reboot and the Error e0 URL. Hence my puzzlement at the moment as to what might be causing it
I was hoping to get some pointers to narrow it down to a more easily reproducible case before sharing code. However I'm almost done putting together a demo build for this game, which Panic was going to receive anyway, perhaps that could work when it's ready?
@wade I'm not using the fileplayer API, as far as audio is concerned I'm using sampleplayer, channels, and instruments with synths and samples. I was having simulator crashes that looked related to channel:removeSource(), which I thought I may have been causing, so I tried removing all calls to both addSource and removeSource to narrow it down and, while that seemed to work around the simulator crashes, it left this console crash exposed. But now I'm wondering if audio may indeed be the pattern that connects all of these.
@pasha thanks, I was hoping to rollback the OS on the Playdate from 2.0 to 1.13.7 for testing (recovery firmware looks to be 1.11.x), but the SDK packages don't include a firmware image, unless I missed it?
@wildbat You're right, I can't find the old firmware either, sorry for misleading.
I'm nottt convinced it actually is the audio. Judging by where the crash occurs in my debug logs, it might be input querying or ui.crankIndicator. Unfortunately my device seems to stop crashing the minute I add new print flags for debugging. I'll investigate more when the crashes start up again.
Never mind, it doesn't seem to have to do with ui.crankIndicator nor anything else in my pd.update loop. I tried removing each block inside my pd.update code one at a time, and it didn't make a difference, the crash occurred regardless.
@wade Could you interpret either of our crash logs for us? Or follow up with any other updates?