I’m using cocos2d-x-3.17.2 engine and I getting crashes in crashlytics console for Android app.
Most of crashes (78%) are on devices with Jelly Bean (API 16)
Crashlytics stack trace is looking like this:
Crashed: Thread : SIGSEGV 0x0000000000000000
#00 pc 0x0
#01 pc 0x8ac19468 libMyGame.so
#02 pc 0x8ac192e9 libMyGame.so
#03 pc 0x8ab0533d libMyGame.so
#04 pc 0x8a7d9381 libMyGame.so
#05 pc 0xb6a32aa0 libdvm.so
#06 pc 0xb6a78408 libdvm.so
#07 pc 0xb6a61a51 libdvm.so
#08 pc 0xb6a8351d libdvm.so
#09 pc 0xb6add5a8 libdvm.so
#10 pc 0xb6a40ff6 libdvm.so
#11 pc 0xb6a3e1c0 libdvm.so
#12 pc 0xb6aa9139 libdvm.so
#13 pc 0xb6aa9246 libdvm.so
#14 pc 0xb6a8f5f0 libdvm.so
#15 pc 0xb768d6d0 libc.so
#16 pc 0xb7696295 libc.so
#17 pc 0xb6a8f300 libdvm.so
I created clean HelloWorld app and tried to run it on emulator (API16).
App can not start and crash with this log:
01-05 17:40:36.802 8985-8997/com.test.mytestgame A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 8997 (Thread-272)
01-05 17:40:36.822 8985-8985/com.test.mytestgame D/Cocos2dxActivity: onWindowFocusChanged() hasFocus=true
01-05 17:40:36.822 1457-1558/system_process I/ActivityManager: Displayed com.test.mytestgame/org.cocos2dx.cpp.AppActivity: +344ms
01-05 17:40:36.822 1982-1982/com.android.launcher W/IInputConnectionWrapper: showStatusIcon on inactive InputConnection
01-05 17:40:36.902 1142-1142/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-05 17:40:36.902 1142-1142/? I/DEBUG: Build fingerprint: ‘generic_x86/google_sdk_x86/generic_x86:4.1.2/MASTER/eng.wdu.20191213.040452:eng/test-keys’
01-05 17:40:36.902 1142-1142/? I/DEBUG: pid: 8985, tid: 8997, name: Thread-272 >>> com.test.mytestgame <<<
01-05 17:40:36.902 1142-1142/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
01-05 17:40:37.002 1457-1457/system_process D/dalvikvm: GREF has increased to 901
01-05 17:40:37.012 1142-1142/? I/DEBUG: eax 8ee78dcc ebx 8ee78dcc ecx 8d283008 edx 00000000
01-05 17:40:37.012 1142-1142/? I/DEBUG: esi 8d283008 edi 8d43304c
01-05 17:40:37.012 1142-1142/? I/DEBUG: xcs 00000073 xds 0000007b xes 0000007b xfs 00000000 xss 0000007b
01-05 17:40:37.012 1142-1142/? I/DEBUG: eip 00000000 ebp 8de9d818 esp 8de9d7ac flags 00010282
01-05 17:40:37.012 1142-1142/? I/DEBUG: backtrace:
01-05 17:40:37.012 1142-1142/? I/DEBUG: #00 pc 00000000
01-05 17:40:37.012 1142-1142/? I/DEBUG: #01 pc 0058a688 /data/data/com.test.mytestgame/lib/libMyGame.so (cocos2d::Renderer::setupBuffer()+88)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #02 pc 0058a549 /data/data/com.test.mytestgame/lib/libMyGame.so (cocos2d::Renderer::initGLView()+265)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #03 pc 0062b84a /data/data/com.test.mytestgame/lib/libMyGame.so (cocos2d::Director::setOpenGLView(cocos2d::GLView*)+618)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #04 pc 00351cf5 /data/data/com.test.mytestgame/lib/libMyGame.so (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit+309)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #05 pc 0001aaa0 /system/lib/libdvm.so (dvmPlatformInvoke+80)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #06 pc 00060408 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+232)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #07 pc 00049a51 /system/lib/libdvm.so (dvmCheckCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+65)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #08 pc 0006b51d /system/lib/libdvm.so (dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*)+317)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #09 pc 000c55a8 /system/lib/libdvm.so
01-05 17:40:37.012 1142-1142/? I/DEBUG: #10 pc 00028ff6 /system/lib/libdvm.so (dvmMterpStd(Thread*)+70)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #11 pc 000261c0 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+160)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #12 pc 00091139 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, char*)+601)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #13 pc 00091246 /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, …)+54)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #14 pc 000775f0 /system/lib/libdvm.so (interpThreadStart(void*)+752)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #15 pc 000106d0 /system/lib/libc.so (__thread_entry+240)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #16 pc 00019295 /system/lib/libc.so
01-05 17:40:37.012 1142-1142/? I/DEBUG: #17 pc 000244a8 /system/lib/libdvm.so (dvmMalloc(unsigned int, int)+152)
01-05 17:40:37.012 1142-1142/? I/DEBUG: stack:
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d76c 00000000
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d770 00000000
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d774 00000000
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d778 00000000
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d77c 00000000
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d780 b80e9ce8 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d784 8ee78d01 /data/data/com.test.mytestgame/lib/libMyGame.so
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d788 d1957901
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d78c 8e57a932 /data/data/com.test.mytestgame/lib/libMyGame.so
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d790 b80e9c90 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d794 00000000
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d798 b80e9c90 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d79c b80f3560 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7a0 b80f3560 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7a4 8ee78dcc /data/data/com.test.mytestgame/lib/libMyGame.so
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7a8 8de9d7d8 [stack:8997]
01-05 17:40:37.012 1142-1142/? I/DEBUG: #00 8de9d7ac 8e4846f9 /data/data/com.test.mytestgame/lib/libMyGame.so (cocos2d::Renderer::setupVBOAndVAO()+73)
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7b0 00000001
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7b4 8d43304c
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7b8 8de9d7e8 [stack:8997]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7bc 00000000
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7c0 b80e9c40 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7c4 b80f3560 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7c8 8ee78dcc /data/data/com.test.mytestgame/lib/libMyGame.so
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7cc 8e4dc69f /data/data/com.test.mytestgame/lib/libMyGame.so (cocos2d::Configuration::getInstance()+15)
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7d0 b80f3560 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7d4 8ee78dcc /data/data/com.test.mytestgame/lib/libMyGame.so
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7d8 8de9d848 [stack:8997]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7dc 8e53cca7 /data/data/com.test.mytestgame/lib/libMyGame.so (cocos2d::EventDispatcher::addEventListenerWithFixedPriority(cocos2d::EventListener*, int)+871)
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7e0 b80f3560 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7e4 b80e9c40 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d7e8 8ee78dcc /data/data/com.test.mytestgame/lib/libMyGame.so
01-05 17:40:37.012 1142-1142/? I/DEBUG: … …
01-05 17:40:37.012 1142-1142/? I/DEBUG: #01 8de9d820 8d283008
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d824 8de9d880 [stack:8997]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d828 8d283008
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d82c 8d283008
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d830 8ee78dcc /data/data/com.test.mytestgame/lib/libMyGame.so
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d834 8de9d890 [stack:8997]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d838 01e9d890
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d83c 8de9d880 [stack:8997]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d840 8de9d850 [stack:8997]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d844 8ee78dcc /data/data/com.test.mytestgame/lib/libMyGame.so
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d848 8de9d8c8 [stack:8997]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d84c 8e484549 /data/data/com.test.mytestgame/lib/libMyGame.so (cocos2d::Renderer::initGLView()+265)
01-05 17:40:37.012 1142-1142/? I/DEBUG: #02 8de9d850 8d283008
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d854 b80e9c40 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d858 ffffffff
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d85c b810ad28 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d860 b80e9c40 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d864 8d283008
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d868 8d283008
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d86c 8ee78dcc /data/data/com.test.mytestgame/lib/libMyGame.so
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d870 b810ad28 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d874 00000001
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d878 8d283008
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d87c 8e58d181 /data/data/com.test.mytestgame/lib/libMyGame.so (cocos2d::Ref::retain()+17)
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d880 00000021
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d884 00000018
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d888 b80e9c18 [heap]
01-05 17:40:37.012 1142-1142/? I/DEBUG: 8de9d88c 8e414562 /data/data/com.test.mytestgame/lib/libMyGame.so (cocos2d::Size::operator=(cocos2d::Size const&)+82)
01-05 17:40:37.012 1142-1142/? I/DEBUG: … …
01-05 17:40:37.052 1145-1145/? D/Zygote: Process 8985 terminated by signal (11)
Any help is appreciated,
Thanks!