I released an application and I get these native crashes especially from Galaxy J2(90% of crashes). Users say when App starts it is an immidiate crash. So far I got 25 crashes and I cant even find what is wrong to solve. I am unable to debug on Galaxy J2 but every device that I run the application works with no problem. Here is crash report.
Revision: '4'
ABI: 'arm'
pid: 4110, tid: 4110, name: sth.someappname >>> com.sth.someappname <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '* Assertion at /Users/builder/data/lanes/3511/b5fafb24/source/mono/mono/mini/method-to-ir.c:12777, condition `mono_arch_opcode_supported (OP_ATOMIC_STORE_I4)' not met
'
r0 00000000 r1 0000100e r2 00000006 r3 00000000
r4 b6f14e38 r5 00000006 r6 00000002 r7 0000010c
r8 b4542cac r9 00000000 sl b47709b8 fp bef19930
ip 0000100e sp bef198d8 lr b6d67e79 pc b6d8bb5c cpsr 600e0010
backtrace:
#00 pc 0003bb5c /system/lib/libc.so (tgkill+12)
#01 pc 00017e75 /system/lib/libc.so (pthread_kill+52)
#02 pc 00018a8b /system/lib/libc.so (raise+10)
#03 pc 00015325 /system/lib/libc.so (__libc_android_abort+36)
#04 pc 00012fb0 /system/lib/libc.so (abort+4)
#05 pc 00291cdc /data/app/com.sth.someappname-1/lib/arm/libmonosgen-2.0.so
Any idea?
I got rid of this issue by removing thread.sleep() function from splash screen. Then I decided to remove all of them from project.
Related
My game facing this crash sometime in particular Samsung Device, and i dint know what to do for this type of problem. I have already import app compatibility v7 in my project.
Build fingerprint: 'samsung/grandppltedtvvj/grandppltedtv:6.0.1/MMB29T/G532MTVJU1AQB1:user/release-keys'
Revision: '5'
ABI: 'arm'
pid: 22325, tid: 22341, name: GLThread 42320 >>> com.abc.candy <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
r0 00000000 r1 00000000 r2 00000000 r3 00000000
r4 00000001 r5 00000001 r6 00000001 r7 00000001
r8 00000001 r9 b31a1f00 sl 00000000 fp b2f402bc
ip b2f3fec4 sp b2f402a8 lr 9edd50d4 pc 9ee82900 cpsr 200f0010
backtrace:
#00 pc 0062e900 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d3Ref6retainEv+20)
#01 pc 005810d0 /data/app/com.abc.candy2-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d6Sprite14setSpriteFrameEPNS_11SpriteFrameE+92)
#02 pc 00580fc4 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d6Sprite14setSpriteFrameERKSs+616)
#03 pc 0041c23c /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN9GameScene15generateSpecialEP5CandySsii+844)
#04 pc 00425e18 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so
#05 pc 00432cfc /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so
#06 pc 004dba4c /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZNKSt8functionIFvvEEclEv+60)
#07 pc 004dabec /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d8CallFunc7executeEv+204)
#08 pc 004dab14 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d8CallFunc6updateEf+40)
#09 pc 004df2bc /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d8Sequence6updateEf+1140)
#10 pc 004de3a8 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d14ActionInterval4stepEf+584)
#11 pc 0073c4f4 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d13ActionManager6updateEf+244)
#12 pc 00603000 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZZN7cocos2d9Scheduler14scheduleUpdateINS_13ActionManagerEEEvPT_ibENKUlfE_clEf+36)
#13 pc 00604b9c /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZNSt17_Function_handlerIFvfEZN7cocos2d9Scheduler14scheduleUpdateINS1_13ActionManagerEEEvPT_ibEUlfE_E9_M_invokeERKSt9_Any_dataf+60)
#14 pc 004ea360 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZNKSt8functionIFvfEEclEf+88)
#15 pc 0063aeac /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d9Scheduler6updateEf+172)
#16 pc 005fe90c /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d8Director9drawSceneEv+160)
#17 pc 00602d74 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d19DisplayLinkDirector8mainLoopEv+136)
#18 pc 004638a0 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeRender+40)
#19 pc 006da6a5 /data/app/com.abc.candy-1/oat/arm/base.odex (offset 0x512000)
Build fingerprint: 'samsung/j23gdd/j23g:5.1.1/LMY48B/J200HXXU0APK1:user/release-keys'
Revision: '2'
ABI: 'arm'
pid: 22292, tid: 22310, name: GLThread 3374 >>> com.abc.candy <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x20
r0 9f21dc00 r1 00000078 r2 00000078 r3 00000000
r4 a3396b5c r5 a2dcbd5c r6 9f21dc00 r7 9f280184
r8 010f03ce r9 b4428400 sl 00000000 fp a264e854
ip 9f21dc00 sp a264e800 lr a2c68d48 pc a2c68b4c cpsr 800f0010
All this crash comes in Samsung device not in other device.
You can check the exact line number where crash occurs by using following :-
When you get errors like this on the LogCat, they are saved on $PROJECT_PATH/obj/local/armeabi where $PROJECT_PATH is the path to your cocos2d-x android project. To symbolicate the messages to something understandable, you can use the ndk-stack tool.
Open up the Terminal (or Cygwin, not sure though) and type in
cd $ANDROID_NDK
adb logcat | ./ndk-stack -sym $PROJECT_PATH/obj/local/armeabi
where:
$ANDROID_NDK is the path to your android NDK
$PROJECT_PATH is the path to your cocos2d-x android project
my Android vector-drawing application is uncommonly crashing somewhere in native code. I cannot catch the crash with Java try-catch block, I can see it only in the Google Play Developer console in the "Crashes and ANR's" section.
Here is the trace from the console:
Build fingerprint: 'samsung/kltexx/klte:5.0/LRX21T/G900FXXU1BOJ1:user/release-keys'
Revision: '14'
ABI: 'arm'
pid: 31153, tid: 31153, name: ... >>> ... <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x65eb3cf4
r0 65eb3cf4 r1 a75f2764 r2 7fffffff r3 be8c15ec
r4 af56a838 r5 7fffffff r6 be8c1570 r7 b4efac6c
r8 b4efac6c r9 be8c15c0 sl 00000000 fp be8c1590
ip b4efac6c sp be8c1528 lr a75f2760 pc b5a60ae6 cpsr a0000030
backtrace:
#00 pc 000ecae6 /system/lib/libskia.so (SkRegion::Oper(SkRegion const&, SkRegion const&, SkRegion::Op, SkRegion*)+861)
#01 pc 000ecc67 /system/lib/libskia.so (SkRegion::op(SkRegion const&, SkIRect const&, SkRegion::Op)+28)
#02 pc 000969df /system/lib/libandroid_runtime.so
#03 pc 00ba8897 /system/framework/arm/boot.oat
Can anyone help me? How can I locate the problematic place in my code?
Thank you!
The reason of the crash was my own fault:
I'm using the android.graphics.Region class in my application. I'm calling the Region.op() method and a problem was that I was calling the method from two different threads.
These operations aren't thread-safe, so that was the reason of the crashes.
Environment: Cocos2d-x 3.9, Android Studio priview 2.0, ndk r10e (64-bit), win10(64bit).
Cocos-console seems to use NDK to compile all my cpp component into one libcocos2dcpp.so file. I managed to get my app compiled. It ran well on win32, but crashed on Android.
I/DEBUG: Build fingerprint: 'samsung/h3gzc/hlte:5.0/LRX21V/N9006ZCUGOH2:user/release-keys'
I/DEBUG: Revision: '8'
I/DEBUG: ABI: 'arm'
I/DEBUG: pid: 2561, tid: 2561, name: Zzzen.YourWorld >>> com.github.Zzzen.YourWorld <<<
I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
I/DEBUG: r0 b4f512b0 r1 1fffffff r2 2e7e0d8d r3 b4f512b0
I/DEBUG: r4 00000043 r5 b4f18228 r6 a20f99e4 r7 00000000
I/DEBUG: r8 b4f07800 r9 b4efac64 sl bef10b58 fp bef10984
I/DEBUG: ip a275abd0 sp bef10978 lr a20f9a10 pc 00000000 cpsr 600f0010
I/DEBUG: #00 pc 00000000 <unknown>
I/DEBUG: #01 pc 00352a0c /data/app/com.github.Zzzen.YourWorld-1/lib/arm/libcocos2dcpp.so (JNI_OnLoad+40)
I/DEBUG: #02 pc 001d5357 /system/lib/libart.so (art::JavaVMExt::LoadNativeLibrary(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, art::Handle<art::mirror::ClassLoader>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)+1478)
I/DEBUG: #03 pc 001fd061 /system/lib/libart.so (art::Runtime_nativeLoad(_JNIEnv*, _jclass*, _jstring*, _jobject*, _jstring*)+548)
I/DEBUG: #04 pc 00019811 /system/framework/arm/boot.oat
So I used addr2line to see what's at 00352a0c. However, It just showed JNI_OnLoad. Should I add assertions after creating a sprite in case Sprite::create may return nullptr?
I often use Cocos2d-x 's log function to find out where the app crash.
(e.g. log("sprite began... x = %f, y = %f", locationInNode.x, locationInNode.y);)
You can filter the log messages by 'cocos2d' in Android studio to see all logs about your cocos2d-x app.
My app crashes upon startup whenever I test it on phones that have the Snapdragon 410 chipset. I have dozens of reports of this happening to end-users and all of them so far come have from devices that use the Snapdragon 410 chipset. I went out and purchased two Snapdragon 410 phones (Moto E, LG Leon) and both of them exhibit the crash. So far, testing on other devices sees no crash occur.
Here is the log:
Fatal signal 6 (SIGABRT), code -6 in tid 9447 (com.myapp)
Build fingerprint: 'lge/c50_tmo_us/c50:5.1.1/LMY47V/151671737ee07:user/release-keys'
Revision: '8'
ABI: 'arm'
pid: 9447, tid: 9447, name: com.myapp >>> com.myapp <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
r0 00000000 r1 000024e7 r2 00000006 r3 00000000
AM write failure (32 / Broken pipe)
r4 b6f70e38 r5 00000006 r6 0000000b r7 0000010c
r8 a10724a1 r9 becdf520 sl 00100c12 fp 00100c0e
ip 000024e7 sp becdf498 lr b6df804d pc b6e1f648 cpsr 600d0010
backtrace:
#00 pc 0003b648 /system/lib/libc.so (tgkill+12)
#01 pc 00014049 /system/lib/libc.so (pthread_kill+52)
#02 pc 00014c67 /system/lib/libc.so (raise+10)
#03 pc 000114e1 /system/lib/libc.so (__libc_android_abort+36)
#04 pc 0000f72c /system/lib/libc.so (abort+4)
#05 pc 00049fbd /system/lib/libc++.so
#06 pc 000491b5 /system/lib/libc++.so (__clear_cache+32)
#07 pc 00002a21 /data/data/bn.ereader/files/libcrashreport.so (deleted)
Tombstone written to: /data/tombstones/tombstone_00
I have isolated the crash trigger to an external library jar which I bundle with my app; when I remove the external jar (and my code that invokes it by calling externalLibrary.init()), the crash does not occur. Since I do not have the source code for the external jar, I do not yet know the root cause of the problem.
The framework's crash handler plops a tombstone, but my device is not rooted and I haven't been able to recover the tombstone yet. I might try rooting the device to make the tombstone pluckable.
Some users of my game that are trying to play it in a Samsung Galaxy Note 4 updated to Android Lollipop 5.0 are experiencing a game crash at startup:
Build fingerprint: 'samsung/trlteuc/trlteatt:5.0.1/LRX22C/N910AUCU1COC2:user/release-keys'
Revision: '12'
ABI: 'arm'
pid: 20911, tid: 20927, name: GLThread 270611 >>> com.mangoprotocol.psychotic.mechanika <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
r0 00000000 r1 000051bf r2 00000006 r3 00000000
r4 b39ffdb8 r5 00000006 r6 00000002 r7 0000010c
r8 a0e1a140 r9 00000000 sl 00000001 fp aa934c40
ip 000051bf sp b39ff830 lr b6e8cff5 pc b6eb0998 cpsr 600b0010
backtrace:
#00 pc 00037998 /system/lib/libc.so (tgkill+12)
#01 pc 00013ff1 /system/lib/libc.so (pthread_kill+52)
#02 pc 00014c0f /system/lib/libc.so (raise+10)
#03 pc 00011531 /system/lib/libc.so (__libc_android_abort+36)
#04 pc 0000fcbc /system/lib/libc.so (abort+4)
#05 pc 00001259 /system/lib/libstdc++.so
#06 pc 00000afb /system/lib/libstdc++.so (__cxa_pure_virtual+6)
#07 pc 000e4595 /system/vendor/lib/egl/libGLESv2_adreno.so (EsxGlObject::DecRefCount(EsxContext*)+28)
#08 pc 000b4b67 /system/vendor/lib/egl/libGLESv2_adreno.so (EsxContext::GlUseProgram(unsigned int)+150)
#09 pc 000e02d3 /system/vendor/lib/egl/libGLESv2_adreno.so (EsxGlApiParamValidate::GlUseProgram(EsxDispatch*, unsigned int)+34)
#10 pc 000abd75 /system/vendor/lib/egl/libGLESv2_adreno.so (glUseProgram+44)
#11 pc 002e9887 /data/dalvik-cache/arm/data#app#com.mangoprotocol.psychotic.mechanika-1#base.apk#classes.dex
I don't know if this is related to the OpenGL ES driver for the GPU (Adreno 420) if it is a more general issue with the OS (Android Lollipop 5.0), or if it has something to do with libGDX (the game framework I'm using). What I know is that the games works like a charm in a Nexus 6 (also with Adreno 420) updated to Lollipop 5.1.
Do you have any idea about how to solve this issue or how to work around it?