In the case of simulator freeze, the console log is inaccessible

Version: 1.10.0
Platform: Arch Linux

Brief version: The console log should be accessible from somewhere other than the simulator app itself. Perhaps logged to a file? When the app freezes, so does the console, making error reporting difficult. Perhaps also it should detect an SDK mismatch?

My full situation below:

I downloaded SDK 1.10.0, but forgot to update the environment variable (set to 1.9.0) to match. An error occurred (to do with cardSprite.lua), but it was really difficult to figure out what it meant and what was wrong, and without access to the log, getting help from anyone else would also have been challenging.

Upon starting the Simulator, the UI loaded, but immediately froze with an error dialogue and the option to "Retry" or "Cancel". Clicking either dismissed the dialogue, but an identical one immediately took its place. The error in the dialogue was the same as what was displayed in the Console.

Aside from the dialogue buttons, all windows were entirely unresponsive. I could only quit by sending a kill signal. Normal quit methods did not work.

I came here to report the bug, but due to the unresponsiveness of the console, the fact that it doesn't log to the terminal I run it from, and the console log does not get saved anywhere, I couldn't actually post the exact error log. If I hadn't noticed the directory was wrong, my reproduction of the log below would have entirely missed the problem, where an accurate log would more likely have allowed someone to notice.

<current time>: Loading: <SDK directory>/System/Launcher.pdx
<current time>: Loading: Failed
Load failed: cardSprite.lua:14: attempt to index a nil value (field 'system')
<stacktrace>
update failed: cardSprite.lua:14: attempt to index a nil value (field 'system')
<stacktrace>
<current time>: Update failed, simulator paused.

Oh no, even though I've updated the env variable, it's still loading the 1.9.0 Launcher.pdx for some reason. I'll make a new bug thread for that.

The Console log is written to a file in: ~/.Playdate Simulator/Playdate Simulator.log.

Oh, yes, I found that, but it does not show the same thing as the console that opens with the simulator. They are entirely different logs. In my screenshot below, the log file takes the terminal output on the left, not the console output on the right.

You are right, only certain things make it into the log on disk. I should probably change that. :slight_smile:

1 Like