Unity Editor Freezing randomly
Hi,
since approx. a year, we are developing a VR game for Oculus and SteamVR. There is one thing, regularily screwing up the work day: the Unity Editor just randomly crashing.
What happens: When running the game from the Unity Editor, after a couple of seconds the Editor freezes. The game seems still be running in the background (as music is still playing) but Unity does not react to anything anymore. The only thing you can do is kill it with the Windows task manager.
When does it happen: Absolutely random! Approx. 1 time every two weeks. The problem is, once it is happening, it is always happening and you can't get the game working anymore in the editor. If you start the compiled game from outside of unity, everything works fine. When this happens we start testing our builds by compiling them and running them from outside of the editor. (But as you can imagine, that is not a god way for testing it.) After some time, the game can be run from inside the Editor again. Everything works fine then, until... at some random time it happens again...
This error is occuring since the beginning from our development in Unity 5.3, 5.4 and 5.5. It is also happening on all dev machines (but all are running windows 10).
As we can't force reproduce it, this is hard to debug.
My questions: Is there any way to debug the Unity editor itself when it freezes? Is there any issues already known of the Unity Editor freezing during playback?
Kind regards, Konrad
Answer by StefanWullems · Jun 19, 2017 at 12:23 PM
I had the same problem too and for me, it seemed to be connected to my internet connection. When the connection was lost, even for a few seconds, it would crash.
It can be something else though. I hope you figure it out soon!
Same here. Unity freezes completely (without being in Play-$$anonymous$$ode) and only recovers if I disable my internet connection. Version 5.6.4f1
After reading this I ran a cmd line "ping google.com -t" and then moved around my editor (in edit mode). When Unity froze for a few seconds I looked at the cmd and noticed that for one ping the time was very high (close to 200 ms). It seems like Unity or a third party package is sending or receiving some data (maybe checking for updates).
Regardless, it has to be a Unity bug with the internet pipeline. There's no reason any connection should freeze the editor like that. It should be running asynchronous.
I had the same problem and was the internet connection, as soon i disconnect the editor works perfectly, any solution?
Answer by Duke_Hast_Mich · Jul 10, 2017 at 05:13 AM
If you are using an NVIDIA graphics card on windows 10, reinstall the driver from Geforce experience with the 'clean install' box checked. I don't know if it will help with the EXACT problem you have but it solved a similar issue for me. Windows 10 has some, ... peculiarities, in regards to it's cooperativeness with drivers.
This solution worked for me. $$anonymous$$any thanks! I thought my new graphics card was working well and assumed the problem was in my code, so this really saved me. $$anonymous$$y game was crashing as a stand alone build and in the editor the picture would randomly freeze with gameplay sounds still running. Not a VR game though.
Answer by Jawchewa · Apr 28, 2017 at 02:30 AM
Yeah, I've had this problem as well, and haven't really figured out a solution for it.
But as far as debugging the editor itself, one thing that you can do is look at the editor log files. Sometimes this can have information about crashes and issues. Although, I'm not really sure if it will output the error when the editor freezes. It might still be worth looking into, though. https://docs.unity3d.com/Manual/LogFiles.html
Answer by konradkunze · Jun 19, 2017 at 09:13 AM
The Log says nothing interesting. It seems to be somehow connected to audio driver management of windows. The freeze seems to happen after the primary audio device was switched while working in the unity editor. (For ex. between speakers and headphones) Can reproduce this at home and at work.
Your answer
Follow this Question
Related Questions
Recently updated Unity 5 and now my project Scripts with not communicate 0 Answers
How to load level after typing somthing? 1 Answer
what program can I use to draw so I can use it in unity 1 Answer
Unity UI Test Automation displays error, after compiling 0 Answers
WaitForSeconds Not working. 1 Answer