Crash on Quest 2 / Quest 3 after around 20 minutes of playtime

Cesium for Unity 1.7.1.

16 people using a quest vr device (android) experienced this exact crash on their own device atleast once:

Abort Reason: terminating (libCesiumForUnityNative-Runtime.so)

Hi @Your_RainBoy ,

Nothing in that callstack jumps out at me, but based on your description of “Crash after 20 mins” by multiple users, it does lead me to suspect running out of memory.

Reinforcing that, we do have an open issue related to memory leaks, link

How many and what kind of tilesets are in your scene? Are you using Google P3DT tiles?

Thanks

indeed, i am using P3DT tiles, i have 336870912 allocated bytes in the faulty scene,
i optimized some scripts and updated some packages and the crash seems to occur more rarely than before, i also found that i had Incremental Garbage Collector TURNED OFF. which i turned on right after.
i will update you on this tommorow or the day after.

See also the related GitHub issue here:

As I’ve specified on GitHub, this is NOT an ‘out of memory’ or low storage space crash, there is 1gb+ of free allocated memory available at all times, even during the crash. And storage has a lot of free space.

Call stack: Crash on Quest 2 / Quest 3 after around 20 minutes of playtime · Issue #408 · CesiumGS/cesium-unity · GitHub

v1.12.0 Cesium for Unity

v1.7.1 (currently used version) returns the same crash type.

Unity 2023.1.0f1

New info:

The crash apparently only occurs ONCE in no more than 30 minutes.

Then no matter how intensive or long play sessions last, it doesn’t crash again.

However, I think this resets on rebooting the device or updating the app.

Again, it’s not an out of memory crash, nor storage space limitation.

Lastly, the one-time crash could sometimes not occur at all, not even once, but more debugging is needed..

Got news!

I have assigned debug symbols to the stack trace and here’s what I got:

Crash Type
Native or Java Crash

Crash Reason
Abort Reason: terminating (libil2cpp.so)

