Skip to content Skip to sidebar Skip to footer

How To Get Crash Point In Java Code

My application has android-support-v4.jar in /libs only. I do not use other library. My application is crashing with SIGNAL 11 error. I want to use addr2line utility of android-ndk

Solution 1:

You can't get the stack trace for code written in the Java programming language out of a native stack trace in the Dalvik VM, for the simple reason that Dalvik uses different pieces of memory for the native and managed stacks. (I believe it's possible to get it from Art crashes, because Art uses a shared stack, but can't say for certain.)

The fault address suggests a null pointer dereference, and the call through jniGetFDFromFileDescriptor() indicates file activity. You can see the source code for that method here. I would guess it's calling GetIntField on a null object, which would match with your suspicions.

Enabling CheckJNI may help -- if the JNI checker spots a problem, it will usually dump the current thread's stack trace to the log file before killing the VM.

Post a Comment for "How To Get Crash Point In Java Code"