Game and editor are freezing after a few minutes (5.3.4p1)

Hi everyone,

For a few weeks I have been struggling with a big problem with the game I’m currently developing: after a few minutes, the game freezes for no apparent reason, whether it’s running in Unity editor or on an Android device.

The game is a very simple 3D game: 15-30 low-poly objects on screen, very low CPU load (runs in Unity editor at 1000 FPS on a Core i7-4710HQ laptop under Windows 10). Only plug-in used is DOTween. Right now I’m using Unity 5.3.4p1, but the freezing used to occur in previous versions too (can’t remember what version I was using when I noticed it for the first time).

Freezing comes anytime, it can occur after a few seconds or a few minutes, at no particular moment. What’s really weird is that Editor gets frozen as well: Editor’s UI is totally unresponsive, including close button on window’s top right. Game background sound loop keeps playing though.

What’s even weirder is that Windows doesn’t see Unity editor as not-responding. It appears normally in task manager and seems to be alive: its CPU load slightly varies from time to time. But when frozen, the only available action is to kill editor’s process in task manager.

Same symptom when the game runs on an Android tablet: after a few minutes, the game freezes (even if the player does nothing), and the only way out is to kill the process.

I tried to diagnose the problem running the game in debug mode from Visual Studio 2015: no result, the freezing doesn’t occur in my code. I tried to attach Visual Studio’s debugger to Unity editor process: I get no helpful information. I checked editor’s log file, but didn’t find any clue.

So my questions are:

  • Did anyone encounter this kind of situation? In this case, how did you fix it?

  • What kind of strategy should I apply to fix this problem?

Any suggestion or piece of advice would be deeply appreciated, thanks in advance for the help.

Cheers,

Laurent

Did you check this thread?
http://forum.unity3d.com/threads/unity-editor-memory-leak-when-building.396609/
It’s a longshot, but if the music keeps playing while everything else freezes… might be related.

Hey Kalladystine,
Thanks for your answer. Unfortunately, I see no memory leak.
It must be something else.