Thread 8269
#00 pc 0000000000093668 /apex/com.android.runtime/lib64/bionic/libc.so (snprintf(char*, unsigned long pass_object_size1, char const*, …) [bionic/libc/include/bits/fortify/stdio.h:78 + 0x0]) (BreakpadBuildId: 2f9a003860b62caee6d8eb13019083280)
#01 pc 00000000022fa008 libil2cpp.so (PlayerLocomotor_RotatePlayer_m7FC64F1BE7768DF3C0195DDE0E448D5CECA7E54F [D:\EarthQuest\EarthQuestUnityProject/D:/EarthQuest/EarthQuestUnityProject/Library/Bee/artifacts/Android/il2cppOutput/cpp/Oculus.Interaction__4.cpp:24519 + 0x0]) (BreakpadBuildId: 05d4a1f86d2be57600000000000000000)
#02 pc 00000000022fa158 libil2cpp.so (PlayerLocomotor_RotatePlayer_m7FC64F1BE7768DF3C0195DDE0E448D5CECA7E54F [D:\EarthQuest\EarthQuestUnityProject/D:/EarthQuest/EarthQuestUnityProject/Library/Bee/artifacts/Android/il2cppOutput/cpp/Oculus.Interaction__4.cpp:29118 + 0x4]) (BreakpadBuildId: 05d4a1f86d2be57600000000000000000)
#03 pc 000000000150ec58 libCesiumForUnityNative-Runtime.so (std::__terminate(void ()())+16) (BreakpadBuildId: c346625603203dd9c7cb7ad67573f2e20)
#04 pc 000000000150ebf0 libCesiumForUnityNative-Runtime.so (std::terminate()+56) (BreakpadBuildId: c346625603203dd9c7cb7ad67573f2e20)
#05 pc 000000000083c3ec libCesiumForUnityNative-Runtime.so (__clang_call_terminate+8) (BreakpadBuildId: c346625603203dd9c7cb7ad67573f2e20)
#06 pc 0000000000ef526c libCesiumForUnityNative-Runtime.so (CesiumForUnityNative::UnityPrepareRendererResources::free(Cesium3DTilesSelection::Tile&, void
, void*)+1668) (BreakpadBuildId: c346625603203dd9c7cb7ad67573f2e20)
#07 pc 0000000000f3c9ec libCesiumForUnityNative-Runtime.so (Cesium3DTilesSelection::TilesetContentManager::unloadTileContent(Cesium3DTilesSelection::Tile&)+348) (BreakpadBuildId: c346625603203dd9c7cb7ad67573f2e20)
#08 pc 0000000000f302f4 libCesiumForUnityNative-Runtime.so (Cesium3DTilesSelection::Tileset::_unloadCachedTiles(double)+352) (BreakpadBuildId: c346625603203dd9c7cb7ad67573f2e20)
#09 pc 0000000000f2f7e8 libCesiumForUnityNative-Runtime.so (Cesium3DTilesSelection::Tileset::updateView(std::__ndk1::vector<Cesium3DTilesSelection::ViewState, std::__ndk1::allocatorCesium3DTilesSelection::ViewState > const&, float)+944) (BreakpadBuildId: c346625603203dd9c7cb7ad67573f2e20)
#10 pc 000000000088c104 libCesiumForUnityNative-Runtime.so (CesiumForUnityNative::Cesium3DTilesetImpl::Update(DotNet::CesiumForUnity::Cesium3DTileset const&)+152) (BreakpadBuildId: c346625603203dd9c7cb7ad67573f2e20)
#11 pc 0000000000843528 libCesiumForUnityNative-Runtime.so (DotNet_CesiumForUnity_Cesium3DTileset_Update+72) (BreakpadBuildId: c346625603203dd9c7cb7ad67573f2e20)
#12 pc 00000000025b3ab0 libil2cpp.so (SqlDecimal_Parse_mD1EB9F4E57E4FE62E7E4AC81DF8D8A1DD8DF6FB6 [D:\EarthQuest\EarthQuestUnityProject/D:/EarthQuest/EarthQuestUnityProject/Library/Bee/artifacts/Android/il2cppOutput/cpp/System.Data__6.cpp:1996 + 0x0]) (BreakpadBuildId: 05d4a1f86d2be57600000000000000000)
#13 pc 000000000228ec6c libil2cpp.so (WaterSpray_RenderSplash_m15A7C2AFEBDD97F4AF6928B0BE24494F1B94612D [D:\EarthQuest\EarthQuestUnityProject/D:/EarthQuest/EarthQuestUnityProject/Library/Bee/artifacts/Android/il2cppOutput/cpp/Oculus.Interaction.OVR.Samples.cpp:7502 + 0x4]) (BreakpadBuildId: 05d4a1f86d2be57600000000000000000)
#14 pc 000000000228ebb8 libil2cpp.so (NonAlloc_GetRootsFromOverlapResults_m926D16C920E2883EEBBD93069BBB9477CC68E7D0 [D:\EarthQuest\EarthQuestUnityProject/D:/EarthQuest/EarthQuestUnityProject/Library/Bee/artifacts/Android/il2cppOutput/cpp/Oculus.Interaction.OVR.Samples.cpp:3362 + 0x4]) (BreakpadBuildId: 05d4a1f86d2be57600000000000000000)
#15 pc 0000000000654bac libunity.so (SoundHandleAPI::SetData(float const*, unsigned int, unsigned int) + 0x4a0) (BreakpadBuildId: e3eba19db618c29300000000000000000)
#16 pc 00000000006644f4 libunity.so (curl_maprintf + 0x0) (BreakpadBuildId: e3eba19db618c29300000000000000000)
#17 pc 00000000006728cc libunity.so (Curl_cookie_add + 0xbc) (BreakpadBuildId: e3eba19db618c29300000000000000000)
#18 pc 0000000000493418 libunity.so (void tflite::reference_ops::TransposeImpl<signed char, 5>(tflite::TransposeParams const&, tflite::RuntimeShape const&, signed char const*, tflite::RuntimeShape const&, signed char*) + 0x430) (BreakpadBuildId: e3eba19db618c29300000000000000000)
#19 pc 000000000055a63c libunity.so (GfxDeviceClient::SetBufferName(GfxBuffer*, char const*) + 0x68) (BreakpadBuildId: e3eba19db618c29300000000000000000)
#20 pc 000000000055a67c libunity.so (GfxDeviceClient::SetBufferName(GfxBuffer*, char const*) + 0xa8) (BreakpadBuildId: e3eba19db618c29300000000000000000)
#21 pc 000000000055a908 libunity.so (GfxDeviceClient::SetDebugSettings(GfxDevice::DebugSettings const&) + 0x74) (BreakpadBuildId: e3eba19db618c29300000000000000000)
#22 pc 00000000006d6b0c libunity.so (jinit_huff_encoder + 0xa0d4) (BreakpadBuildId: e3eba19db618c29300000000000000000)
#23 pc 00000000006f2fd8 libunity.so (core::unique_ptr<core::basic_string<char, core::StringStorageDefault > >::reset() + 0x34) (BreakpadBuildId: e3eba19db618c29300000000000000000)
#24 pc 0000000002002f74 /memfd:jit-cache (deleted) (offset 0x2000000) (art_jni_trampoline+116)
#25 pc 00000000020036c8 /memfd:jit-cache (deleted) (offset 0x2000000) (com.unity3d.player.L.handleMessage+1384)
#26 pc 000000000056cb3c /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+140) (BreakpadBuildId: 86c0af461ddc28084a7bdc86c89950a60)
#27 pc 000000000056fdac /system/framework/arm64/boot-framework.oat (android.os.Looper.loopOnce+1356) (BreakpadBuildId: 86c0af461ddc28084a7bdc86c89950a60)
#28 pc 000000000056f7d8 /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+552) (BreakpadBuildId: 86c0af461ddc28084a7bdc86c89950a60)
#29 pc 0000000000209418 /apex/com.android.art/lib64/libart.so (nterp_helper+152) (BreakpadBuildId: 061252be60b646e46baf7921238e9af30)
#30 pc 000000000000a898 /data/app/~~g7ClaVzyVXRsL_dGXqXd-w==/com.bowie.earthquest-LhLk5EtksGiU-EodBqta-w==/base.apk (com.unity3d.player.O.run+48)
#31 pc 00000000002109a4 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BreakpadBuildId: 061252be60b646e46baf7921238e9af30)
#32 pc 0000000000253f1c /apex/com.android.art/lib64/libart.so (art::RemoveNativeDebugInfoForJit(void const*) [external/libcxx/include/__hash_table:118 + 0x8]) (BreakpadBuildId: 061252be60b646e46baf7921238e9af30)
#33 pc 0000000000691008 /apex/com.android.art/lib64/libart.so (art::thread::CreateCallback(void*)+1416) (BreakpadBuildId: 061252be60b646e46baf7921238e9af30)
#34 pc 00000000000fd10c /apex/com.android.runtime/lib64/bionic/libc.so (art::jit::Jit::PrepareForOsr(art::ArtMethod*, unsigned int, unsigned int*) [art/libartbase/base/bit_memory_region.h:117 + 0x0]) (BreakpadBuildId: 2f9a003860b62caee6d8eb13019083280)
#35 pc 0000000000094fb0 /apex/com.android.runtime/lib64/bionic/libc.so (art::(anonymous namespace)::CheckJNI::GetPrimitiveArrayElements(char const*, art::Primitive::Type, _JNIEnv*, _jarray*, unsigned char*) [clone .__uniq.99033978352804627313491551960229047428] [art/runtime/jni/check_jni.cc:3659 + 0x1c]) (BreakpadBuildId: 2f9a003860b62caee6d8eb13019083280)