Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity locks up, can't force quit, must restart often.

Discussion in 'Editor & General Support' started by CloudyVR, Nov 30, 2017.

  1. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    I have projects open in the background on my Win 8.1 machine, they are not running in play mode or doing anything other than sitting (no baking, or any ExecuteInInspector scripts).

    Often out of nowhere one of the projects will lock up and become non-responsive, Sometimes this happens when only a single project is open as well.
    If I go to task manager and press end task, it just ignores me.

    So I try reloading the project, but Unity says: "Looks like another unity instance is running".

    At this point I can't close it, and I can't open it. So my only options are:

    1. spend hours Googling "Taskmanager end task not working".
    2. Stop what I was working on, close everything, reboot, reopen everything.
    3. Copy/paste the bum project and open the copy, leaving the non responsive one to keep on doing whatever it is doing.

    I can't understand what makes Unity immune to being terminated forcefully?
    Any ideas? I loose a lot of time due to this!

    [UPDATE]
    I just updated to the latest Unity beta, hopefully it's a little more stable.

    [UPDATE]
    Exact same results with 2017.3.0f1.
     
    Last edited: Dec 2, 2017
  2. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    I have narrowed this down to SteamVR or Oculus virtual reality integration.

    Something is faulty in the drivers or the editor causing it to wait indefinitely, but pulling the USB cable on the headsets allows me to close the editor.

    Still a real pain, but at least I don't require a complete reboot anymore.

    [UPDATE]
    Still happening all the time!!!!!! Definitely related to faulty VR in some way but I am not even using VR in my scene. This is really time consuming!
     
    Last edited: Dec 3, 2017
  3. josteos

    josteos

    Joined:
    May 12, 2017
    Posts:
    4
    I'm having a similar issue, where Unity locks up drum-tight and cant be interacted with or clos3d. But (so far) only when hitting PLAY after editing some code. It's making bug-fixing a real PITA.
     
  4. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    I know my issue is related to the Oculus drivers (and possibly a SteamVR conflict). In my case when Unity halts the show, all I have to do is reach down and unplug my Oculus headset and voila, back in business.

    Try pulling your USB cables next time...???

    [EDIT]
    Thinking about what you described, I ran into something similar just the other day, and it was a silly issue where I used a Coroutine with a While loop and forgot "yield return null;" in the loop. It caused Unity to lockup right after execution and I was unable to kill the process.

    So keep an eye out for this situation:
    Code (csharp):
    1.  
    2. Coroutine SomeCoroutine() {
    3.     while (someState) {
    4.         //forgot to yield return here!
    5.     }
    6.     // more code...
    7.     yield return null;
    8. }
    9.  
     
    Last edited: Dec 7, 2017
    tag5T1 likes this.
  5. tayloreichhorst

    tayloreichhorst

    Joined:
    Nov 14, 2013
    Posts:
    6
    Hey trappist-1,

    I was having the same type of issue with my Vive. I would start up the game in the editor, it would load, then freeze immediately and I couldn't force close the Unity editor therefor not being able to open up the project again until a fresh reboot. VERY ANNOYING.

    In my case, this was an audio issue. Our game is both VR and Non-VR, it would never freeze in Non-VR, so I figured it was the Vive (and it kind of was). I noticed that when I started the editor with the Vive on, my audio devices were changed (even though I told Vive not to do this on startup, another annoying thing that I won't rant about right now.) This caused an error in Unity. "FMOD failed to initialize". I closed Unity, changed my audio device back to what it should be before Vive changed it on me, restarted Unity and the error was gone. I managed to start my game without issue or freezing.

    I have a feeling this may not be your exact solution, but maybe it will point you in the right direction.
     
  6. LVermeulen

    LVermeulen

    Joined:
    Jun 26, 2013
    Posts:
    37
    I am having this same issue - definitely the worst Unity bug I've encountered.

    Only happens with SteamVR enabled - happens on play mode after exiting just having run play mode with SteamVR.

    On Unity 2017.4
     
  7. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    I now use U2018 and the latest gfx drivers, I have also removed oculus home from my PC and no longer experience any USB related lockups.

    Maybe you could ensure that your GFX drivers are updated to the latest and that SteamVR is also updated.
     
  8. LVermeulen

    LVermeulen

    Joined:
    Jun 26, 2013
    Posts:
    37
    Updated GFX drivers, disconnected Vive, deleted Library/Temp folders - still no idea whats causing it.

    Temp workaround to not have to restart right now is to go into Process Hacker and close the 'Lockfile' handle so I can start Unity again on the same project without restarting entire PC
     
  9. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    303
    That works to open Unity again, but the process will remain there holding memory right?
    For me it is holding 3GB of memory.

    Any update on this issue?
     
  10. TJD269

    TJD269

    Joined:
    Oct 17, 2017
    Posts:
    19
    Still have this issue. Only happens when SteamVR is running. Driving me insane. I've had so many problems with the Unity editor not opening/freezing/not being able to reopen projects after crashes ect all related to SteamVR. I cannot understand how someone would make Unity completely rely on some communication from SteamVR and not have a time-out tied to the yield. For the record, pulling the USB and trying to close the lockfile handle do not work for me. What a S*** show.

    Edit: So after doing some digging on the handles it was using and looking at the dump file, it was hung up by the Nvidia graphics driver on my 980 Ti. I used ToastyX's CRU driver restart software and the 3 GB Unity proccess closed by itself immediately doing so. So you can thank Unity for once again yielding without a time-out.
     
    Last edited: Nov 28, 2018
  11. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    Which version of Unity? And are you using StramVR 2.0 plugin?
     
  12. TJD269

    TJD269

    Joined:
    Oct 17, 2017
    Posts:
    19
    Using 2018.2.0b9, and no.

    I also tried this on multiple steamvr versions with the same result.

    This happens for my coworker as well on the same unity version. This is beyond ridiculous, it happens every 3 attempts and requires a display driver reset. Also updated drivers with the same result. F*** this.

    Edit:

    It does the exact same thing on 2018.3... unacceptable.
     
    Last edited: Dec 3, 2018
  13. farzaan090

    farzaan090

    Joined:
    Jul 23, 2018
    Posts:
    15
    This has been happening to me on 2018.3 as well. No idea of any solution yet...it has become very frustrating.

    Reinstalled 1070 Ti Windows and Nvidia drivers multiple times with no luck.

    Also using SteamVR here.

    Edit: Haven't tested for very long yet but it seems pausing prior to leaving runtime has fixed this problem for the last 20 minutes or so.
     
    Last edited: Dec 24, 2018
  14. Toylips

    Toylips

    Joined:
    Feb 15, 2013
    Posts:
    28
    this is so annoying, every version if stuck can't be closed by force quit... now it is 2019.3.0f5
     
    unnanego likes this.
  15. ctykaya

    ctykaya

    Joined:
    Sep 23, 2015
    Posts:
    12
    Same problem for me when hit play unity stuck and cannot closed by force quit. I have to restart. Version 2019.3.2f1. How can I fix this. I cannot enter play mode in my project
     
  16. unity_grJWwPgd0nddEA

    unity_grJWwPgd0nddEA

    Joined:
    Feb 4, 2020
    Posts:
    16
    This issue its the worst :(

    I'm having a couple of times a day, is driving me insane.
     
  17. Toylips

    Toylips

    Joined:
    Feb 15, 2013
    Posts:
    28
    same 2019.3.5f1
     
  18. Toylips

    Toylips

    Joined:
    Feb 15, 2013
    Posts:
    28
    forgot to add that it is not because of VR, I haven't any... mb infinity loop, but I can't to debug... cheating with low fps is not helping too..
     
  19. eladleb4

    eladleb4

    Joined:
    Apr 25, 2016
    Posts:
    57
    I had a null ref exception in a fixedUpdate and that caused the mentioned behavior.
    It's such a pain to restart the mac over and over :(
     
  20. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,793
    Editor keeps locking up. Unity tech sends me vague info about changing some GRFX timeout registry as it is too aggressive..2 and 5 seconds is aggressive at defaults according to MS?? Can't even find it..No instructions..Just choke devs. Then..open by command line and force OpenGL..OK..umm this is the future of Unity??? This goes back to 2018 versions?? I am gonna flood them with bug reports till they get the message. Get with Microsoft or nVidia or whomever and fix this garbage. Studios will die a death of a thousand cuts to their bottom line if you can only get 0 - 5 minutes work done before crashing to desktop after locking up. I estimate I am two months behind dealing with this kind of attitude. I kept sending them physics crash bugs and they told me nah..deal with it..can't find it.. Then they do..exactly where I pointed them to. This is an editor issue. Get some real engineers on it. Folks who understand game engines..not enterprise coders. It is not too many polys or shaders like they profess. That is a garbage excuse. These levels did not lock and crash the editor prior to 2019.3. It is like they moved to the new UI rollout and couldn't give damn about making sure the old one works for those in production and not moving to 2020..which BTW has this error front and center as of an hour ago when I attempted a cure. So.. That means Unity is no longer usable as nothing can fix this except Unity or Microsoft or the GPU guys.

    Where is Unity Tech in this thread? This thread started months back.
     
    unnanego and Joe-Censored like this.
  21. dskillsaw

    dskillsaw

    Joined:
    Apr 26, 2012
    Posts:
    13
    Struggling with this as well. Came to this thread hoping there might be a way to kill the offending process from the terminal... guess that might not be possible.
     
  22. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,793
    I have had this project open and idling for 36 hours now with no crash after upgrading to 2019.3.8f1. I would like to commend the particular Unity tech folk who handled this after acknowledging my complaints on another thread. I believe it may have been caused..from release notes.. by throttling the editor frame tick. I may be wrong but watching it over 100 times led me to believe something like that was occurring.
     
    unnanego likes this.
  23. raphaelnew

    raphaelnew

    Joined:
    Jul 10, 2011
    Posts:
    2
    same starting from 2019.3.8-2019.3.9...
     
    Skotrap7 likes this.
  24. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,793
    Just curious after participating in another thread recently. Is VS Community open in the background when it occurs?
     
  25. yyylny

    yyylny

    Joined:
    Sep 19, 2015
    Posts:
    92
    This has started happening to me too since v. 2019.3 (and it's still happening with v. 2020.1). I'm using a Mac, usually letting only one Unity project run in the background. After about 15-30 minutes of inactivity, Unity usually hangs and I need to force quit it. In extreme cases, I must restart my computer. Sometimes Unity refuses to force quit or allow the computer to restart so I need to to do a hard reset with the Mac's shutdown button. Meanwhile I gave up so I just quit Unity if I know I'm not going to use for too long.

    I've never used VR in a project and I don't have VS Community open in the background. I suspect it might be an editor extension I made but I've never been able to prove it and Unity's logs don't mention anything about it.
     
    Skotrap7 and unnanego like this.
  26. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,793
    Exact same versions this happened with me. But on a PC.. So it is with Unity. I note that f8 is not locking or crashing but the Scene view glitches/whites out at least once every few minutes. Game view does not glitch.
     
  27. yyylny

    yyylny

    Joined:
    Sep 19, 2015
    Posts:
    92
    FYI, I think this has been fixed in v. 2020.1.0b8.3654. I haven't experienced any freezes for a while now.
     
    ippdev likes this.
  28. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,793
    Well. I just may update because I started a fresh project in 2019.3.13f1 and it is crashing when idle for about 30 minutes twice which at this point is every time. Thanks for the info pal! Getting it now while I do scripting so the dl won't interfere with forward progress.
     
    unnanego likes this.
  29. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,793
    Unity failed with a screen saying unrecoverable error in 2020. Trying OpenGLCore as unrecoverable error was related to DX11 swapchain. Stabilized crashes somewhat in the 2019.3 series
     
  30. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,793
    Turned out in my case it was the GTX 1080. I replaced it with a Radeon RX 5700 XT and it has been rock solid editing a huge forest on 100 650x650 terrains.