Quest2 game always freezes after a few minutes of play

Hello,
I am porting a game to Quest2 and I have been stuck trying to hunt down a seemingly random freeze that always happens after playing for a few minutes. The game will lock up and the viewport will become frozen but I can still move my head, it just looks like a rendered square of what would be aligned to my head. The game music still plays. The oculus menu still works and I can exit the game that way.

Looking at the connected Unity debugger I can see it is crashing because of a memory error. Here is what the errors look like before it stops responding:

Autoconnected Player allocation 0x0xc000000000000000 already registered @ ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 4096; now calling from ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 36?

Autoconnected Player OPENGL NATIVE PLUG-IN ERROR: GL_OUT_OF_MEMORY: Not enough memory left to execute command

Autoconnected Player OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_OPERATION: Operation illegal in current state

Autoconnected Player NativeCrashSerializer::EndReport() Success!

When reproducing the issue and viewing the connected memory profiler, the stats say I am only using around 1.15gbs → 1.25gbs:

Right before crash:
Total Used Memory: 1.26 GB GC: 20.2 MB Gfx: 0.56 GB Audio: 159.1 MB Video: 32 B Profiler: 52.2 MB
Total Reserved Memory: 1.50 GB GC: 24.5 MB Gfx: 0.56 GB Audio: 159.1 MB Video: 32 B Profiler: 80.0 MB
System Used Memory: 1.31 GB
Textures: 945 / 0.65 GB
Meshes: 355 / 129.0 MB
Materials: 508 / 1.8 MB
AnimationClips: 12 / 313.9 KB
Asset Count: 33571
Game Object Count: 14996
Scene Object Count: 90950
Object Count: 124521
GC Allocation In Frame: 103 / 4.8 KB

So it seems like I have plenty of memory to allocate so why is it crashing? How can I go about debugging to isolate the issue? It happens every time but not at any specific part of gameplay that I can tell. Any help would be appreciated, I’ve been stuck on this for weeks! :frowning:

Other notes:

  • Does not happen if ran in the editor on PC.
  • If it just sit in the mission and do nothing and just let it run, it does not crash, so some activity is building up or causing this, I just don’t know how to figure out what it is.

Setup:
Unity 2020.3.5f1, XR Plugin Manager 4.2.1, Oculus XR Plugin 1.12.0, Addressables 1.19.19
Min API: Android 6.0 Marshmellow (API Level 23), Target: Android 11.0 (API Level 30)
IL2CPP .NET 4.x

Testing via link cable on Quest2 v39

Could you try on the latest unity 2020 LTS?
This version is quite old. Also update Oculus XR Plugin AND Oculus Integration (if used)

Those numbers show .05gb of RAM available at the moment of crash, and it’s a memory error. It’s probably expanding your textures, just a guess.

What are you creating a lot of? Are you disabling anything as you go? Huge object pools? Becareful if you auto add to a pool, watch the counts.

@turp182
Thanks for the reply. Could you point out where it says 0.05gb of RAM available? Not seeing that number in the above report unless I’m reading something wrong?

Yes, I have a few object pools for bullets and explosions. I have disabled new creation of pooled objects but issue persists.

I am disabling the pooled objects when they “die”, does disabling affect memory?
I probably have less then 1000 pooled objects total?

Sorry, I misread one of the headers.

So, how about this?:

I added the low memory warning to my test script as well as some profiler text output:

public override void OneSecond() {
        long allocated = Profiler.GetTotalAllocatedMemoryLong(); //mem used right now
        long reserved = Profiler.GetTotalReservedMemoryLong(); //mem took from system
        long unused = Profiler.GetTotalUnusedReservedMemoryLong();
        memOutput.text = $"Allocated: {FormatBytes(allocated)}\nReserved:{FormatBytes(reserved)}\nUnused: {FormatBytes(unused)}\n{moAppend}";
    }

The crash happens even if I have 200mbs still unallocated with no low memory warning called. On closer inspection of the ADB logcat it seems to happen when looping through a list of audio files to compare names to find the one that should be played:

