Oculus App crashes on unload streaming levels

Hiya, i’m stumped with a problem involving the oculus and load/unload of streaming levels. Here are the crash logs. it looks like it involves lightmaps but it still crashes going into scenes with no lighmaps. Any help or pointer in terms of direction to look to fix this would be appreciated.

04-19 10:22:05.309: A/DEBUG(7817): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-19 10:22:05.309: A/DEBUG(7817): Build fingerprint: ‘oculus/vr_monterey/monterey:10/QQ3A.200805.001/15280600139500000:user/release-keys’
04-19 10:22:05.309: A/DEBUG(7817): Revision: ‘0’
04-19 10:22:05.309: A/DEBUG(7817): ABI: ‘arm’
04-19 10:22:05.309: A/DEBUG(7817): Timestamp: 2021-04-19 10:22:05+1200
04-19 10:22:05.309: A/DEBUG(7817): pid: 6954, tid: 7562, name: RenderThread 4 >>> com.Conical.OptimizedGF <<<
04-19 10:22:05.310: A/DEBUG(7817): uid: 10145
04-19 10:22:05.310: A/DEBUG(7817): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xd1e1cf99
04-19 10:22:05.310: A/DEBUG(7817): r0 dddddddd r1 f403f1bc r2 00000000 r3 00000001
04-19 10:22:05.310: A/DEBUG(7817): r4 f403f1bc r5 00000001 r6 cdde07f0 r7 d5140a80
04-19 10:22:05.310: A/DEBUG(7817): r8 d5140a80 r9 dddddddc r10 dddddddc r11 b7b04df8
04-19 10:22:05.310: A/DEBUG(7817): ip 83fb72ec sp b7b04d90 lr dddddddd pc c0464730
04-19 10:22:05.442: A/DEBUG(7817): backtrace:
04-19 10:22:05.442: A/DEBUG(7817): #00 pc 07aa2730 /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (FLinearColor FilteredVolumeLookup(FVector, FIntVector, unsigned char const*)+944) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #01 pc 07aa1220 /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (InterpolateVolumetricLightmap(FVector, FVolumetricLightmapSceneData const&, FVolumetricLightmapInterpolation&)+2964) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #02 pc 07aa2b74 /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (GetIndirectLightingCacheParameters(ERHIFeatureLevel::Type, FIndirectLightingCacheUniformParameters&, FIndirectLightingCache const*, FIndirectLightingCacheAllocation const*, FVector, unsigned int, FVolumetricLightmapSceneData*)+304) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #03 pc 07d70780 /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (FPrimitiveSceneInfo::UpdateIndirectLightingCacheBuffer(FIndirectLightingCache const*, FIndirectLightingCacheAllocation const*, FVector, unsigned int, FVolumetricLightmapSceneData*)+268) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #04 pc 07d70ba8 /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (FPrimitiveSceneInfo::UpdateIndirectLightingCacheBuffer()+988) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #05 pc 07e7a900 /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (FSceneRenderer::UpdatePrimitiveIndirectLightingCacheBuffers()+548) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #06 pc 07b63e7c /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (FMobileSceneRenderer::InitViews(FRHICommandListImmediate&)+4176) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #07 pc 07b6573c /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (FMobileSceneRenderer::Render(FRHICommandListImmediate&)+2440) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #08 pc 07ed2c3c /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #09 pc 07ed501c /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #10 pc 05af966c /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (FNamedTaskThread::ProcessTasksNamedThread(int, bool)+2144) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #11 pc 05af83f4 /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (FNamedTaskThread::ProcessTasksUntilQuit(int)+108) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #12 pc 07080980 /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (RenderingThreadMain(FEvent*)+216) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #13 pc 070ac290 /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (FRenderingThread::Run()+20) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #14 pc 05bef204 /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (FRunnableThreadPThread::Run()+152) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #15 pc 05af3ae8 /data/app/com.Conical.OptimizedGF-gBrKjAVz4XkepGiSjecc1Q==/lib/arm/libUE4.so (FRunnableThreadPThread::_ThreadProc(void*)+80) (BuildId: a7deb0a9cb43e25ac5c038fb7c092425e93b43fd)
04-19 10:22:05.442: A/DEBUG(7817): #16 pc 000a554f /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: 83dc9512fb55867999b06e7977b660bc)
04-19 10:22:05.442: A/DEBUG(7817): #17 pc 0005f683 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 83dc9512fb55867999b06e7977b660bc)

