title: Unity Android build crashes randomly
body: <p>I have an Android game, and everything works perfectly in the Editor, but when I run it on my Android device, it crashes sometimes.</p>
  <p>This is how it goes: I'll be playing my game, and randomly, or because of a reason that I don't know, the game will quickly drop in FPS, it starts to go slower and slower until it's frozen at 1 FPS. Changing scenes when it starts to slow down, is possible, but it ends up crashing anyway.</p>
  <p>It's not a device issue since it has happened on multiple devices.</p>
  <p>It's also not a scene-specific crash. It's happened on my menu scene, game scene, and level creator scene.</p>
  <p>It happens very rarely, today it took me about an hour of playing until I could replicate this bug, it eventually happened, and this time I had the profiler attached:</p>
  <p><a href="https://i.stack.imgur.com/KgZAl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KgZAl.png" alt="enter image description here" /></a></p>
  <p>As you can see, VSync goes up to 5000+ms, the function causing the problem seems to be:</p>
  <p>PlayerLoop -&gt; PostLateUpdate.FinishFrameRendering -&gt; Gfx.WaitForPresentOnGfxThread -&gt; WaitForTargetFPS -&gt; Semaphore.WaitForSignal</p>
  <p>But I haven't found out exactly what this is or how to solve it.</p>
  <p>Does anyone know how to fix this?</p>