Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Unity apple silicon M1 version crashes very often

Discussion in 'macOS' started by Viole, Jul 27, 2022.

  1. Rulez777

    Rulez777

    Joined:
    Aug 17, 2018
    Posts:
    12
    It crashes even in dev build with that argument.
     
  2. AlejMC

    AlejMC

    Joined:
    Oct 15, 2013
    Posts:
    149
    Wanted to comment on this, I'm currently on this version too.
    To clarify a bit to see if I got it right:
    - There are two types of crashes/hangs: an scriptable object loop related one and an in-editor 'while working' one?

    The issue: currently, very often (10 times a day) on 2021.3.21f1 (and .15f1, .16f1, etc up to .21f1) Unity editor gets into a non responding state and have to Force Quit it... usually after doing something compiling related, asset database related or refresh of some sort: getting out of play mode, unfocusing and focusing back on Unity (this triggers some sort of refresh), etc.

    So questions:
    - Is this one of the aforementioned bugs
    - Is it one of the those that's being worked on 2022+?
    - Is it being back ported to 2021 LTS's?
    - Would the '-force-gfx-st' help on that? (will try anyways, but would be great an official hint on this front)

    Thanks a lot in advance, hope it helps, isn't too much of a repeat.

    UPDATE: just wanted to mention that after having added single threaded Editor command line (-force-gfx-st on the '...' Unity Hub 'add command line arguments' option) haven't had a single hang nor crash during the whole day. I'm confident I would have had about 6 by now.
    No real performance side effects for the size of the scenes and computer (Mac Studio) currently. Everything feels the same.
     
    Last edited: Mar 28, 2023
    CiroContns likes this.
  3. thanhle

    thanhle

    Joined:
    May 2, 2013
    Posts:
    162
    2023 Still Crash ... very often
     
  4. thanhle

    thanhle

    Joined:
    May 2, 2013
    Posts:
    162
    Obtained 17 stack frames.

    #0 0x00000183879820 in objc_msgSend

    #1 0x00000184c0744c in __NSFireTimer

    #2 0xbf6c800183cdf54c in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__

    #3 0x393f800183cdf1f4 in __CFRunLoopDoTimer

    #4 0xfa3f800183cded4c in __CFRunLoopDoTimers

    #5 0xbe42800183cc4734 in __CFRunLoopRun

    #6 0xac1c800183cc3878 in CFRunLoopRunSpecific

    #7 0x673800018d3a3fa0 in RunCurrentEventLoopInMode

    #8 0x202780018d3a3c30 in ReceiveNextEventCommon

    #9 0xe40580018d3a3b2c in _BlockUntilNextEventMatchingListInModeWithFilter

    #10 0xa668800186f4984c in _DPSNextEvent

    #11 0x5d4e800186f489dc in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]

    #12 0xe404000186f3ce0c in -[NSApplication run]

    #13 0x406f000186f14250 in NSApplicationMain

    #14 0xe411800103090e28 in EditorMain(int, char const**)

    #15 0x000001030911a0 in main

    #16 0x000001838bbe50 in start
     
  5. won-gyu

    won-gyu

    Joined:
    Mar 23, 2018
    Posts:
    33
    Obtained 17 stack frames.

    #0 0x00000199b02868 in __pthread_kill

    #1 0xf971800199a722c8 in abort

    #2 0xeb0d8001999909f8 in malloc_vreport

    #3 0x351b80019999420c in malloc_report

    #4 0xba5d8001999a0db8 in find_zone_and_free

    #5 0xc9108002cc8bf298 in mono_ppdb_close

    #6 0x000002cc91068c in free_debug_handle

    #7 0x000002cc99db84 in monoeg_g_hash_table_remove

    #8 0x000002cc910a00 in mono_debug_close_image

    #9 0x000002cc8a6d78 in mono_assembly_close_except_image_pools

    #10 0x000002cc89fc58 in mono_domain_free

    #11 0x000002cc89d82c in unload_thread_main

    #12 0x000002cc93d470 in start_wrapper_internal

    #13 0x000002cc93d31c in start_wrapper

    #14 0x000002cc9bccb0 in GC_inner_start_routine

    #15 0x000002cc9bcc38 in GC_start_routine

    #16 0x00000199b3a06c in _pthread_start

    2021.3.21f1 crashes
     
  6. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    275
    @robinDMUnity @Tautvydas-Zilys could we please get an update? Unity has crashed on me for the 10th time today - not gunna lie, I'm feeling quite angry.
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
  8. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    It has been two+ months since the bug report. The issue has 118 votes, which seems to me more than enough for the issue to be "high pain" and "escalated" and whatever other meaningless words your managers like having wet dreams about.

    And there is still no fix in sight.

    So I go back to my original point: votes do nothing.

    Votes do nothing, because your internal processes do nothing. It's just busywork so we the users and you the employees can delude ourselves that things are going to work out.
     
    Xtro, ysftulek, Unifikation and 2 others like this.
  9. jazzay22

    jazzay22

    Joined:
    Oct 17, 2017
    Posts:
    32
    In latest 2022.2.13f1 it appears -force-gfx-st no longer provides a workaround. I am now experiencing editor crashes every few minutes. We need a fix immediately @robinDMUnity
     
  10. K_Kuriyama

    K_Kuriyama

    Joined:
    Jul 4, 2020
    Posts:
    66
    I am using M2Max Mac in URP environment and it is unstable on all versions of 2022.1.(11,12,13) and crashes at least 10 times a day.
     
  11. VentaGames

    VentaGames

    Joined:
    Jul 9, 2021
    Posts:
    154
    Until they will fix this one - all these crashes will happen over and over again.
    Hope this happens this week :)
     
  12. noio

    noio

    Joined:
    Dec 17, 2013
    Posts:
    226
    @robinDMUnity

    Is there any way you could estimate when this fix will hit? So I know if it's worth 'downgrading' to the Intel version in the meantime.
     
  13. VentaGames

    VentaGames

    Joined:
    Jul 9, 2021
    Posts:
    154
    As far as I heard (read somewhere), the fix should be the part of 2022.2.17 release.
    I think there is the info you're looking for.
     
  14. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,079
    Even without SRP/URP/HDRP, the crashes occur with the frequency described in this thread. So that's not nearly the only problem.
     
  15. sameng

    sameng

    Joined:
    Oct 1, 2014
    Posts:
    184
    Adding my voice, 2021 LTS (latest version, 2021.3.23) crashes an insane amount.
    It locks up over 10 times a day. It feels like it's getting worse and worse...

    Any update? I think everyone would really really appreciate some update from the devs.

    And please, please, fix it on LTS.
    It would not make sense to force users onto 2023 bleeding edge beta to fix... a stability issue. Thank you.
     
    ysftulek, adslitw and bartofzo like this.
  16. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,079
    Just one more thing... rolling over some of the settings in the Project Settings Panel, waiting for the little info pop ups, of the latest alpha (2023), can cause Unity to just sometimes do a full disappearing crash on an m2.
     
  17. bartofzo

    bartofzo

    Joined:
    Mar 16, 2017
    Posts:
    150
    Yes it's super random. Also happened to me when a tooltip showed (!). Worst part of it is if you're unlucky, random data gets corrupted.
     
    Unifikation likes this.
  18. CiroContns

    CiroContns

    Unity Legend

    Joined:
    Jan 28, 2008
    Posts:
    99
    Fingers crossed! I'm also waiting for this one fix. Thanks for the pointer!
     
  19. Viole

    Viole

    Joined:
    Dec 29, 2015
    Posts:
    38
    2022.2.17f1 is out which should fix the crash issues.

    Can anybody confirm there are no more crashes? (or at least not many?)
     
    CiroContns likes this.
  20. VentaGames

    VentaGames

    Joined:
    Jul 9, 2021
    Posts:
    154
    As is see, the fix is there:
    • Graphics: Fixed a crash on iOS, Android, and Silicon devices in ScriptableRenderLoop (DrawRenderers and DrawShadows) which was caused by a threading issue. (UUM-25831)
    I'm working for the last two hours, no crashes yet.
     
    CiroContns and Viole like this.
  21. michelecipriani80

    michelecipriani80

    Joined:
    May 21, 2021
    Posts:
    10
    uncheck vsync in your editor game view, turning it off stopped my M1 Max to crash
     

    Attached Files:

  22. bnmguy

    bnmguy

    Joined:
    Oct 31, 2020
    Posts:
    137
    EXACT same message I get every 2-5 mins, sometimes earlier. This whole editor for macOS is a mess. Where is quality control? Someone (or more) is doing a half a** job somewhere. This is a unity internal staff issue at this point.
     
  23. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    275
    My PC is currently in bits (an attempt to install an AIO cooler gone wrong, long story), so I've been on my M1 Pro MBP 14 all day, and I've just realised it hasn't crashed once today! Hurray!

    I have to have vsync turned off otherwise I get the screen blacking out bug (https://forum.unity.com/threads/mac...black-on-game-view-when-enable-vsync.1374960/), but that's been it.

    I recently upgraded my project to URP, and I'm on 2022.2.18. So, that's pretty good! I've been pretty grumpy on here recently so wanted to call out a win as well for @Tautvydas-Zilys :)
     
  24. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,644
    The credit goes to the joint efforts of Metal and URP teams who tracked down a race condition in our jobsystem synchronization mechanism that only applied to ARM processors :). I am just a messenger in this case.
     
    saukki, noio, Viole and 2 others like this.
  25. bbyford

    bbyford

    Joined:
    Feb 2, 2013
    Posts:
    7
    Turning off V-sync seems to have made it slightly more stable. I'm using unity 2021.3.24 on m2 mcbook air
     
  26. VentaGames

    VentaGames

    Joined:
    Jul 9, 2021
    Posts:
    154
    Had no crashes during the last month using 2022.2.18+ versions.

    Using Apple Studio M1 Max
     
  27. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    I just tried 2022.3 LTS. It froze within 60 seconds.
     
  28. VentaGames

    VentaGames

    Joined:
    Jul 9, 2021
    Posts:
    154
    For me, it works, no freezes or crashes.
     
  29. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    I don't know what to tell you, absolutely nothing changed on my end. Maybe there are multiple freezing reasons. Adding -force-gfx-st to the command line does improve things a lot for me.
     
  30. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    I'm having this problem on M1 Pro and Unity 2021.3.46. There's a bug fix for 2022 and 2023, but what about 2021?
     
  31. bartofzo

    bartofzo

    Joined:
    Mar 16, 2017
    Posts:
    150
    On Unity 2021.3.29f1 now, and random hangs occur less often. BUT, almost half of the time it completely freezes during script compilation. Please... fix this. It is becoming unbearable. How is this not a priority?
     
  32. Viole

    Viole

    Joined:
    Dec 29, 2015
    Posts:
    38
    Out of curiosity: why not update to 2022 LTS? Chances are it will fix your issues.
     
  33. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    Because 2022 is still a mess.
     
  34. bartofzo

    bartofzo

    Joined:
    Mar 16, 2017
    Posts:
    150
    Because we're in the middle of a huge project and suddenly switching major version may have lot's of other implications.
     
  35. StefanoSanitate

    StefanoSanitate

    Joined:
    Oct 21, 2018
    Posts:
    6
    hey guys, just wanted to let you know this happens on my M1 Pro. Using Unity 2020.3.37f1, random crashes in build when target is Apple Silicon. Is there some kind of ETA on a fix? Thanks!
     
  36. UnrealDude1

    UnrealDude1

    Joined:
    Sep 14, 2023
    Posts:
    7
    They don’t test anything
     
  37. mattmaniakg

    mattmaniakg

    Joined:
    Jun 8, 2021
    Posts:
    2
    Same issue there...
     
  38. won-gyu

    won-gyu

    Joined:
    Mar 23, 2018
    Posts:
    33
    Check your path. I fixed my coworker's crash issues by removing non-English letters in the path of the project
     
  39. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    You still need to add -force-gfx-st to command line arguments for both latest 2021 and 2022 LTS, otherwise crashes are not uncommon on macs.

    Haven't used 2023 long enough to see if it crashes that easily as well.
     
  40. VentaGames

    VentaGames

    Joined:
    Jul 9, 2021
    Posts:
    154
    Until the latest release of 2023.2 it just freezes on Reloading Domain every 20-30 min of the normal work. However, the latest release was stable.