Hey @tomiConical, did you submit a bug report?

Always good to write a Forum post as well, in case others come across the same issue!

Hi @VictorLerp not sure how to do that (the forum topic) and I wasn’t sure it counted as a bug just yet since I was still investigating it. I’ll get to that immediately and hopefully with more information about the issue.

That’s the right approach! The best way to get a bug investigated is to provide as much information as possible, and a fresh project where the issue can be reproduced.

Using UE 4.27, I faced a similar “GetIndirectLightingCacheParameters” crash in Android when unloading an old level and then loading a new level instance.
I solved it by changing the volume lighting method to “Sparse Volume Lighting Sample”, which will force the engine to use the indirect lighting cache instead of volumetric lightmaps.

Where is this setting that you changed? I’m running into the same error on my project. Level unload seems to crash ( a specific level)

Did you manage to solve it? I got nthe same crash and cant figure out whats why. World Settings on Sprawse Volume Lighting Sample doesn’t help

Maybe this,same issue!

To anyone struggling with Quest 2 level streaming crashes, I have found that duplicating the map to the root content folder and using that one instead is working for me! I guess it is some kind of bug, but at least there’s a fairly easy solution: levels in root folder do not crash on load

1 Like

Correction: I thought it was because of duplicating the levels into the root content folder, but then the bug came back. Now I know that if I re-build the lighting separately in each of the sublevels (opening those maps directly and not inside of the other main level), then that bug is fixed for some reason.

Just tried all three solutions here and none worked. This is for a crash when streaming out a level on android (quest) headset.
Tried rebuilding lighting in the level by itself - still crashed.
Tried changing volume lighting method to sparse volume lighting sample - still crashed.
Tried early bailout in FilteredVolumeLookup if !Data - still crashed.

Here’s the stack trace I’m getting from adb logs, so that google results can find this thread better:
(FLinearColor FilteredVolumeLookup<FFloat3Packed>(UE::Math::TVector<double>, UE::Math::TIntVector3<int>, FFloat3Packed const*)+396) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (InterpolateVolumetricLightmap(UE::Math::TVector<double>, FVolumetricLightmapSceneData const&, FVolumetricLightmapInterpolation&)+1064) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (GetIndirectLightingCacheParameters(ERHIFeatureLevel::Type, FIndirectLightingCacheUniformParameters&, FIndirectLightingCache const*, FIndirectLightingCacheAllocation const*, UE::Math::TVector<double>, unsigned int, FVolumetricLightmapSceneData*)+636) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (FPrimitiveSceneInfo::UpdateIndirectLightingCacheBuffer(FIndirectLightingCache const*, FIndirectLightingCacheAllocation const*, UE::Math::TVector<double>, unsigned int, FVolumetricLightmapSceneData*)+104) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (FPrimitiveSceneInfo::UpdateIndirectLightingCacheBuffer()+936) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (FSceneRenderer::UpdatePrimitiveIndirectLightingCacheBuffers()+552) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (FMobileSceneRenderer::InitViews(FRDGBuilder&, FSceneTexturesConfig&, FInstanceCullingManager&)+8612) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (FMobileSceneRenderer::Render(FRDGBuilder&)+2352) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (FNamedTaskThread::ProcessTasksNamedThread(int, bool)+2248) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (FNamedTaskThread::ProcessTasksUntilQuit(int)+236) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type)+384) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (RenderingThreadMain(FEvent*)+1640) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (FRenderingThread::Run()+64) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (FRunnableThreadPThread::Run()+228) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137) (FRunnableThreadPThread::_ThreadProc(void*)+100) (BuildId: 5041c9ab6a9f3fef6067880f5eb63fc545402137)

Some updates. It appears for us that the issue only appears in Development builds, and not Shipping builds. Additionally for development builds, the workaround we found was to not unload streaming levels that have lighting built in them - it’s fine to have them set as hidden, but not unload them.

1 Like

I have the same problem, it looks like it is crashing only if loading the same level instance twice, is it the same for you?

I found a solution to this problem. In my case, it helped to first make the level invisible, and only then unload it. Try set bShouldBeVisible = false, wait until IsLevelVisible become false, then unload level.

Hey! How are you?
Did you use world composition or level streaming volumes?