05-30 23:57:41.019 27602 28033 E Unity : OPENGL NATIVE PLUG-IN ERROR: GL_OUT_OF_MEMORY: Not enough memory left to execute command
05-30 23:57:41.333 27602 27641 I Unity : VoiceProfile:GetProfileByName(String)
05-30 23:57:41.333 27602 27641 I Unity : RadioController:PlayVoice(String, String)
05-30 23:57:41.333 27602 27641 I Unity : RadarDisplay:SelectUnit(BlipController)
05-30 23:57:41.333 27602 27641 I Unity : RadarDisplay:OpenClick(HandControllerScript)
05-30 23:57:41.333 27602 27641 I Unity : TriggerClick:Invoke(HandControllerScript)
05-30 23:57:41.333 27602 27641 I Unity : HandControllerScript:Update()

public VoiceProfile GetProfileByName(string name) {
        for (int i = 0; i < profiles.Count; i++) {           
            if (name == profiles[i].name)
                return profiles[i];           
        }
        Debug.Log("cannot find profile by name of "+name);
        return null;
    }

The list of audio clips is several hundred long. Is it trying to uncompress all of them as it loops through just to compare the file names? I thought Unity only uncompress on play?

Have you tried calling Resources.UnloadUnusedAssets() at regular intervals (while logging mem usage before/after)?

Does it happen every time in this method? Have you tried disabling GetProfileByName() and see if it still happens?

What are your audio clip settings? Are they the same for all clips? Are you loading via Resources, AssetBundles or Addressables? If you think it’s your audio you could try changing the compression settings…

Do you have any other threads running, maybe part of a multiplayer asset or something? Any tasks or IEnumerators which may be running? Any recursion going on?

Yes, I have tried Resources.UnloadUnusedAssets() and had minimal impact on the memory used.

My audio clip settings are:
.mp3 or .wav
Compressed In Memory
Preload Audio Data
Vorbis
100% Quality
Preserve Sample Rate

These are loaded via a global AssetBundle at the start of the game.

The crashes seem isolated around audio clips. I’ve disabled the method in question so it no longer loops through the library but the crash still happens elsewhere when playing story narrative audio (which does not require lookup, they are direct referenced). These clips are less than 1MB in size, I don’t understand why it is causing such a problem.

Sounds like you are on your own here. You just need to sit down and go hardcore oldschool debug mode by just adding more and more logging until you can pinpoint the source of pain. This is how us old folk did it before debuggers existed when we only had 32KB of RAM :wink:

You mentioned audio.

Check your memory allocated for that, they are equal (there is no more memory for audio). It could be that is expected (check stats well before the crash point).

I hadn’t mentioned this as I figured OPEN_GL would be the graphics system.

Total Used Memory: 1.26 GB GC: 20.2 MB Gfx: 0.56 GB Audio: 159.1 MB Video: 32 B Profiler: 52.2 MB
Total Reserved Memory: 1.50 GB GC: 24.5 MB Gfx: 0.56 GB Audio: 159.1 MB Video: 32 B Profiler: 80.0 MB

Doing further tests seems to disprove audio loading as the source of the crash. I’ve disabled the audio clips that seemed to cause problems and yet the crash persists. Now it simply is not part of a stack trace and just shows up out of nowhere which is worse to debug.

05-31 14:06:52.458  5811  5838 I Unity   : FIRE PARTICLE VOLLEY
05-31 14:06:52.458  5811  5838 I Unity   : <FireVolly>d__13:MoveNext()
05-31 14:06:52.458  5811  5838 I Unity   : UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
05-31 14:06:52.458  5811  5838 I Unity   : ParticalCannon:Update()
05-31 14:06:52.458  5811  5838 I Unity   :
05-31 14:06:56.176  5811  5989 E Unity   : OPENGL NATIVE PLUG-IN ERROR: GL_OUT_OF_MEMORY: Not enough memory left to execute command
05-31 14:06:57.756  5811  5989 E Unity   : allocation 0x0xc000000000000000 already registered @ ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 4096; now calling from ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 4096?
05-31 14:06:57.766  5811  5989 E Unity   : OPENGL NATIVE PLUG-IN ERROR: GL_OUT_OF_MEMORY: Not enough memory left to execute command
05-31 14:07:04.017  5811  5989 E Unity   : allocation 0x0xc000000000000000 already registered @ ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 4096; now calling from ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 2432?
05-31 14:07:05.740  5811  5989 D Unity   : NativeCrashSerializer::EndReport() Success!

