- Home /
What does the log tell me about editor crash on play?
[enter code here][1]
Hi,
I started running into this problem where the unity editor crashes when I press the play button. It does this only in one particular scene of one particular project, and also after reimporting all assets. After a lot of failed attemps to try to isolate a problem in my code I dug up the log. This is my first time trying to make sense of them, I tried googling some of the more "suspicious" parts but I didn't find any answer. Could anyone help me out by telling me what the log says? Thanks so much!
[1]: /storage/temp/97726-log.txt
Answer by Bunny83 · Jul 14, 2017 at 12:41 PM
Are you sure that the editor actually crashed?
Maybe your application just hang due to an infinite loop maybe? A lot people seem to confuse a hang with a crash or don't even know the difference.
Storing the log as pdf makes no sense. Why didn't you just append it as txt file? It's almost impossible to read the pdf due to the huge font size and massive word wrap.
Hey, thanks so much for your answer. For some reason the site wouldn't accept my .txt first, only now when I tried several other text editors it worked. I thought I solved it by making it a pdf but clearly the layout sucked, I didn't check. Sorry! I wasn't aware of the difference between a crash/hang, thanks for pointing that out. In fact, I'm pretty sure it's a hang since it happens only in one scene. Could I still get useful information from the log?
No, a hang is not an wrong action but usually an error in your logic. The application actually runs fine, but is stuck in an infinite loop.
For example when you just do this in Start:
while (true)
{
}
Your application would be stuck forever in that loop. You would need to ter$$anonymous$$ate your game / the editor as there's no way to exit that loop.
You have to debug your code yourself. Try adding Debug.Logs at several places where it might get stuck and see the log what was your latest log that was executed.
Since we don't have your code we can't help you.