Starting with Playdate OS 1.12.0 and SDK 1.12.0 on macOS 12.4 (Apple Silicon), the Playdate crashes when the simulator tries to run a game after uploading it to the device. It shows the screen with the blocks, and when I press B to see more info, it says “File not found.” I can reproduce this with my own Lua projects or any of the Lua examples that come with the SDK, but not the C examples. (Edit: this occurs when a game has a space in its project name, see my comment below)
Steps to reproduce:
Connect Playdate to computer via USB-C and make sure the Playdate is unlocked on the home screen.
Run a Lua game in the simulator. It doesn’t seem to matter whether this is by double clicking a PDX or running a project from Nova.
Open the Device menu and click Upload Game to Device.
Wait while the simulator uploads the game.
Expected result: the Playdate should leave data disk mode and run the game.
Actual result: the upload finishes, the Playdate leaves data disk mode and returns to the home screen, the simulator upload progress gets to the “Running” phase, sits there at 0% on the progress bar for 5-10s, then the Playdate crashes with “File not found.”
The game is uploaded successfully and after the Playdate reboots I can manually open it from the home screen. It’s just the first launch triggered by the simulator that crashes.
Adding some more context: this has happened 0 times with any of the previous SDK versions but currently happens 100% of the time with the latest SDK. I don’t think I’ve changed anything about my process.
I looked in errorlog.txt (which for these crashes, has more info than what pressing B on the crash screen shows) and something appears to be truncating the game name if it contains a space when the simulator tries to launch it. For example, for the crash when I uploaded the “Flippy Fish” example (which builds as “Flippy Fish.pdx”) the error log shows:
2022/06/19 19:58:13
/Games/Flippy
File not found.
So it’s not lua vs c that triggers it, it’s just that all the Lua projects I tried happened to have a space in the name, while the C example didn’t.
Just adding another possible fix here: I'm in VSCode on Mac with the Playdate Debug extension and I'm using a settings.json that sets "playdate-debug.productName" for my pdx. It had a colon ":" in the name and that led to "File not found" - which I found was from the colon when looking at the Playdate in Data Disk mode in errorlog.txt.
Just adding here in case it helps someone else! Removing the colon fixed device builds.
Yes, and that's pretty reasonable! I think I just hadn't realized the product name would turn into a filename or path (as opposed to only existing in metadata), but it makes sense.