signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault a

2019-01-26 19:48发布

问题:

My app has been crashing randomly with signal 11. I was able to get my hands on tombstone file from emulator but I am not able to understand what is wrong with my app. I have gone through many posts here with the same error but haven't found a working solution yet. I am attaching my stack-trace file here please help me understand the problem and how can I fix it.

Here is logcat from the crash

                --------- beginning of crash
12-15 21:09:25.003 2865-2875/in.myapp.dev A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x7f4485ff1820 in tid 2875 (FinalizerDaemon)
12-15 21:09:25.006 2865-2878/in.myapp.dev I/art: Background partial concurrent mark sweep GC freed 35304(2MB) AllocSpace objects, 13(531KB) LOS objects, 22% free, 13MB/17MB, paused 355us total 119.765ms
12-15 21:09:25.180 1128-1128/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-15 21:09:25.180 1128-1128/? I/DEBUG: Build fingerprint: 'Android/sdk_google_phone_x86_64/generic_x86_64:5.1.1/LMY48X/3287191:userdebug/test-keys'
12-15 21:09:25.180 1128-1128/? I/DEBUG: Revision: '0'
12-15 21:09:25.180 1128-1128/? I/DEBUG: ABI: 'x86_64'
12-15 21:09:25.180 1128-1128/? I/DEBUG: pid: 2865, tid: 2875, name: FinalizerDaemon  >>> in.myapp.dev <<<
12-15 21:09:25.180 1128-1128/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7f4485ff1820
12-15 21:09:25.392 1128-1128/? I/DEBUG:     rax 00007f249892b630  rbx 0000000400000004  rcx 0000000000000000  rdx 00007f2499620520
12-15 21:09:25.392 1128-1128/? I/DEBUG:     rsi 0000000000000001  rdi 00007f249cf462c0
12-15 21:09:25.392 1128-1128/? I/DEBUG:     r8  0000000000000055  r9  00007f249892b300  r10 00007f249892b630  r11 00007f249892b641
12-15 21:09:25.393 1128-1128/? I/DEBUG:     r12 00007f249892b630  r13 00007f2485ff1800  r14 0000000000000001  r15 00000000132baf60
12-15 21:09:25.393 1128-1128/? I/DEBUG:     cs  0000000000000033  ss  000000000000002b
12-15 21:09:25.393 1128-1128/? I/DEBUG:     rip 00007f249cf2501a  rbp 00007f2499620520  rsp 00007f249892b630  eflags 0000000000010202
12-15 21:09:25.393 1128-1128/? I/DEBUG: backtrace:
12-15 21:09:25.393 1128-1128/? I/DEBUG:     #00 pc 000000000004501a  /system/lib64/libbinder.so (android::Parcel::releaseObjects()+58)
12-15 21:09:25.393 1128-1128/? I/DEBUG:     #01 pc 000000000004510c  /system/lib64/libbinder.so (android::Parcel::freeDataNoInit()+44)
12-15 21:09:25.393 1128-1128/? I/DEBUG:     #02 pc 00000000000f1c40  /system/lib64/libandroid_runtime.so
12-15 21:09:25.393 1128-1128/? I/DEBUG:     #03 pc 0000000000021de9  /data/dalvik-cache/x86_64/system@framework@boot.oat
12-15 21:09:26.256 1128-1128/? I/DEBUG: Tombstone written to: /data/tombstones/tombstone_00
12-15 21:09:26.470 1556-4425/system_process W/ActivityManager:   Force finishing activity 1 in.myapp.dev/com.myapp.dev.ui.activities.MainLandingActivity
12-15 21:09:26.479 1556-1577/system_process D/Atlas: Validating map...
12-15 21:09:26.523 1556-1570/system_process I/WindowState: WIN DEATH: Window{1762341d u0 in.myapp.dev/com.myapp.dev.ui.activities.SplashActivity}
12-15 21:09:26.547 1556-1571/system_process I/WindowState: WIN DEATH: Window{63c6f2e u0 in.myapp.dev/com.myapp.dev.ui.activities.MainLandingActivity}
12-15 21:09:26.551 1556-2114/system_process I/WindowState: WIN DEATH: Window{ba26c8d u0 in.myapp.dev}
12-15 21:09:26.552 1556-1838/system_process I/WindowState: WIN DEATH: Window{97dfeaf u0 in.myapp.dev/com.myapp.dev.ui.activities.OrganisationActivity}
12-15 21:09:26.555 1135-1135/? I/Zygote: Process 2865 exited due to signal (11)

Here is the link to tombstone file. Drive link

回答1:

So for me, the problem was parsing Google's Location object with Gson. I created my own SimpleLocation object and it solved the problem. Google's Location object was throwing random Signal 11 error and crashing randomly.

Here is a link to similar problem with better explanation https://github.com/e-mission/e-mission-data-collection/issues/49