Search Unity

Player hangs during scene load on Apple Silicon

Discussion in 'macOS' started by jeffomatic, Aug 15, 2022.

  1. jeffomatic

    jeffomatic

    Joined:
    Jun 24, 2021
    Posts:
    15
    This is a shot in the dark, but I'm posting to see if anyone has observed any hanging (i.e. non-hard crash) while loading scenes in production builds running on Apple Silicon (M1).

    We use Bugsnag to capture production errors, and we've observed a handful of errors labeled "App Hang; semaphore_wait_trap; The app was terminated while unresponsive". I'm pretty sure this is a synthetic error that Bugsnag produces when it detects that the game was manually terminated after a hang on one or more threads.

    We haven't been able to repro it in any consistent manner, but we've only collected these crashes from M1 devices (MBAs and Minis). It could mean a lot of different things: maybe it's an M1-only crash, or maybe it's only detectable on M1. We've added some log breadcrumbs that narrow it down to something in scene load (we happen to use AsyncSceneLoad), but that's admittedly very broad.

    Two questions for everyone:

    1. Has anyone else encountered similar issues?

    2. If we ran into this again, what's the right way to introspect the Unity process to see what it's waiting on?

    Thanks in advance.
     
  2. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    We upgraded our project from 2019.4 to 2020.3 recently, partly to get native AS builds -- and we're having the same problem: the build hangs when loading a scene. Doesn't happen all the time, maybe 30-50% of the time (sometimes when launching and loading the main menu, sometimes once the game is running, loading another scene). The logs from a dev build are not informative, they just stop with no errors, nothing unusual. Did you figure out what is happening on your end?
     
  3. jeffomatic

    jeffomatic

    Joined:
    Jun 24, 2021
    Posts:
    15
    Sorry, no progress on this on my end. 30-50% frequency sounds dramatically worse than what I'm observing. Best of luck!
     
  4. TheRobWatling

    TheRobWatling

    Joined:
    Feb 18, 2013
    Posts:
    45
    We seem to be suffering from this issue in 2021.3.9f1
    It seems to happen quite often and only on Apple Silicon.

    Have either of you had any progress on this issue?

    Thanks
     
  5. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    It's apparently fixed on a later 2021 release -- we upgraded last summer (we're now on 2021.3.28) and it works fine.
     
  6. TheRobWatling

    TheRobWatling

    Joined:
    Feb 18, 2013
    Posts:
    45
    Thanks Gecko, that's super helpful. We were looking at moving to a newer version of 2021 LTS so that gives me hope.