30

I am getting this weird crash on android

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.oimvo.discdj <<<

backtrace:
  #00  pc 000000000001d050  /data/app/com.oimvo.discdj-2/lib/arm64/libavfilter.7.11.101.so (av_fastresampler_resample_s16+1944)
  #01  pc 000000000001c930  /data/app/com.oimvo.discdj-2/lib/arm64/libavfilter.7.11.101.so (av_fastresampler_resample_s16+120)

and another similar crash

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.oimvo.discdj <<<

backtrace:
  #00  pc 0000000000083770  /system/lib/egl/libGLES_mali.so
  #01  pc 0000000000096ac0  /system/lib/egl/libGLES_mali.so
  #02  pc 0000000000095878  /system/lib/egl/libGLES_mali.so
  #03  pc 0000000000095f14  /system/lib/egl/libGLES_mali.so
  #04  pc 000000000003c870  /system/lib/egl/libGLES_mali.so
  #05  pc 000000000003cbc8  /system/lib/egl/libGLES_mali.so
  #06  pc 000000000005df6c  /system/lib/egl/libGLES_mali.so (glDeleteFramebuffers+68)
  #07  pc 0000000000021b2b  /system/lib/libhwui.so
  #08  pc 000000000005f873  /system/lib/libhwui.so
  #09  pc 00000000000236ab  /system/lib/libhwui.so
  #10  pc 000000000002334b  /system/lib/libhwui.so
  #11  pc 0000000000024d0f  /system/lib/libhwui.so
  #12  pc 0000000000028105  /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+80)
  #13  pc 000000000000e349  /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+140)
  #14  pc 0000000000064229  /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+80)
  #15  pc 0000000000047063  /system/lib/libc.so (_ZL15__pthread_startPv+22)
  #16  pc 0000000000019ded  /system/lib/libc.so (__start_thread+6)

both are - signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)

first crash is happening in my native code, second is happening somewhere else

I have corrected all possible array map errors, and currently i don't have any errors of mapping

BUT HERE I FIND THE PID AND TID "0" ZERO WHICH IS SOMETHING I CANT UNDERSTAND

Please someone explain me why is the pid and tid 0 reported in the crash, i did checked the functions for any array mapping errors, but i guess here the error is related to process/thread id.

I checked all the signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) questions on stackoverflow, i also encountered SEGV_MAPERR earlier but it was related to some fault address, but here this one is different, i get no fault address here i only suspect that the pid/tid maybe causing this error.

Any help/suggestion will be great. Thanks in advance

Edit: i just now noted that i have other crashes too with pid: 0, tid: 0 and maybe most android 7.0,7.1, Please let me know if someone needs more error logs, i am still confused why the pid and tid is zero

Edit: Please try to understand the question before answering, and let me know if someone needs more info

Arnab
  • 4,216
  • 2
  • 28
  • 50
Diljeet
  • 1,896
  • 20
  • 24
  • 3
    pid and tid cannot be zero, it just means the crash trashed the stack/heap and cannot be accurately reported. Native crashes are tricky, more info the better, debug the hell out of it ;O) Is it repeatable ? Narrow down the offending code. Try to give us a minimal example...something I did b4[here](https://stackoverflow.com/questions/41825305/how-to-debug-segv-accerr/41885866#41885866) – Jon Goodwin Jan 23 '18 at 23:05
  • @JonGoodwin Actually its repeatable, i find similar crashes, but with no useful crash reports. i read your answer in earlier searches and managed to remove SEGV_ACCERR and all fault addr SEGV_MAPERR errors, but i am unable to resolve this error neither able to spot it down for debugging – Diljeet Jan 24 '18 at 10:10
  • 1
    You can narrow it down by putting lots of log messages in your code, when it crashes you will know roughly where it was and can thus narrow it down. Or attach a debugger. – Jon Goodwin Jan 24 '18 at 13:25
  • @JonGoodwin You are right, but all the crashes are from android playstore. I have 5 devices in my house but non of them produces these crashes. – Diljeet Jan 24 '18 at 15:38
  • @JonGoodwin I sure know that i can't stop crashes, but surely i have to adapt to all possible device types and avoid practices may generate crashes. Thank for the help, i think there is no solution to this question. – Diljeet Jan 24 '18 at 18:16
  • I understand when people don't want to share their code, but I'm guessing you don't have *too much native code*. Try to pare it down to the bare essentials and it can be reviewed. Try to look for tools like [JniHelpers](https://github.com/spotify/JniHelpers) to make your code better. – Jon Goodwin Jan 25 '18 at 00:17
  • Maybe You are using in your app 3rd Party libraries/y(f.e. Realm), and them have bugs in native code – Wrobel Jan 26 '18 at 07:04
  • JonGoodwin i sure will try JniHelpers. @Wrobel i use native libraries, but i use my personally coded program, which in my mind should never result this error(i checked several times) but still it crashes – Diljeet Jan 27 '18 at 09:29
  • 1
    Post your gradle compile files in the question. In my case i was using third party video chat library which causes this issue. – Rahul Khurana Jan 29 '18 at 10:46
  • @RahulKhurana yes i use external library, but i compiled it myself and also wrote its code, i use pre-compiled libraries not based on gradle compilation. – Diljeet Jan 29 '18 at 17:02
  • 1
    Ohkk can you name them so that it will be easy to track them and for which purpose you are using ? – Rahul Khurana Jan 30 '18 at 03:51
  • @RahulKhurana i use ffmpeg all libraries for audio decoding – Diljeet Jan 30 '18 at 09:57
  • ohkk double check all the libraries and check if there is update available. – Rahul Khurana Jan 30 '18 at 10:08
  • Well i used the latest version 3.4.1 – Diljeet Jan 30 '18 at 10:17
  • @Diljeet I too using ffmpeg in my custom audio framework and getting second crash mostly in Samsung devices,m searching solution for long time, – immutable Feb 12 '18 at 07:24
  • @immutable I have given up on these crashes, i am currently ignoring crashes and focusing on completing the remaining features of the app. We know that we wrote error free code, but devices sometimes have bugs (because i never have any of these crashes on my devices). One advice - check the non automatic error submissions, the error logs of user submitted errors are more detailed. – Diljeet Feb 25 '18 at 15:12
  • 1
    I am using Android SoundPool, no ffmpeg etc, and also have this weird error logs – Wrobel Apr 20 '18 at 09:55
  • Any solution ??? – VMS Dec 31 '20 at 10:28
  • @VMS No. Sorry its still the same situation – Diljeet Jan 02 '21 at 14:01

0 Answers0