I am trying to embed the coco creator 2.4.2 generated android project into my existing gaming app, I can see the CoCo2dxActivity kill the process instead of just finishing the activity, I commented termiateProcess() code in and it work fine for first launch but with the second launch native library crashes somewhere, looks like after first launch the native resource are not cleaned up and native crash while cleaning up the memory.
Many people are getting the same problem, any one got the solution so far. ?
if (mGLSurfaceView != null) {
// Cocos2dxHelper.terminateProcess();
}
2021-12-27 21:11:46.957 24375-24375/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x95a0
2021-12-27 21:11:46.957 24375-24375/? A/DEBUG: x0 0000000000000000 x1 0000000000000000 x2 0000000000000050 x3 0000000000000003
2021-12-27 21:11:46.957 24375-24375/? A/DEBUG: x4 0000006ff6413b90 x5 0000000000000028 x6 00000072fc87c000 x7 0000000000250124
2021-12-27 21:11:46.957 24375-24375/? A/DEBUG: x8 0000000000000000 x9 0000000000000001 x10 0000000000000000 x11 0000000000000000
2021-12-27 21:11:46.957 24375-24375/? A/DEBUG: x12 0000006ff6413cb0 x13 0000000000000021 x14 0031ef671dbd7940 x15 0000221973951d77
2021-12-27 21:11:46.957 24375-24375/? A/DEBUG: x16 0000006f96e01f70 x17 0000006f95e652c8 x18 0000006ff5030000 x19 0000006ff6415568
2021-12-27 21:11:46.957 24375-24375/? A/DEBUG: x20 0000000000000000 x21 00000000000095a0 x22 0000006ff6417000 x23 0000007175554e38
2021-12-27 21:11:46.957 24375-24375/? A/DEBUG: x24 0000006ff115eef8 x25 0000006ff6417000 x26 000000000000002a x27 0000000000000003
2021-12-27 21:11:46.957 24375-24375/? A/DEBUG: x28 0000006ff6415e20 x29 0000006ff64153f0
2021-12-27 21:11:46.957 24375-24375/? A/DEBUG: lr 0000006f95da2494 sp 0000006ff64153f0 pc 0000006f95da2500 pst 0000000060000000
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: backtrace:
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #00 pc 0000000001457500 /data/app/~~Hq7nJs3N25Ibh7hG11-zAg==/org.cocos2d.demo-8eXKfwl_AllVCQTYMU1k6w==/lib/arm64/libcocos2djs.so (v8::HandleScope::Initialize(v8::Isolate*)+144) (BuildId: 66f89312b8b4713f62437e75288c21f0298c4a30)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #01 pc 00000000009a2d10 /data/app/~~Hq7nJs3N25Ibh7hG11-zAg==/org.cocos2d.demo-8eXKfwl_AllVCQTYMU1k6w==/lib/arm64/libcocos2djs.so (se::AutoHandleScope::AutoHandleScope()+44) (BuildId: 66f89312b8b4713f62437e75288c21f0298c4a30)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #02 pc 0000000000b66198 /data/app/~~Hq7nJs3N25Ibh7hG11-zAg==/org.cocos2d.demo-8eXKfwl_AllVCQTYMU1k6w==/lib/arm64/libcocos2djs.so (se::ScriptEngine::cleanup()+108) (BuildId: 66f89312b8b4713f62437e75288c21f0298c4a30)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #03 pc 0000000000b665f0 /data/app/~~Hq7nJs3N25Ibh7hG11-zAg==/org.cocos2d.demo-8eXKfwl_AllVCQTYMU1k6w==/lib/arm64/libcocos2djs.so (se::ScriptEngine::init()+52) (BuildId: 66f89312b8b4713f62437e75288c21f0298c4a30)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #04 pc 0000000000b69b08 /data/app/~~Hq7nJs3N25Ibh7hG11-zAg==/org.cocos2d.demo-8eXKfwl_AllVCQTYMU1k6w==/lib/arm64/libcocos2djs.so (se::ScriptEngine::start()+48) (BuildId: 66f89312b8b4713f62437e75288c21f0298c4a30)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #05 pc 00000000009a2ae0 /data/app/~~Hq7nJs3N25Ibh7hG11-zAg==/org.cocos2d.demo-8eXKfwl_AllVCQTYMU1k6w==/lib/arm64/libcocos2djs.so (AppDelegate::applicationDidFinishLaunching()+196) (BuildId: 66f89312b8b4713f62437e75288c21f0298c4a30)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #06 pc 00000000009b3b14 /data/app/~~Hq7nJs3N25Ibh7hG11-zAg==/org.cocos2d.demo-8eXKfwl_AllVCQTYMU1k6w==/lib/arm64/libcocos2djs.so (cocos2d::Application::start()+32) (BuildId: 66f89312b8b4713f62437e75288c21f0298c4a30)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #07 pc 00000000009db728 /data/app/~~Hq7nJs3N25Ibh7hG11-zAg==/org.cocos2d.demo-8eXKfwl_AllVCQTYMU1k6w==/lib/arm64/libcocos2djs.so (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit+268) (BuildId: 66f89312b8b4713f62437e75288c21f0298c4a30)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #08 pc 000000000013ced4 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: b0b1b97e51dc36cf4439284e5ac2a281)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #09 pc 00000000001337e8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: b0b1b97e51dc36cf4439284e5ac2a281)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #10 pc 00000000001a8a94 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+228) (BuildId: b0b1b97e51dc36cf4439284e5ac2a281)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #11 pc 00000000003184a8 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: b0b1b97e51dc36cf4439284e5ac2a281)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #12 pc 000000000030e7d4 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: b0b1b97e51dc36cf4439284e5ac2a281)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #13 pc 000000000067fb1c /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+548) (BuildId: b0b1b97e51dc36cf4439284e5ac2a281)
2021-12-27 21:11:47.073 24375-24375/? A/DEBUG: #14 pc 000000000012d994 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: b0b1b97e51dc36cf4439284e5ac2a281)