Comparing the ADB logcat without filtering for just Unity stuff I see something about a “Cause: null pointer dereference”? Would anyone be able to take a look at the below and be to gleam any info?

05-31 14:07:02.467  5811  5989 E Unity   : OPENGL NATIVE PLUG-IN ERROR: GL_OUT_OF_MEMORY: Not enough memory left to execute command
05-31 14:07:02.538  5811  6086 I Telemetry: App memory usage: PSS=1979MB DalvikPSS=2 MB PrivateDirty=1886MB PrivateClean=73MB
05-31 14:07:02.540  5811  6086 I VrApi   : FPS=48/72,Prd=47ms,Tear=0,Early=0,Stale=71,VSnc=1,Lat=1,Fov=0,CPU4/GPU=4/4,1478/525MHz,OC=FF,TA=0/0/0,SP=N/N/N,Mem=2092MHz,Free=2130MB,PLS=0,Temp=34.7C/0.0C,TW=2.36ms,App=12.90ms,GD=0.20ms,CPU&GPU=32.44ms,LCnt=1,GPU%=0.85,CPU%=0.59(W0.73),DSF=1.00
05-31 14:07:02.541  5811  6086 I VrApi   : FPS=48/72,Prd=47ms,Tear=0,Early=0,Stale=71,VSnc=1,Lat=1,Fov=0,CPU4/GPU=4/4,1478/525MHz,OC=FF,TA=0/0/0,SP=N/N/N,Mem=2092MHz,Free=2130MB,PLS=0,Temp=34.7C/0.0C,TW=2.35ms,App=12.80ms,GD=0.19ms,CPU&GPU=32.86ms,LCnt=1,GPU%=0.82,CPU%=0.49(W0.60),DSF=1.00
05-31 14:07:02.557  5811  5989 E Unity   : allocation 0x0xc000000000000000 already registered @ ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 4096; now calling from ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 4096?
05-31 14:07:02.567  5811  5989 E Unity   : OPENGL NATIVE PLUG-IN ERROR: GL_OUT_OF_MEMORY: Not enough memory left to execute command
05-31 14:07:03.541  5811  6086 I VrApi   : FPS=48/72,Prd=47ms,Tear=0,Early=0,Stale=72,VSnc=1,Lat=1,Fov=0,CPU4/GPU=4/4,1478/525MHz,OC=FF,TA=0/0/0,SP=N/N/N,Mem=2092MHz,Free=2130MB,PLS=0,Temp=34.7C/0.0C,TW=2.35ms,App=13.09ms,GD=0.20ms,CPU&GPU=32.77ms,LCnt=1,GPU%=0.86,CPU%=0.51(W0.55),DSF=1.00
05-31 14:07:03.828  5811  5989 E Unity   : allocation 0x0xc000000000000000 already registered @ ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 4096; now calling from ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 4096?
05-31 14:07:03.837  5811  5989 E Unity   : OPENGL NATIVE PLUG-IN ERROR: GL_OUT_OF_MEMORY: Not enough memory left to execute command
05-31 14:07:03.958  5811  5989 E Unity   : allocation 0x0xc000000000000000 already registered @ ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 4096; now calling from ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 456?
05-31 14:07:03.964  5811  5989 E Unity   : OPENGL NATIVE PLUG-IN ERROR: GL_OUT_OF_MEMORY: Not enough memory left to execute command
05-31 14:07:03.995  5811  5989 E Unity   : allocation 0x0xc000000000000000 already registered @ ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 4096; now calling from ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 4096?
05-31 14:07:04.004  5811  5989 E Unity   : OPENGL NATIVE PLUG-IN ERROR: GL_OUT_OF_MEMORY: Not enough memory left to execute command
05-31 14:07:04.017  5811  5989 E Unity   : allocation 0x0xc000000000000000 already registered @ ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 4096; now calling from ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:229 size 2432?
05-31 14:07:04.117  2286  5541 I CompositorVR: SetSchedFifo( tid=6108, pol=2, pri=0 ) succeeded
05-31 14:07:05.349   720  4185 D msm8974_platform: platform_split_snd_device: snd_device(2) num devices(1) new_snd_devices(0)
05-31 14:07:05.350   720  4185 D ACDB-LOADER: ACDB -> send_audvoltable
05-31 14:07:05.350   720  4185 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_INSTANCE_GAIN_DEP_STEP_TABLE_SIZE
05-31 14:07:05.350   720  4185 D         : Failed to fetch the lookup information of the device 0000000F
05-31 14:07:05.350   720  4185 D ACDB-LOADER: Error: ACDB_CMD_GET_AUDPROC_INSTANCE_GAIN_DEP_STEP_TABLE_SIZE Returned = -19
05-31 14:07:05.350   720  4185 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_INSTANCE_GAIN_DEP_STEP_TABLE, vol index 0
05-31 14:07:05.350   720  4185 D         : Failed to fetch the lookup information of the device 0000000F
05-31 14:07:05.350   720  4185 D ACDB-LOADER: Error: ACDB AudProc vol returned = -19
05-31 14:07:05.350   720  4185 D ACDB-LOADER: ACDB -> AUDIO_SET_VOL_CAL cal type = 40
05-31 14:07:05.352   720  4185 D msm8974_platform: platform_split_snd_device: snd_device(2) num devices(1) new_snd_devices(0)
05-31 14:07:05.558  1778  3443 I [CT]    : MIXEDREALITY: MrServiceView: renderIteration: (every 10 seconds), screen is: ON, PT is: OFF, ID is: OFF
05-31 14:07:05.715  5811  5991 W AudioTrack: restartIfDisabled(48): releaseBuffer() track 0x7dfe0c4c00 disabled due to previous underrun, restarting
05-31 14:07:05.715  5811  6089 I Choreographer: Skipped 166 frames!  The application may be doing too much work on its main thread.
05-31 14:07:05.719  5811  6086 I VrApi   : FPS=48/72,Prd=47ms,Tear=0,Early=0,Stale=70,VSnc=1,Lat=1,Fov=0,CPU4/GPU=4/4,1478/525MHz,OC=FF,TA=0/0/0,SP=N/N/N,Mem=1353MHz,Free=2130MB,PLS=0,Temp=34.7C/0.0C,TW=2.36ms,App=13.05ms,GD=0.19ms,CPU&GPU=33.01ms,LCnt=1,GPU%=0.82,CPU%=0.47(W0.50),DSF=1.00
05-31 14:07:05.726   720  4238 D msm8974_platform: platform_split_snd_device: snd_device(2) num devices(1) new_snd_devices(0)
05-31 14:07:05.726   720  4238 D ACDB-LOADER: ACDB -> send_audvoltable
05-31 14:07:05.726   720  4238 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_INSTANCE_GAIN_DEP_STEP_TABLE_SIZE
05-31 14:07:05.726   720  4238 D         : Failed to fetch the lookup information of the device 0000000F
05-31 14:07:05.726   720  4238 D ACDB-LOADER: Error: ACDB_CMD_GET_AUDPROC_INSTANCE_GAIN_DEP_STEP_TABLE_SIZE Returned = -19
05-31 14:07:05.726   720  4238 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_INSTANCE_GAIN_DEP_STEP_TABLE, vol index 1
05-31 14:07:05.726   720  4238 D         : Failed to fetch the lookup information of the device 0000000F
05-31 14:07:05.726   720  4238 D ACDB-LOADER: Error: ACDB AudProc vol returned = -19
05-31 14:07:05.726   720  4238 D ACDB-LOADER: ACDB -> AUDIO_SET_VOL_CAL cal type = 40
05-31 14:07:05.727   720  4185 D msm8974_platform: platform_split_snd_device: snd_device(2) num devices(1) new_snd_devices(0)
05-31 14:07:05.727   720  4185 D ACDB-LOADER: ACDB -> send_audvoltable
05-31 14:07:05.727   720  4185 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_INSTANCE_GAIN_DEP_STEP_TABLE_SIZE
05-31 14:07:05.727   720  4185 D         : Failed to fetch the lookup information of the device 0000000F
05-31 14:07:05.727   720  4185 D ACDB-LOADER: Error: ACDB_CMD_GET_AUDPROC_INSTANCE_GAIN_DEP_STEP_TABLE_SIZE Returned = -19
05-31 14:07:05.727   720  4185 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_INSTANCE_GAIN_DEP_STEP_TABLE, vol index 9
05-31 14:07:05.727   720  4185 D         : Failed to fetch the lookup information of the device 0000000F
05-31 14:07:05.727   720  4185 D ACDB-LOADER: Error: ACDB AudProc vol returned = -19
05-31 14:07:05.727   720  4185 D ACDB-LOADER: ACDB -> AUDIO_SET_VOL_CAL cal type = 40
05-31 14:07:05.740  5811  5989 D Unity   : NativeCrashSerializer::EndReport() Success!
05-31 14:07:05.769  5811  5989 E CRASH   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-31 14:07:05.769  5811  5989 E CRASH   : Version '2020.3.31f1 (6b54b7616050)', Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
05-31 14:07:05.769  5811  5989 E CRASH   : Build fingerprint: 'oculus/hollywood/hollywood:10/QQ3A.200805.001/28467500769800000:user/release-keys'
05-31 14:07:05.769  5811  5989 E CRASH   : Revision: '0'
05-31 14:07:05.769  5811  5989 E CRASH   : ABI: 'arm64'
05-31 14:07:05.770  5811  5989 E CRASH   : Timestamp: 2022-05-31 14:07:05-0700
05-31 14:07:05.770  5811  5989 E CRASH   : pid: 5811, tid: 5989, name: Thread-2  >>> com.SpaceOwlGames.BattleGroupVR <<<
05-31 14:07:05.770  5811  5989 E CRASH   : uid: 10106
05-31 14:07:05.770  5811  5989 E CRASH   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
05-31 14:07:05.770  5811  5989 E CRASH   : Cause: null pointer dereference
05-31 14:07:05.770  5811  5989 E CRASH   :     x0  0000007c806fb460  x1  0000000000000000  x2  0000000000000810  x3  0000007c806fb460
05-31 14:07:05.770  5811  5989 E CRASH   :     x4  0000000000000810  x5  0000007c806fbc70  x6  0000007dfe0f3608  x7  0000000000000000
05-31 14:07:05.770  5811  5989 E CRASH   :     x8  8695be9e138b1a10  x9  0000000000000000  x10 0000007c806fb460  x11 0000000000000000
05-31 14:07:05.770  5811  5989 E CRASH   :     x12 0000000000000000  x13 0000000000000000  x14 0000000000000000  x15 0000000000000810
05-31 14:07:05.770  5811  5989 E CRASH   :     x16 0000007e4215c3e0  x17 0000007ed7abf0c0  x18 0000007d10f00f90  x19 000000000000001c
05-31 14:07:05.770  5811  5989 E CRASH   :     x20 0000007e41d5d93d  x21 0000000000000000  x22 0000007c806fb460  x23 0000000000000028
05-31 14:07:05.770  5811  5989 E CRASH   :     x24 0000007dfdc11608  x25 0000007c4fcf047c  x26 0000000000000000  x27 000000000000002c
05-31 14:07:05.770  5811  5989 E CRASH   :     x28 0000007e432c0610  x29 0000007d0378f5f0
05-31 14:07:05.770  5811  5989 E CRASH   :     sp  0000007d0378f280  lr  0000007e4210e69c  pc  0000007ed7abf038
05-31 14:07:05.770  5811  5989 E CRASH   :
05-31 14:07:05.770  5811  5989 E CRASH   : backtrace:
05-31 14:07:05.770  5811  5989 E CRASH   :       #00 pc 000000000007d038  /apex/com.android.runtime/lib64/bionic/libc.so (je_malloc_tsd_boot0+428) (BuildId: ab533d6a94dd08f64b590b2e3331c6e9)
05-31 14:07:05.770  5811  5989 E CRASH   :       #01 pc 0000000000203894  /vendor/lib64/egl/libGLESv2_adreno.so (BuildId: b7b7f901c8603e3530b50a41995bffc2)
05-31 14:07:05.770  5811  5989 E CRASH   :       #02 pc 00000000001facc0  /vendor/lib64/egl/libGLESv2_adreno.so (BuildId: b7b7f901c8603e3530b50a41995bffc2)
05-31 14:07:05.770  5811  5989 E CRASH   :       #03 pc 0000000000d464b8  /data/app/com.SpaceOwlGames.BattleGroupVR-SW2jkPc-jN4Md6Yg9JFcrA==/lib/arm64/libunity.so (GfxDeviceGLES::smile:rawBufferRanges(GfxBuffer*, unsigned int, GfxBuffer* const*, unsigned int const*, int, DrawBuffersRange const*, int, VertexDeclaration*, unsigned long, int)+452) (BuildId: f7e977ea898e9452ed1bd8fb4598e57ed90dafec)
05-31 14:07:05.770  5811  5989 E CRASH   :       #04 pc 0000000000ea661c  /data/app/com.SpaceOwlGames.BattleGroupVR-SW2jkPc-jN4Md6Yg9JFcrA==/lib/arm64/libunity.so (SinglePassStereoSupportExt::smile:rawBuffersStereo(GfxBuffer*, unsigned int, GfxBuffer* const*, unsigned int const*, int, DrawBuffersRange const*, int, VertexDeclaration*, unsigned long)+164) (BuildId: f7e977ea898e9452ed1bd8fb4598e57ed90dafec)
05-31 14:07:05.770  5811  5989 E CRASH   :       #05 pc 0000000000d4d65c  /data/app/com.SpaceOwlGames.BattleGroupVR-SW2jkPc-jN4Md6Yg9JFcrA==/lib/arm64/libunity.so (GfxDeviceGLES::smile:rawBuffers(GfxBuffer*, unsigned int, GfxBuffer* const*, unsigned int const*, int, DrawBuffersRange const*, int, VertexDeclaration*)+380) (BuildId: f7e977ea898e9452ed1bd8fb4598e57ed90dafec)
05-31 14:07:05.770  5811  5989 E CRASH   :       #06 pc 00000000013ba7f8  /data/app/com.SpaceOwlGames.BattleGroupVR-SW2jkPc-jN4Md6Yg9JFcrA==/lib/arm64/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)+29440) (BuildId: f7e977ea898e9452ed1bd8fb4598e57ed90dafec)
05-31 14:07:05.770  5811  5989 E CRASH   :       #07 pc 00000000013bb0dc  /data/app/com.SpaceOwlGames.BattleGroupVR-SW2jkPc-jN4Md6Yg9JFcrA==/lib/arm64/libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)+44) (BuildId: f7e977ea898e9452ed1bd8fb4598e57ed90dafec)
05-31 14:07:05.770  5811  5989 E CRASH   :       #08 pc 00000000013bb0a4  /data/app/com.SpaceOwlGames.BattleGroupVR-SW2jkPc-jN4Md6Yg9JFcrA==/lib/arm64/libunity.so (GfxDeviceWorker::Run()+136) (BuildId: f7e977ea898e9452ed1bd8fb4598e57ed90dafec)
05-31 14:07:05.770  5811  5989 E CRASH   :       #09 pc 00000000013b32e0  /data/app/com.SpaceOwlGames.BattleGroupVR-SW2jkPc-jN4Md6Yg9JFcrA==/lib/arm64/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*)+4) (BuildId: f7e977ea898e9452ed1bd8fb4598e57ed90dafec)
05-31 14:07:05.770  5811  5989 E CRASH   :       #10 pc 0000000000b0ddf4  /data/app/com.SpaceOwlGames.BattleGroupVR-SW2jkPc-jN4Md6Yg9JFcrA==/lib/arm64/libunity.so (Thread::RunThreadWrapper(void*)+512) (BuildId: f7e977ea898e9452ed1bd8fb4598e57ed90dafec)
05-31 14:07:05.770  5811  5989 E CRASH   :       #11 pc 00000000000d4884  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_attr_setdetachstate+32) (BuildId: ab533d6a94dd08f64b590b2e3331c6e9)

GL_OUT_OF_MEMORY sounds maybe like there is a memory leak in your project, maybe in your code, or in an asset you use? You can Google this error and there is a ton of info out there, although I don’t know how far it will get you.

I would strongly suggest disabling functionality in your project (commenting out code and disabling assets) until the problem no longer occurs. Then work your way backwards, or as my old boss used to say “work from the known into the unknown”.

Omg I think I finally found the culprit. I noticed there were a ton of cloned sprite references so I looked into it more, turns out another person has this issue and outlined it here: Unity Scene Memory Allocation on Sprite Sheets with Multiple Object Instances – Pim de Witte

Apparently using sprite atlas constantly clones the texture or something along those lines. I still don’t understand why this didn’t eat up the “unused memory” display. But whatever the reason I do not crash anymore. Huzzah!!!

3 Likes

That’s horrible! Glad you finally found it and thanks for sharing your fix, hopefully saves someone else some time.