“File not found” when using the simulator to upload game when name contains a space

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:

  1. Connect Playdate to computer via USB-C and make sure the Playdate is unlocked on the home screen.
  2. 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.
  3. Open the Device menu and click Upload Game to Device.
  4. 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.

3 Likes

I'm interested to know what's on your Playdate disk at a file level. Perhaps duplicate files or some such?

I have the same issue. Where would you expect duplicated files?

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.

4 Likes

Reproduced, confirmed, filed. Thanks for tracking this down!

3 Likes

FWIW, this still happens as of SDK 1.12.3.

A space in the game name does seem to be the trigger. Not the end of the world--a second launch makes the game run.

I asked about this and fix is imminent with 1.13

2 Likes