my android crashes sometimes for some of the users which i am able to see google developer console.
Below is the crash log for the entire crash which i extracted out of google break pad. The crash clearly says that in the following function
js_cocos2dx_TextFieldTTF_textFieldWithPlaceHolder
but i am not able to uderstand as to why this is happening. I am currently using cocos2dx-js v 3.5.
Any help or idea as to why this crash happens would be highly useful.
Build fingerprint: 'motorola/falcon_bwaca/falcon_umts:4.4.4/KXB21.14-L1.50-1/1:user/release-keys'
pid: 30910, tid: 31705, name: Thread-6337 >>> in..test <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Stack frame #00 pc 00022160 /system/lib/libc.so (tgkill+12)
Stack frame #01 pc 000131b1 /system/lib/libc.so (pthread_kill+48)
Stack frame #02 pc 000133c5 /system/lib/libc.so (raise+10)
Stack frame #03 pc 000120fb /system/lib/libc.so
Stack frame #04 pc 00021a14 /system/lib/libc.so (abort+4)
Stack frame #05 pc 00c41251 libcocos2djs.so (__gnu_cxx::__verbose_terminate_handler()+228): Routine js_cocos2dx_TextFieldTTF_textFieldWithPlaceHolder(JSContext*, unsigned int, JS::Value*) at jsb_cocos2dx_auto.cpp:60716
Related
We're investigating on an app developed by another team a native Crash on Android related to HereMaps (HERE SDK Navigation edition, navigate-4.10.2.0.7878) with this stacktrace:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.mydomain.myapp <<<
backtrace:
#00 pc 0000000000051010 /apex/com.android.runtime/lib64/bionic/libc.so (abort+164)
#00 pc 0000000000e0143c /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 0000000000e0158c /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 0000000000e014f4 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 0000000000e01478 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 0000000000debfe4 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 000000000144cc84 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 00000000014035bc /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 00000000013fa668 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 000000000155cff0 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 00000000011273f8 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so (Java_com_here_sdk_navigation_VisualNavigator_disposeNativeHandle+480)
#00 pc 0000000000042020 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/oat/arm64/base.odex (art_jni_trampoline+96)
#00 pc 000000000020988c /apex/com.android.art/lib64/libart.so (nterp_helper+1948)
#00 pc 0000000000b6999c /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/oat/arm64/base.vdex (com.here.sdk.navigation.VisualNavigator.access$000)
#00 pc 0000000000209124 /apex/com.android.art/lib64/libart.so (nterp_helper+52)
#00 pc 0000000000b69974 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/oat/arm64/base.vdex (com.here.sdk.navigation.VisualNavigator$1.disposeNative)
#00 pc 0000000000073c6c /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/oat/arm64/base.odex (com.here.NativeBase$DisposableReference.dispose+156)
#00 pc 000000000020a0a0 /apex/com.android.art/lib64/libart.so (nterp_helper+4016)
#00 pc 00000000009a3834 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/oat/arm64/base.vdex (com.here.NativeBase.cleanUpQueue+26)
#00 pc 0000000000209124 /apex/com.android.art/lib64/libart.so (nterp_helper+52)
#00 pc 00000000009a380e /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/oat/arm64/base.vdex (com.here.NativeBase.access$100)
#00 pc 0000000000209124 /apex/com.android.art/lib64/libart.so (nterp_helper+52)
#00 pc 00000000009a37be /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/oat/arm64/base.vdex (com.here.NativeBase$DisposableReference.<init>+22)
#00 pc 000000000020a044 /apex/com.android.art/lib64/libart.so (nterp_helper+3924)
#00 pc 00000000009a37ca /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/oat/arm64/base.vdex (com.here.NativeBase$DisposableReference.<init>)
#00 pc 000000000020a748 /apex/com.android.art/lib64/libart.so (nterp_helper+5720)
#00 pc 00000000009a37fc /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/oat/arm64/base.vdex (com.here.NativeBase.<init>+28)
#00 pc 000000000020a044 /apex/com.android.art/lib64/libart.so (nterp_helper+3924)
#00 pc 00000000009ac7f8 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/oat/arm64/base.vdex (com.here.sdk.core.threading.RunnableImpl.<init>+10)
#00 pc 00000000002cdd64 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548)
#00 pc 00000000003d5660 /apex/com.android.art/lib64/libart.so (art::JNI<false>::CallNonvirtualVoidMethodV(_JNIEnv*, _jobject*, _jclass*, _jmethodID*, std::__va_list)+492)
#00 pc 00000000003d4ab4 /apex/com.android.art/lib64/libart.so (art::JNI<false>::NewObjectV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+736)
#00 pc 0000000000e0e858 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 0000000000e37fac /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 0000000000e37a5c /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 000000000140dad0 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 000000000144c5e8 /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 000000000144d2bc /data/app/~~yFKezl3wu05hiNZ1aIFJIQ==/com.mydomain.myapp-sfkAGrmiHUTbEivXLD8EKQ==/base.apk!libheresdk.so
#00 pc 00000000000b2fd0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264)
#00 pc 0000000000052834 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
EDIT:
After some refactoring and cleaning operations in our code we've reached a clean condition in which we are confident that there aren't any leak; we've used LeakCanary to investigate and remove all these ones, but the native crash it's still here.
So we've tried to return back to basis and we've cloned HEREMaps Navigate Samples from github and we've found that in Navigation Sample there isn't any native crash, but there is also an only activity with heremaps instance references which die within the entire application.
To replicate a similar use case then our we've added an activity before the MainActivity of the Sample and we've tried to launch the activity and return back to the first one to show what is the behaviour of the library in terms of resources releasing.
Only opening and closing MainActivity from a starting one doesn't have any native crash also because VisualNavigator (which seems to be the class with native crash in the backtrace) is retained by it's delegates (aka Listeners) => setupListeners() in NavigationExample. So we've also removed all listeners when MainActivity calls onDestroy and in this way we see always the same native crash as in our app, going back from MainActivity to starting one.
Note: to be able to always reproduce the native crash we use LeakCanary because the library force GC when MainActivity has been destroyed; if we remove it the GC operation is done randomly by the system.
Links:
our version of HEREMaps Navigation SDK sample modified to reproduce native crash on github
video of crash of the sample: https://youtube.com/shorts/edY-TRvWh3I
So the big question here is: have we implemented wrong HEREMaps SDK integration (and managing instance releasing) or this native crash is inside the library and has to be fixed from the library owner?
Try find a way to make the VisualNavigator persistent:
Using StopRendering() is fine but do not null the VisualNavigator.
I had to go through the same issue when cancelling the route too quickly, although it got way worse over the recent updates and just crashes when just stopping navigation and this fixes it.
In the HERE SDK developer's guide there is a chapter that shows how to stop navigation. It is recommended to call stopRendering(). In your example app, it seems you do not call visualNavigator.stopRendering() when the intermediate activity gets destroyed. Try to call it.
In the developer options menu of the device you can turn on "Don't keep activities" to simulate such scenarios.
My app crashes due to .so file.
I followed this link https://developer.android.com/ndk/guides/ndk-stack.html
Using the above link i am able to take stack-trace dump from log cat.
And from stack trace it shows me all functions name using ndk-stack tool.But i am unable to find out which method exactly caused my app to crash??
This is the log from my app stating fatal signal.
id: 26940, tid: 27543, name: Thread-579 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Its stating fault address 0x34.but using ndk-stack tool it shows all threads with function names but which one caused crash??
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 26940, tid: 27543, name: Thread-579 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155638 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_thread_create at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:570 (discriminator 5)
Stack frame #01 pc 0011973f /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:667 (discriminator 2)
Stack frame #02 pc 00155471 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:214 (discriminator 2)
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 28169, tid: 28422, name: Thread-618 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155638 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_thread_create at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:570 (discriminator 5)
Stack frame #01 pc 0011973f /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:667 (discriminator 2)
Stack frame #02 pc 00155471 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:214 (discriminator 2)
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 29519, tid: 30349, name: Thread-620 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155660 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_enter_critical_section at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:1094
Stack frame #01 pc 00119763 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:672
Stack frame #02 pc 00155499 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:218
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 10036, tid: 10963, name: Thread-755 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155660 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_enter_critical_section at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:1094
Stack frame #01 pc 00119763 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:672
Stack frame #02 pc 00155499 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:218
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 11338, tid: 11813, name: Thread-751 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155660 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_enter_critical_section at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:1094
Stack frame #01 pc 00119763 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:672
Stack frame #02 pc 00155499 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:218
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 12197, tid: 12384, name: Thread-801 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155660 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_enter_critical_section at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:1094
Stack frame #01 pc 00119763 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:672
Stack frame #02 pc 00155499 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:218
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 14140, tid: 14798, name: Thread-808 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155660 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_enter_critical_section at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:1094
Stack frame #01 pc 00119763 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:672
Stack frame #02 pc 00155499 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:218
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 15644, tid: 16119, name: Thread-839 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155660 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_enter_critical_section at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:1094
Stack frame #01 pc 00119763 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:672
Stack frame #02 pc 00155499 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:218
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
I too was looking for ways to trace SIGSEGV faults. I decided to do my own trace.
https://github.com/claytonfan/trace
Intended usage:
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include "trace.h
void sig_handler(int signo)
{
if( signo == SIGSEGV ) {
traceDump("Signal SIGSEGV");
}
// may handle other signo's
exit( signo );
}
int main(int argc, char **argv)
{
traceInit( "Prgram Test", &printf, 0 );
signal( SIGSEGV, sig_handler );
//
// and possibly other signals
//
// . . . main() logic . . .
return( 0 );
}
Hope that helps.
I'm working with this library (tess_two) for a few weeks and everything was good. But today Tesseract starts crashes with this error A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 31890 (Thread-13571). Nothing have changed from yesterday, same phone, same code. Crashes on method getUTF8Text()
Last logs:
10-31 11:31:05.879 31029-31890/ru.ckdigital.priceconverter E/OcrRecognizeAsyncTask: thresholding completed. converting to bmp. size:432x256
10-31 11:31:05.884 31029-31890/ru.ckdigital.priceconverter I/Leptonica(native): Writing 32bpp RGBA bitmap (w=432, h=256, stride=1728) from 1bpp Pix (wpl=14)
10-31 11:31:06.375 31029-31890/ru.ckdigital.priceconverter A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 31890 (Thread-13571)
backtrace from tombstone file:
backtrace:
#00 pc 0001764c /system/lib/libc.so (syscall+28)
#01 pc 0003fc6b /system/lib/libc.so (_ZL33__pthread_cond_timedwait_relativeP23pthread_cond_internal_tP15pthread_mutex_tPK8timespec+56)
#02 pc 0001f0b7 /system/lib/libhwui.so
#03 pc 00010139 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)
#04 pc 0005e2fb /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+70)
#05 pc 0003fe4b /system/lib/libc.so (_ZL15__pthread_startPv+30)
#06 pc 00019c85 /system/lib/libc.so (__start_thread+6)
suddenly when opening my app i got one crash and i uploaded the crash log below.But it happens sometime only not every time and every device.
Can anyone help me to understand the crash log and why its happening for sometimes and some devices. what is main reason for the below crash?
Revision: '14'
ABI: 'arm'
pid: 1834, tid: 8022, name: pool-3-thread-1 >>> com.example <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: java_array == null'
r0 00000000 r1 00001f56 r2 00000006 r3 00000000
r4 942bfdb8 r5 00000006 r6 00000002 r7 0000010c
r8 00000000 r9 b4e4f520 sl af17a800 fp 00000965
ip 00001f56 sp 942bf498 lr b6f26fd5 pc b6f4aeb4 cpsr 60070010
backtrace:
#00 pc 00037eb4 /system/lib/libc.so (tgkill+12)
#01 pc 00013fd1 /system/lib/libc.so (pthread_kill+52)
#02 pc 00014bef /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 0021d161 /system/lib/libart.so (art::Runtime::Abort()+160)
#06 pc 000a831b /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)
#07 pc 000b1a49 /system/lib/libart.so (art::JniAbort(char const*, char const*)+1060)
#08 pc 000b1fa5 /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+60)
#09 pc 001be127 /system/lib/libart.so (art::JNI::GetArrayLength(_JNIEnv*, _jarray*)+570)
#10 pc 00001171 /data/app/com.example-1/lib/arm/library.so (Java_com_example_value_encypt+48)
#11 pc 004986f9 /data/dalvik-cache/arm/data#app#com.example-1#base.apk#classes.dex
This kind of crash was happening to my app too. I could not figure it out through the logs. Once, I got hold of a device on which it crashed and found that it was crashing at a place where I was clearing the WebView cache. The problem was that the function to do that was deprecated, so in most of the phones it worked while in few others, it crashed. Since this was occurring probably even before Crashlytics got initialised, I was not getting any actual crash reports except from these kind of logs from Play Store.
What I would suggest is, check the device models from Play Store, and try to get a hold of one of these devices and try to see logcat crash report as it would point you to the actual problem.
since December 2015, we are experiencing a strange crash only on a limited number of devices running Android 6.0 and 6.0.1. Most of them are Nexus 5.
First the log of the crash pulled from the Play Store. Looking int art_method.cc, it looks like the mapping of a certain method to native code fails. Maybe it is compilation induced?
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/MMB29Q/2480792:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 18737, tid: 18737, name: omittedapp >>> com.omitteddomain.omittedapp <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'art/runtime/art_method.cc:245] Failed to find native offset for dex pc 0x58 in android.view.View com.omitteddomain.omittedapp.PlotWidget.a(android.view.ViewGroup, android.view.LayoutInflater, java.util.List)'
r0 00000000 r1 00004931 r2 00000006 r3 b6f24b7c
r4 b6f24b84 r5 b6f24b34 r6 00000001 r7 0000010c
r8 b4c3f800 r9 b4c3de44 sl b361d3db fp b4c23450
ip 00000006 sp beb2ca90 lr b6c93b61 pc b6c95f50 cpsr 40070010
backtrace:
#00 pc 00041f50 /system/lib/libc.so (tgkill+12)
#01 pc 0003fb5d /system/lib/libc.so (pthread_kill+32)
#02 pc 0001c30f /system/lib/libc.so (raise+10)
#03 pc 000194c1 /system/lib/libc.so (__libc_android_abort+34)
#04 pc 000174ac /system/lib/libc.so (abort+4)
#05 pc 00333971 /system/lib/libart.so (art::Runtime::Abort()+228)
#06 pc 000f45fb /system/lib/libart.so (art::LogMessage::~LogMessage()+2226)
#07 pc 000f08d1 /system/lib/libart.so (art::Barrier::~Barrier()+216)
#08 pc 0035b473 /system/lib/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+162)
#09 pc 00333a35 /system/lib/libart.so (art::Runtime::Abort()+424)
#10 pc 000f45fb /system/lib/libart.so (art::LogMessage::~LogMessage()+2226)
#11 pc 000ef88b /system/lib/libart.so (art::ArtMethod::ToNativeQuickPc(unsigned int, bool)+918)
#12 pc 00329055 /system/lib/libart.so (art::CatchBlockStackVisitor::VisitFrame()+180)
#13 pc 0033ccbd /system/lib/libart.so (art::StackVisitor::WalkStack(bool)+224)
#14 pc 0032910d /system/lib/libart.so (art::QuickExceptionHandler::FindCatch(art::mirror::Throwable*)+92)
#15 pc 0034a61d /system/lib/libart.so (art::Thread::QuickDeliverException()+140)
#16 pc 003fb7d9 /system/lib/libart.so (artThrowNullPointerExceptionFromCode+20)
#17 pc 00a15f01 /data/app/com.omitteddomain.omittedapp-1/oat/arm/base.odex (offset 0x59d000)
The only other occurrence of a similar crash (here Android ART: "Failed to find Dex offset for PC offset ...") has been reported to be potentially related to an infinite recursion issue. While we had an infinite recursion issue in the very same "a" method, it has been already fixed.
Some additional info:
The PlotWidget class in question display a chart to the user via a third party library. The cart view is configured inside the above "a" method. We changed the library multiple times with no difference in the outcome.
All of the third party libraries are up to date.
We have been able to test the app with the same data displayed to one of the afflicted user, without being able to reproduce the issue (being sensitive information, we were provided only the data strictly required to render the chart).
Attempts to reproduce the issue have failed with every combination of configuration/flavor, proguard enabled/disabled, zipalign yes/no, etc.
The app is compiled with Android Studio 1.5, with the latest SDK, targeting API 23. Before setting a lower target API and release an useless update for the umpteenth time, I'd like to know is someone experienced and solved similar issues.
Any advice is welcome.