Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App randomly crashes with A/libc: fatal signal 11

Tags:

android

libc

so my app started randomly crashing with Fatal Signal 11 (on random activities, some seem to do it more often than other but I haven't found a pattern yet). I have no idea why, it didn't do it before and my code didn't change that much and mainly, the same code works fine for my colleague. what I tired to do to fix it:

  • Rebooting my machine
  • Triple checking everything in my code
  • running gradlew clean and rebuilding everything
  • Checking out an older version from VCS (that I'm sure worked)
  • Checking out an older version from VCS to a completely new project
  • Using different versions of android (4.1-4.3)
  • Using different emulators (regular avd & genymotion)

Quite frankly I'm all out of ideas, there was no change on my machine (not even windows updates), no major change in the code (and I tried reverting just to be safe), no change in JVM, Android Studio didn't have an update and the error is completely random.

thanks for any ideas...

the crash report:

.debug A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x97e2c9c4 (code=2), thread 1768 (.smartpos.debug)
11-25 12:37:20.092      103-103/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-25 12:37:20.092      103-103/? I/DEBUG﹕ Build fingerprint: 'generic/vbox86p/vbox86p:4.3/JLS36G/eng.buildbot.20131113.022613:userdebug/test-keys'
11-25 12:37:20.092      103-103/? I/DEBUG﹕ Revision: '0'
11-25 12:37:20.092      103-103/? I/DEBUG﹕ pid: 1768, tid: 1768, name: .smartpos.debug  >>> .debug <<<
11-25 12:37:20.092      103-103/? I/DEBUG﹕ signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 97e2c9c4
11-25 12:37:20.196      103-103/? I/DEBUG﹕ eax 97e2c034  ebx b6191ccc  ecx b8aea200  edx 00000264
11-25 12:37:20.200      103-103/? I/DEBUG﹕ esi a56b0b58  edi a56b0b58
11-25 12:37:20.200      103-103/? I/DEBUG﹕ xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000  xss 0000007b
11-25 12:37:20.200      103-103/? I/DEBUG﹕ eip b60ae6fc  ebp 97e2c000  esp bfe452e0  flags 00210282
11-25 12:37:20.200      103-103/? I/DEBUG﹕ backtrace:
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #00  pc 000de6fc  /system/lib/libdvm.so (dvmResolveString+124)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #01  pc 0002a3d7  /system/lib/libdvm.so
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #02  pc 00277767  /dev/ashmem/dalvik-heap (deleted)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #03  pc 0003b322  /system/lib/libdvm.so (dvmMterpStd(Thread*)+66)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #04  pc 000369e9  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+217)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #05  pc 000b9f62  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+1634)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #06  pc 000ce9e0  /system/lib/libdvm.so (Dalvik_java_lang_reflect_Method_invokeNative(unsigned int const*, JValue*)+288)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #07  pc 00173058  /system/lib/libdvm.so
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #08  pc 00005eff  <unknown>
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #09  pc 0003b322  /system/lib/libdvm.so (dvmMterpStd(Thread*)+66)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #10  pc 000369e9  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+217)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #11  pc 000bacf7  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, char*)+759)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #12  pc 0007774d  /system/lib/libdvm.so (CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, char*)+109)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #13  pc 0005d3ea  /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+42)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #14  pc 0005eaac  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+924)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #15  pc 00001017  /system/bin/app_process (main+567)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #16  pc 0000cedc  /system/lib/libc.so (__libc_init+108)
11-25 12:37:20.200      103-103/? I/DEBUG﹕ #17  pc 00000a91  /system/bin/app_process (_start+97)

update:

it seems the problem is with the x86 images (both AVD and genymotion) if I use arm image everything seems to work. I'll try to dig in deeper and submit a bug report when I have more time. for now it seems I have to be patient with the slow slow arm images :/

like image 570
ciny Avatar asked Nov 26 '22 08:11

ciny


1 Answers

be careful if you are using gson and you serialize android.location.Location objects, I got this error and I fixed it replacing android.location.Location with my on Location wrapper.

UPDATE: Jun 3rd 2019

Something like:

data class Location(val latitude: Double, val longitude: Double)
like image 156
epool Avatar answered Feb 07 '23 16:02

epool