Hello everyone, I have a strange bug and I can’t figurate why :
Sometimes, I have a scene which makes the game (on android) OR the editor crashes. It happens more on Android (barely 1/2 launch), on PC Editor, something like 1/10.
I’ve no infinite loops, no recursive functions, I dont really know where I can find a solution here so I’m looking for ideas here.
It’s a 2D project, with, at the load of the scene, 41 game objects (with UI in count), with 12 of them which have polygon colliers 2D with an average of 150 points each (275 max, 45 min).
They are all in the scene (no load in-game) and are cloned as obstacles.
I was able to let the program run during the crash, and sometimes data appear in the profiler, but not enough to really understand what’s going on. I probably can let the game continue to freeze and get more, but it takes me already 30 min of crash to get that and I don’t have the time to get more.
In those datas, I can see the Physics2D.Fixedupdate going mad (maybe? I don’t know if the datas are normal or not).
So I was thinking about the number of points in PolygonColliders are maybe a little high, but before I start messing with them, I want to know what you think about.
Hope you’ll have some ideas here :).
Thank.
Here’s the (poor) logs and data I was able to get before freeze.
Windows CPU (%) and Ram consumption of Unity:

Profiler datas (during crash) going mad (maybe):
Edit :
Profiler datas when the game run correctly :
Editor.log:
Mono: successfully reloaded assembly
- Completed reload, in 0.600 seconds
Initializing Unity.PackageManager (PackageManager) v5.1.1 for Unity v5.1.1f1
Setting Android v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\PlaybackEngines\androidplayer
Setting BlackBerry v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\PlaybackEngines\blackberryplayer
Setting BB10 v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\PlaybackEngines\iossupport
Setting StandaloneLinux v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\PlaybackEngines\linuxstandalonesupport
Setting StandaloneOSXIntel v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\PlaybackEngines\macstandalonesupport
Setting WSAPlayer v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\PlaybackEngines\metrosupport
Setting SamsungTV v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\PlaybackEngines\stvplayer\STVPlayer
Setting WebGL v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport
Setting StandaloneWindows v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\PlaybackEngines\windowsstandalonesupport
Setting WP8Player v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\PlaybackEngines\wp8support
Setting GUISystem v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem
Setting UNetHLAPI v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\Networking
Setting UnityAnalytics v5.1.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityAnalytics
Setting IL2CPP v0.10.1 for Unity v5.1.1f1 to F:\Program Files\Unity\Editor\Data\il2cpp
Registering platform support modules:
Platform assembly: F:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\Boo.Lang.Compiler.dll (this message is harmless)
Platform assembly: F:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\Boo.Lang.dll (this message is harmless)
Platform assembly: F:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\Boo.Lang.Parser.dll (this message is harmless)
Platform assembly: F:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\UnityScript.Lang.dll (this message is harmless)
Registered platform support modules in: 0.0340965s.
Native extension for OSXStandalone target not found
Native extension for WindowsStandalone target not found
Native extension for LinuxStandalone target not found
Native extension for WebGL target not found
Native extension for SamsungTV target not found
Native extension for BlackBerry target not found
Native extension for Android target not found
Load scene 'Temp/__EditModeScene' time: 43.425041 ms
You're deaaaaaaaaaaad
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
Game:setGameOver(Boolean) (at Assets\Game\Scirpts\Game.cs:140)
Birdy:declareGameOver() (at Assets\Game\Scirpts\Birdy.cs:49)
Birdy:OnTriggerEnter2D(Collider2D) (at Assets\Game\Scirpts\Birdy.cs:65)
(Filename: Assets/Game/Scirpts/Game.cs Line: 140)
Unloading 176 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 2.724040 ms
System memory in use before: 148.3 MB.
System memory in use after: 148.5 MB.
Unloading 15 unused Assets to reduce memory usage. Loaded Objects now: 2574.
Total: 2.709272 ms (FindLiveObjects: 0.122116 ms CreateObjectMapping: 0.029535 ms MarkObjects: 2.540298 ms DeleteObjects: 0.016755 ms)
You're deaaaaaaaaaaad
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
Game:setGameOver(Boolean) (at Assets\Game\Scirpts\Game.cs:140)
Birdy:declareGameOver() (at Assets\Game\Scirpts\Birdy.cs:49)
Birdy:OnTriggerEnter2D(Collider2D) (at Assets\Game\Scirpts\Birdy.cs:65)
(Filename: Assets/Game/Scirpts/Game.cs Line: 140)
[remote] error: Init socket failed
The profiler has run out of samples for this frame. This frame will be skipped. Increase the sample limit using Profiler.maxNumberOfSamplesPerFrame
(Filename: C:/buildslave/unity/build/Runtime/Profiler/ProfilerImpl.cpp Line: 383)
The profiler has run out of samples for this frame. This frame will be skipped. Increase the sample limit using Profiler.maxNumberOfSamplesPerFrame
(Filename: C:/buildslave/unity/build/Runtime/Profiler/ProfilerImpl.cpp Line: 383)
The profiler has run out of samples for this frame. This frame will be skipped. Increase the sample limit using Profiler.maxNumberOfSamplesPerFrame
(Filename: C:/buildslave/unity/build/Runtime/Profiler/ProfilerImpl.cpp Line: 383)