Where is my RAM? Unity app on Oculus GO non-deterministic crashing with < 1gb memory used! — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Where is my RAM? Unity app on Oculus GO non-deterministic crashing with < 1gb memory used!

justiceincjusticeinc Posts: 13
NerveGear
Been at this for a couple weeks now, so I need help. I have a relatively large app with many features, and recently it started exhibiting crashes, mainly during a new scene load, which made it terrible to track down.

I eventually figured out were due to out-of-memory issues. I had no logs saying this, but doing an adb bugreport eventually showed the culprit as lowmemorykiller ending the process abruptly.

So using Unity's great profiling tools, I was able to get my RAM consumption down from about 2gb to under 1gb. Crashes seemingly abated. Then I went on with other optimizations, including switching from GLES2 to GLES3+Single Pass Rendering. Now the crashes are coming back! I'm not using any more memory, except possibly for GLES3 itself - the profiler shows 1.02gb in use, 0.76 for unity and 270mb for "GfxDriver".

However, I was previously able to have 2gb in memory before crashes before, on GLES2, so why would I crash now at ~1gb on GLES3? Further, the crashes are not consistent - sometimes I can play everything fine with no crashes, other times not. Sometimes, simply connecting to the Unity profiler pushes me over the edge to a crash, further complicating my debugging process. If I'm interpreting things correctly, the profiler says (right before the crash) that I'm using 1.02gb out of "reserved" 1.05gb, and that 2.40gb "total system memory usage" - so what is using the extra 1.4gb?

Is there any better way I can isolate the specific causes of the issue? I really can't do much more to manage my RAM usage. Half of it is out of my control - 270mb on the graphics driver, and 200mb for the eye render textures - and it just feels like every time I lower my memory usage a bit, the point where I get a crash becomes lower to compensate. If I can't get an answer I'll just have to go back to the inexplicably working GLES2, and lose single-pass rendering, but that will lead to degraded user experience, so please send any suggestions! Thanks

Comments

  • AlphaSilverbackAlphaSilverback Posts: 1
    NerveGear
    I have the same problem. A huge amount of features fail because of memory shortage, and there's practically nothing in my scene. 

    I've been working on this problem 10 hours now, trying frantically to delete stuff from my project that seem to be compiled, but is never used. Nothing helps.    Does someone have a solution to this problem.

    I've tried cutting everything that takes up space like textures and audio out, but it doesn't help. Just a 1000 verts with a simple material on will still crash the app.
  • bkjbkj Posts: 159 Oculus Start Member
    edited February 7
    @justiceinc are you using ASTC compression for textures?
Sign In or Register to comment.