Device crash for C/Nim based game

As alluded to in File open crashes on device C API - #11 by dave, we actually do have symbols for (some) the Playdate firmware, located in the symbols.db file that's included with the SDK, but I never could find the memory addresses from my crash logs in the file. It just now occurred to me to convert the hexadecimal addresses from the logs into decimal (tool) to match the ones in the database, and sure enough, I can see the file name corresponding to the pc and lr values in your crash log.
Your pc and lr values are 2405cca8 and 2405d17d, which are 604359848 and 604361085 in decimal. If I search for those numbers in the lines table, it tells me that the pc value was found in file_id 166 (at line 3496). The lr value isn't found, but the surrounding addresses are in the same file. If I search for that file id in the files table, it tells me that file is /Core/dlmalloc.c. It's worth noting that while I wasn't able to find those addresses in the functions table, I could find addresses within a couple hundred of yours.
Hopefully this is somewhat helpful.

2 Likes