I’m suffering from a very bizarre crash. I can load my game fine, and even load up a level, but as soon as I try to restart the level, or go to the next level, it crashes. More specifically: my game has two states, the menu, and the levels. When you complete a level, you’re given the option to immediately go to the next one, or return to the menu. While playing a level, you can also pause the game and tell it to restart the current level. The game crashes if you either restart or go to the next level immediately. On the other hand, if you go to the menu between each level load, it’s fine.
Normally, I’d check my code that handles the selection of the next level to load, however, there seem to be 2 problems with that line of thinking. First, the game runs just fine and as intended in the editor. Second, Logcat shows that the correct level was brought up for loading, and indicates that the crash occurs after the level is loaded.
Here is the error from logcat:
05-10 20:51:35.119 1087-1087/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-10 20:51:35.119 1087-1087/? A/DEBUG: Build fingerprint: 'google/angler/angler:7.1.2/N2G47O/3852959:user/release-keys'
05-10 20:51:35.119 1087-1087/? A/DEBUG: Revision: '0'
05-10 20:51:35.119 1087-1087/? A/DEBUG: ABI: 'arm'
05-10 20:51:35.120 1087-1087/? A/DEBUG: pid: 891, tid: 994, name: RenderThread 1 >>> com.epicgames.HarbingerOfTruth <<<
05-10 20:51:35.120 1087-1087/? A/DEBUG: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb74c9000
05-10 20:51:35.120 1087-1087/? A/DEBUG: r0 b74c7bc0 r1 00000000 r2 00000000 r3 b74c9000
05-10 20:51:35.120 1087-1087/? A/DEBUG: r4 00000000 r5 b47fdca0 r6 00000001 r7 00000001
05-10 20:51:35.120 1087-1087/? A/DEBUG: r8 00000015 r9 be71a800 sl 00000000 fp bccc5228
05-10 20:51:35.120 1087-1087/? A/DEBUG: ip ce0a52e4 sp bccc5218 lr c9fa3400 pc b74c9000 cpsr 60070010
05-10 20:51:35.218 1087-1087/? A/DEBUG: #00 pc 00069000 <anonymous:b7460000>
05-10 20:51:35.218 1087-1087/? A/DEBUG: #01 pc 027983fc /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so (_ZNK25FMaterialInstanceResource11GetMaterialEN16ERHIFeatureLevel4TypeE+140)
05-10 20:51:35.218 1087-1087/? A/DEBUG: #02 pc 02d17374 /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so (_ZN21FStaticMeshSceneProxy18DrawStaticElementsEP29FStaticPrimitiveDrawInterface+1860)
05-10 20:51:35.218 1087-1087/? A/DEBUG: #03 pc 046d0490 /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so (_ZN19FPrimitiveSceneInfo15AddStaticMeshesER24FRHICommandListImmediate+80)
05-10 20:51:35.218 1087-1087/? A/DEBUG: #04 pc 046d0730 /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so (_ZN19FPrimitiveSceneInfo10AddToSceneER24FRHICommandListImmediateb+296)
05-10 20:51:35.218 1087-1087/? A/DEBUG: #05 pc 040b1ec0 /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so (_ZN6FScene34AddPrimitiveSceneInfo_RenderThreadER24FRHICommandListImmediateP19FPrimitiveSceneInfo+984)
05-10 20:51:35.218 1087-1087/? A/DEBUG: #06 pc 040b89e4 /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so
05-10 20:51:35.218 1087-1087/? A/DEBUG: #07 pc 0413f37c /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so
05-10 20:51:35.218 1087-1087/? A/DEBUG: #08 pc 01b8b97c /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so (_ZN16FNamedTaskThread23ProcessTasksNamedThreadEib+8492)
05-10 20:51:35.218 1087-1087/? A/DEBUG: #09 pc 01b890b0 /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so (_ZN16FNamedTaskThread21ProcessTasksUntilQuitEi+176)
05-10 20:51:35.218 1087-1087/? A/DEBUG: #10 pc 03fd8d7c /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so (_Z19RenderingThreadMainP6FEvent+252)
05-10 20:51:35.218 1087-1087/? A/DEBUG: #11 pc 03fe5574 /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so (_ZN16FRenderingThread3RunEv+20)
05-10 20:51:35.218 1087-1087/? A/DEBUG: #12 pc 01bf2f44 /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so (_ZN22FRunnableThreadPThread3RunEv+284)
05-10 20:51:35.218 1087-1087/? A/DEBUG: #13 pc 01b842b8 /data/app/com.epicgames.HarbingerOfTruth-1/lib/arm/libUE4.so (_ZN22FRunnableThreadPThread11_ThreadProcEPv+176)
As you can see, it’s not very clear. Any idea what the source could be?
Full log: logcat