mirror of
https://github.com/astromaddie/lambda1-vr.git
synced 2026-10-20 08:00:14 +02:00
jVM is a static that nothing assigns, so jni_shutdown dereferences NULL. The compiler takes that as can't-happen and drops the code after the call, so when the game quits (AppThreadFunction after Host_Shutdown and TBXR_LeaveVR) it runs off the end of the function into whatever comes next. On the Frame that was a call to a fortified snprintf with garbage arguments and an abort. On the Quest it probably crashes or does something random on the way out too, it just doesn't matter there since the app is closing anyway. JNI_OnLoad gets the VM, so keep it there.