Search Unity

Unable to close Unity Editor process on Mac.

Discussion in 'Editor & General Support' started by mukultictoc, Nov 13, 2019.

  1. mukultictoc

    mukultictoc

    Joined:
    Sep 24, 2016
    Posts:
    15
    While playing the game, the unity editor just stays in hung state at random times. Attaching the status of the process of Unity, the status of the process is 'Tx'. I am not sure what is causing that to happen...
    The only way to fix it is to restart the Mac to open the project. This is rather annoying.
    I am using Unity 2019.2.12f1 on Mac OS X 10.15.1 ( Catalina OS X ).

    Please let me know if there is any workaround to kill the process without restarting the machine.
    I have tried killing the process using 'Kill' command in terminal.. also the 'Kill -9 <pid>'. Nothing seems to work. Screen Shot 2019-11-13 at 2.57.05 PM.png
     
    veryevilzed likes this.
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    mukultictoc likes this.
  3. glacuesta

    glacuesta

    Joined:
    Nov 30, 2017
    Posts:
    10
    This is happening to me too on 2019.2.3f1. Unity crashes when I am editing in Animator tab, and it takes the system down hard: force-quitting it does not work (the icon disappears but the window stays on and the mac keeps spinning), terminating on terminal does not work (same result). Only thing I can do is restart the mac.

    2019.2.3f1 on Mac OS 10.15.3 Catalina.

    @mukultictoc did you file a bug report? So I can add onto there.
     
  4. igor_rikhard

    igor_rikhard

    Joined:
    Jan 29, 2019
    Posts:
    1
    Have same behavior on 2018.4.12f1, sometimes when i try to inspect var in Rider, unity is frozen and only restart of mac can help
     
  5. chunky_octopus

    chunky_octopus

    Joined:
    Apr 11, 2015
    Posts:
    14
    Same problem here with Unity 2018.4.17f1 under MacOS 10.15.3
    I force quit Unity, the icon disappears from the Dock but Unity windows stay there and I can hear the MBP fan screaming...

    If I open Activity Monitor it hangs as well (this happens only when I have this problem with Unity).
    Trying to kill the process by terminal doesn't have any effect.

    Please have a look here https://ibb.co/Pw4trD5
     
  6. piersb

    piersb

    Joined:
    Mar 13, 2018
    Posts:
    6
    I have this too, also with the Activity Monitor hanging.

    Seems to occur when I get the Fatal Error "The file 'MemoryStream is corrupted! Remove it and launch unity again!"
     
  7. tconkling

    tconkling

    Joined:
    Jul 13, 2012
    Posts:
    16
    Oof, this is happening to me as well, since (finally) upgrading to Catalina this weekend. I'm unable to open Activity Monitor (it hangs forever); my fans are going full speed, and `ps -x | grep Unity` reports a bunch of processes that cannot be killed even with `kill -9 pid`:

    Code (CSharp):
    1. 41351   ??  TXs    5:47.86 /Applications/Unity/Hub/Editor/2019.3.9f1/Unity.app/Contents/MacOS/Unity -projectpath /Users/tim/export/the_hunt/TheHuntGame -useHub -hubIPC -cloudEnvironment production -hubSessionId 63c28ea0-7f44-11ea-a4f5-535fbe72d9e5 -accessToken (redacted!)
    2. 41352   ??  R      5:40.17 /Applications/Unity/Hub/Editor/2019.3.9f1/Unity.app/Contents/Frameworks/UnityLicensingClient.app/Contents/Resources/Unity.Licensing.Client --namedPipe Unity-LicenseClient-tim
    3. 41353   ??  S      0:09.58 /Applications/Unity/Hub/Editor/2019.3.9f1/Unity.app/Contents/Resources/PackageManager/Server/UnityPackageManager -s 41351 -p 50872
    4. 41391   ??  Z      0:00.00 (UnityShaderCompi)
    5. 41416   ??  Z      0:00.00 (Unity Helper)
    6. 42367   ??  Z      0:00.00 (Unity Helper)
    7. 45602 s000  S+     0:00.00 grep --color=auto Unity
     
  8. Nazar-Pallaev

    Nazar-Pallaev

    Joined:
    Apr 9, 2015
    Posts:
    5
    same for me but with unity 2019 and 2020. unity randomly may freeze and not respond, the only way to make it work again = force hard reboot macbook via on/off button
     
  9. chunky_octopus

    chunky_octopus

    Joined:
    Apr 11, 2015
    Posts:
    14
    hi guys, did anybody make some progress on the issue? I would be happy just to be able to kill Unity without restarting.
    Any word from our Unity overlords? :)
     
    litebox likes this.
  10. sakus

    sakus

    Joined:
    Oct 9, 2013
    Posts:
    47
    Chiming in, been having the same sort of weird hanging issues in Catalina + Unity 2019, I'm currently on 2019.3.10f1 and it still happens. For me it's always (and only) when I'm working in the animator view but other than that it seems kind of random, it just comes out of nowhere but I know to start expecting it as soon as I open the animator view.

    Symptoms are the same as described by others; I have to force shutdown Unity and it disappears from the dock but then my Activity Monitor can't be used (it just hangs when opening it) and I can see some Unity processes (checking from terminal) that can't be killed.

    The only way to come back from this state that I've found is reboot. Makes it practically impossible for me to work on any mecanim animators as it always hangs the whole machine sooner or later (usually sooner) :(

    *edit* has anyone submitted a bug yet? I'm going to open one later if not, as this is driving me nuts and I'm at a point with my project where I actually need to work on some animators..
     
    Last edited: Apr 20, 2020
  11. kamilpyggdrasilgaming

    kamilpyggdrasilgaming

    Joined:
    Aug 2, 2019
    Posts:
    3
    Same for me, Unity randomly crashes in animation window.
    Unity Pro 2019.3.4f1
    MacOS Catalina 10.15.4
    JetBrains Rider 2019.3
     
  12. theakdev

    theakdev

    Joined:
    Nov 28, 2017
    Posts:
    5
    I have the same problem with and it almost always happens when the animator window is open, sometimes in the background, but mostly when I am working on it.
    Is there a bug report or shall I submit one
     
  13. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Same problem here:
    Unity 2019.2.21
    macOS Catalina 10.15.3
    Jetbrains Rider 2020.1

    Quite sure the problem resides on Mac-Jetbrains Rider.
     
  14. Eric-Farraro

    Eric-Farraro

    Joined:
    Apr 23, 2013
    Posts:
    31
    Same issue for me - also using Catalina / Rider. I often have the debugger running, and it seems like it may be related to that.
     
  15. tconkling

    tconkling

    Joined:
    Jul 13, 2012
    Posts:
    16
    > *edit* has anyone submitted a bug yet? I'm going to open one later if not, as this is driving me nuts and I'm at a point with my project where I actually need to work on some animators..

    I submitted a bug describing this. Frustratingly, Unity's bug response email says "please do not share this link with anyone else".

    (I'm also using JetBrains Rider 2020.1 - is the consensus that that's required to trigger this? Is anyone who sees this bug not using Rider?)

    My setup:
    - Unity 2019.3.11
    - Rider 2020.1
    - macOS Catalina 10.15.4
     
  16. Eric-Farraro

    Eric-Farraro

    Joined:
    Apr 23, 2013
    Posts:
    31
    In case this helps anyone - if Force Quit on the Unity process hangs (as described in this thread), I found that if I *also* force quite a process called 'debugserver', Unity would close properly. If you run into this issue, check Activity Monitor to see if you have a 'debugserver' process running and try killing that.
     
  17. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    I think it's a consensus, all of us are using Rider with MacOSX.
    It happened already on prior versions btw... Not sure if it happened on Mojave but it did sure happen on previous versions of Rider and Unity.
    It doesn't necessarily happens just with the Animator, as someone said on the thread it happens too while debugging quite often.

    (I didn't submit any report btw)

    If I remember well, the Activity monitor is not working when this happens, when trying to access it doesn't work... At least I think I remember that happened and someone in the thread mentioned that too...
    Anyway I will try.
     
  18. Eric-Farraro

    Eric-Farraro

    Joined:
    Apr 23, 2013
    Posts:
    31
    @pistoleta - You're correct that the Activity Monitor doesn't work for killing the Unity process itself (in my case, shows as pink and won't dismiss, even after being force quit). My suggestion was to *also* kill the 'debugserver' process (which has no obvious connection to Rider or Unity), if you see it. Killing that process 'released' the Unity process, and it was finally able to quit, despite the fact that I was not able to kill the Unity process previously.
     
  19. theakdev

    theakdev

    Joined:
    Nov 28, 2017
    Posts:
    5
    I just thought of something my HDD is formatted as APFS could this be the problem, does everyone here has the same format or not??
    I was thinking of reinstalling the whole system again, and changing the HDD formatting but wanted to make sure that everyone having the problem have the same format, before I reinstall the whole system.
     
  20. tconkling

    tconkling

    Joined:
    Jul 13, 2012
    Posts:
    16
    @theakdev - I'm very skeptical that would make a difference (this issue is almost certainly to do with a debugger process; APFS is well-tested, and if it caused OS soft locks there would be massive outcry from both Mac and iOS users!)

    It's great to eliminate variables, but in this case the hassle to you would be pretty enormous, and almost certainly wouldn't be worth your time :)
     
  21. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Thanks for this, I shall try it next time.
     
  22. staywildgames

    staywildgames

    Joined:
    Sep 24, 2018
    Posts:
    1
    I also have hanging problems when making adjustments in the Animator. Can't open Activity Monitor, have to restart, etc. Folks started mentioning Rider (which I also use) so I tried switching completely back to Visual Studio and removed Rider via the Package Manager, but the crashing persisted.

    Not sure what to do at the moment. This is rendering Unity unusable for me/us. Ugh...
     
  23. Eric-Farraro

    Eric-Farraro

    Joined:
    Apr 23, 2013
    Posts:
    31
    At least in my case, I have a 100% success rate resolving the issue (eg: killing Unity without having to restart) by killing the 'debugserver' process when the issue occurs. I'd encourage everyone to at least see if this process is running, if you run into this issue.

     
    jamesspaceape likes this.
  24. tconkling

    tconkling

    Joined:
    Jul 13, 2012
    Posts:
    16
    @Eric-Farraro when Unity hangs in this way for me, I'm not able to open Activity Monitor (it beachballs forever immediately upon launch). Assuming there are others in the same situation, I think the potential workaround is to do a `ps x | grep debugserver` in the terminal, and then killing the process ID listed there?
     
    jamesspaceape likes this.
  25. Eric-Farraro

    Eric-Farraro

    Joined:
    Apr 23, 2013
    Posts:
    31
    I assume so! Definitely curious to hear if that works, or if it's a slightly-different-but-similar issue.
     
  26. shrinebot

    shrinebot

    Joined:
    Sep 12, 2014
    Posts:
    16
    Thanks @Eric-Farraro was having same issue, killing 'debugserver' from Activity monitor allows me to kill Unity
     
    jamesspaceape likes this.
  27. sakus

    sakus

    Joined:
    Oct 9, 2013
    Posts:
    47
    I don't use or even have Rider (I use Visual Studio Code). Also yeah, when it happens to me, I can't open the activity monitor itself either (it just hangs, too). In my case (and some others in this thread it seems) it's definitely related to the animator view somehow as that's the only way I can get it to hang and it pretty much never fails to hang sooner or later while in there.

    Next time I'll poke around processes through terminal more, though, to see if I have this debug process in there somehow hanging things.
     
  28. bududomasidet

    bududomasidet

    Joined:
    Oct 20, 2018
    Posts:
    1
    debugserver firstly trying to get root privileges, then unity stops responding. +1. Can it be fixed somehow?
     
  29. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    @tconkling @Eric-Farraro , "`ps x | grep debugserver` in the terminal, and then killing the process" works perfectly.
    Thanks
     
    tconkling likes this.
  30. sakus

    sakus

    Joined:
    Oct 9, 2013
    Posts:
    47
    Can confirm - got a freeze, Activity Monitor also just froze when trying to launch it. Looked for a debugserver process and killed it via terminal, after that both Activity Monitor and Unity itself can again be launched without problems.

    Thanks! This makes it a lot more bearable, although it's still annoying having to keep hitting save every other second while having the animator window open and still probably losing some work once it goes down.

    The process I had to kill looked like this in ps -A

    /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/debugserver --fd=22 --native-regs --setsid
     
  31. ewanuno

    ewanuno

    Joined:
    May 11, 2017
    Posts:
    58
    this looks like two separate problems, i have a coworker on catalina who's getting the exact same problem as you guys, but i'm also getting frequent crashes in the animator editor, i'm on mojave. unity exits normally after the crash though.so i get to send automated bug reports.
     
  32. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Are you using Jetbrains Rider?
     
  33. ewanuno

    ewanuno

    Joined:
    May 11, 2017
    Posts:
    58
  34. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Yeah but some of us are not using the animator editor at all.
    Must be different problems as you said.
     
  35. andre_6865

    andre_6865

    Joined:
    Feb 23, 2018
    Posts:
    7
    Guys,

    Any resolution to this issue? It's killing me...
     
  36. sakus

    sakus

    Joined:
    Oct 9, 2013
    Posts:
    47
    Looking at the issue tracker entry linked above, it's fixed in 2020.2.0a14 and the fix is in review for 2019.4 and 2020.1... which leads me to believe that 2019.3 is nearing the end of its cycle and we'll be seeing 2019.4 soon, hopefully with this fix in it.
     
  37. andre_6865

    andre_6865

    Joined:
    Feb 23, 2018
    Posts:
    7
    I don't mind switching to 2020, i just hope there won't be any new issues. Waiting for 2019.4 is an option too. Thanks for the update.
     
  38. input0

    input0

    Joined:
    Apr 28, 2016
    Posts:
    2
    I always have this problem after using Unity Remote 5 for android. UnityHelper, UnityPackageMan, and UnityShaderComp processes are the culprit. In my case they are marked as "defunct." A defunct process cannot be killed even with kill -9 because they either have child/additional processes that has to be killed altogether or they are corrupted.

    Solution

    On a terminal, run command below to show all defunct processes
    ps -ef | grep defunct

    Then run kill -9 pid ppid (for example, kill -9 3035 3568)

    Then re-run ps -ef | grep defunct to confirm it has been killed.

    This worked for me on Linux Ubuntu. It shouldn't be that much different for Macs.

    Got my solution here:
    https://askubuntu.com/questions/201303/what-is-a-defunct-process-and-why-doesnt-it-get-killed
     
    ilmario likes this.
  39. waltran

    waltran

    Joined:
    Feb 23, 2017
    Posts:
    36
    any reasonable fix yet ?
    activity monitor freezes too...
    ps: ps x | grep debugserver and killing the process works for me too. yet i already lost animator changes for quite a few times already....
     
  40. kamilpyggdrasilgaming

    kamilpyggdrasilgaming

    Joined:
    Aug 2, 2019
    Posts:
    3
    Upgrading to 2019.4 (LTS) fixed this problem for me.
     
  41. Damjan-Mozetic

    Damjan-Mozetic

    Joined:
    Aug 15, 2013
    Posts:
    46
    This is still happening to me. I'm on Mac OS 11.2.3 and Unity 2020.3.6f1. Sadness.
     
  42. tconkling

    tconkling

    Joined:
    Jul 13, 2012
    Posts:
    16
    FWIW, this has _stopped_ being an issue for me sometime over the past year. I'm running 2020.3 LTS, but I don't think that upgrade is when I stopped having hanging issues. I also updated to a faster computer (a Macbook Pro 16" 2019 model).

    I realize this isn't especially helpful to others having this problem right now... but it's another data point.