Macos Simulator hangs on start and the issue persists after forced quit

I have a weird issue that is not connected to a specific game. I haven’t used the SDK for at least a month, so I’m not sure which SDK version was the first to do this.

The Simulator (on Macos, M1 Mb Pro) hangs after it’s started — sometimes before it displays a window, but mostly it hangs after it displays a window, once it just never got through the bouncing in the dock stage.

When I kill the process and try to open it again it still hangs (no matter which way — i tried clicking pdx file, opening it directly, opening it via a build shell script). Even when I open an older version of Simulator (2.6.3), the issue persists.

Possible hints at the source of the issue:

  • It resolves after I restart the computer.
  • I resolves after I disconnect external displays and their docking station (which includes an external network adapter and a lot of USB accessories).
  • One thing I changed recently is that I started using one of the external displays in vertical orientation.
  • At first I thought it’s a debugger issue, because I tried using Nova (with Playdate extension) for the first time, but it’s not an issue when I use it with just the laptop alone.

If I can add anything helpful or if anybody else has a similar problem, I’d be happy to provide more debug info.

When it's hung try Sampling it. Steps are here. Troubleshooting hangs, freezes, and slowdowns. Please attach the results.

1 Like

Thanks for the info! Here’s the output (in this case, it’s being launched via Nova run task, the icon shows up on dock, not bouncing, and it hangs before creating any windows):

Sample of Playdate Simulator.txt.zip (63.1 KB)

One more thing I discovered — the issue also sometimes comes up after Sim launches and then is connected to the thunderbolt dock (not always, as I just uploaded a build to device via Sim through the dock).

  • Disabling the wired network adapter does not fix the issue.
  • Rotating the display back to the standard orientation also does not fix the issue.

The hang is the Simulator attempting to start audio on launch and the OS hanging down in audio units. What does your audio set up look like?

1 Like

Interesting! I recently updated my external Soublaster X4 soundcard that I use as the primary output. I’ll try disconnecting it and report back. (Another possible issue is that each of the displays and the dock itself have their own audio interfaces, but that was never an issue before.)

Thanks for digging into it!

You were completely right — it’s the external audio interface. When I disconnect the device, Simulator immediately unlocks and runs perfectly. Thank you!

Is that something that can be fixed on Simulator’s side, or is it an issue solely with the interface? So far I haven’t seen anything like it with other apps. (EDIT: Uh, a bit of googling revealed that other users are having a lot of issues with the same interface (not the same thing, but all seemingly driver-related issues). So perhaps I’ll be able to find a way to fix it there.)

Unfortunately we can't fix it in the simulator as the hang is deep inside the OS’ audio system. We are basically just trying to tell the OS to route audio and that's where it stalls.

1 Like