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

5.5.0f3: Frequent editor freezes

Discussion in 'Editor & General Support' started by Peter77, Dec 3, 2016.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,405
    I experience frequent editor freezes with Unity 5.5.0f3.

    The editor randomly freezes several times per hour for me and I have to terminate its process using Windows TaskManager, then open Unity again. I believe it most often freezes when I switch between applications, like ALT+Tabbing from Windows Explorer to Unity. I didn't have this issue with 5.4.

    Is anyone else experiencing random editor freezes too?
    Any idea how to debug such freezes, in order to provide useful information to Unity QA?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,795
    Try running the profiler in editor mode, when a freeze occurs see if it registers a spike in the profiler.
     
  3. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,663
    @karl_jones - That might not work if your editor never comes back from this theoretical spike though, right? I could be wrong about that, is there some kind of log from the profiler?

    @Peter77 do you use any kind of editor scripts in your project? Any asset packages/plugins? Have you tested more than the one project, and if so, does it freeze on them all? What about a blank project, and then you alt tab a few times and see if it freezes? Can't think of anything else to try, but have you ever had this sort of issue in other versions besides 5.4 which you said worked ok?
     
    Peter77 likes this.
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,405
    Unfortunately, the editor does not recover from such freeze. It stays unresponsive forever.

    Yes, the project does have a few editor scripts, but nothing particularly heavy. The project also contains very little asset pipeline automation, so there is almost nothing that kicks in without any user action.

    I work only on one project that runs under 5.5 and that's where these freezes occur. I'm able to reproduce a freeze in a blank project quite reliable when I simply open Notepad++ while Unity is running. However, this specific thing is a known issue. Create a new project, open Notepad++ and Unity freezes.

    I'm not able to reproduce this issue in an empty project with other applications that cause my actual project to freeze though.

    However, after debugging Unity.exe for a while, it seems no matter what other application cause Unity to freeze, it's always the same callstack. So I guess if they fix the known freeze, it's going to fix it for other applications as well.

    Whever Unity froze, the CPU usage goes berserk in Windows TaskManager. Breaking threads in Unity.exe shows that the main thread seems to be waiting for that pending present forever.
    Code (CSharp):
    1. Unity.exe!PlatformSemaphore::WaitForSignal(void)
    2. Unity.exe!GfxDeviceClient::WaitForPendingPresent(void)
    3. Unity.exe!GfxDeviceClient::BeginRendering(struct ClientDeviceWindow *)
    4. Unity.exe!ThreadedWindow::BeginRendering(void)
    5. Unity.exe!GUIView::DoPaint(void)
    6. Unity.exe!GUIView::RepaintAll(bool)
    7. Unity.exe!Application::TickTimer(void)
    8. Unity.exe!FindMonoBinaryToUse(void)
    9. Unity.exe!WinMain()
    Breaking threads while Unity is responsive, shows that the main-thread isn't in WaitForPendingPresent always.

    The workaround seems to be to open all applications you might need during the day before firing up Unity and keep them open.
     
  5. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    353
    I use visual studio 2015 and I worked on 3 seperate projects, they all freezed frequently. It's always when I write or change some code and save it, then focus back on the unity editor, it freezes.
     
  6. yonixwstream

    yonixwstream

    Joined:
    Dec 26, 2016
    Posts:
    1
    Same here. all worked well for 2 days but now freezes every couple minutes. Did not find the pattern yet....
     
  7. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,405
    For me, Unity freezes whenever I open Notepad++.

    The workaround I'm now using is to open all programs I need throughout the day before starting Unity and keep them open all day long. This workaround makes using Unity possible again, far from being ideal though.

    The freeze can be reproduced much easier than explained in this issue. It's basically open Unity, then open Notepad++. There is no need to setup any external tool in Unity or whatsoever. Really hope Unity is going to sort this issue out, as it's really annoying.
     
  8. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    353
    it's fixed for me with patch 1

    Edit: using patch 3 and there are no more errors or freezes
     
    Last edited: Jan 12, 2017
  9. svendkiloo

    svendkiloo

    Joined:
    Dec 2, 2014
    Posts:
    11
    Unity 5.5.0f3 freezes frequently for me as well, when I leave it running for a while. The entire editor view is frozen and unresponsive, but the menu bar still works, and I can close the editor (without much delay) by clicking the cross of the window.

    I was also just now able to use the "File > Open Project..." to re-open the same project. While this is slightly more convenient than closing it and then re-opening it, it's not much different.

    Not sure if it makes a difference, but the game I'm running is a Networked game, and a connection is active when it freezes.

    Does this sound like the same hang/freeze you guys are seeing, or something else?
     
  10. foetoid

    foetoid

    Joined:
    Nov 14, 2012
    Posts:
    7
    I'm having the same issues: Opening Notepad++ or Photoshop while Unity is running consistently freezes the editor and I have to close it with task manager. Never had any similar issues in previous versions.