Random crashes on Lua project (device only)

Hello fellow developers !

We've been closing our very first fully-fledged playdate game with my brother, and we've been eager to submit it to Panic :playdate:
However, we've been getting random crashes on the device every now and then :playdate_dead: We have no idea why those occur...
The game is made in Lua by the way !

I'll paste right here the two last errors in the crashlog (since I can't upload a text file in this thread) :

--- crash at 2025/02/25 17:25:00---
build:57176cb0-2.6.2-release.177516-buildbot
r0:00000000 r1:00000000 r2:00000000 r3: 00000000
r12:0000001a lr:24050dc9 pc:24050dd2 psr: 090f002c
cfsr:00000000 hfsr:40000000 mmfar:00000000 bfar: 00000000
rcccsr:00000000
heap allocated: 14887264
Lua totalbytes=129097305 GCdebt=-127574036 GCestimate=1508209 stacksize=84

--- crash at 2025/02/25 20:12:36---
build:57176cb0-2.6.2-release.177516-buildbot
r0:00000000 r1:00000000 r2:00000000 r3: 00000000
r12:00000016 lr:24050dc9 pc:24050dd2 psr: 090f002c
cfsr:00000000 hfsr:40000000 mmfar:00000000 bfar: 00000000
rcccsr:00000000
heap allocated: 11114304
Lua totalbytes=129177620 GCdebt=-127574120 GCestimate=1548509 stacksize=84

We talked to a fellow developer named stratchminer on Discord who kindly interpreted the crashlog for us ! You can see some screenshots of his interpretation here :



We were told (on Discord still) that some other dev had this issue in the past, and been given this screenshot :

We don't have a lot of knowledge when it comes to crashlog reading or RAM errors or stuff like that... And the only thing refraining us from submitting the game is this crash issue.

If anyone has any information on this, we would be very grateful as we are very thrilled to present the game to everyone :playdate_happy:

Thank you !