Error A/libc: Fatal signal 11 (SIGSEGV) at 0x00000018 (code=1) in SkPath

1.3k views Asked by At

I am getting the following error when I tap on a button in my application:

A/libc: Fatal signal 11 (SIGSEGV) at 0x00000018 (code=1), thread 11024
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000018
eax 00000000  ebx b7d117e8  ecx 00000001  edx b84242d8
esi b84242d8  edi 00000000
xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000  xss 0000007b
eip b7b92bbc  ebp bf844ca8  esp bf844c70  flags 00010286
backtrace:
#00  pc 000acbbc  /system/lib/libskia.so (SkPath::SkPath(SkPath const&)+76)
#01  pc 000ae775  /system/lib/libandroid_runtime.so (android::SkPathGlue::init2(_JNIEnv*, _jobject*, SkPath*)+53)
#02  pc 0001aaa0  /system/lib/libdvm.so (dvmPlatformInvoke+80)
#03  pc 00060408  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+232)
#04  pc 00049a51  /system/lib/libdvm.so (dvmCheckCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+65)
#05  pc 000c53c8  /system/lib/libdvm.so
#06  pc 00028ff6  /system/lib/libdvm.so (dvmMterpStd(Thread*)+70)
#07  pc 000261c0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+160)
#08  pc 00090ada  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+938)
#09  pc 000a1a5a  /system/lib/libdvm.so (Dalvik_java_lang_reflect_Method_invokeNative(unsigned int const*, JValue*)+282)
#10  pc 000c53c8  /system/lib/libdvm.so
#11  pc 00028ff6  /system/lib/libdvm.so (dvmMterpStd(Thread*)+70)
#12  pc 000261c0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+160)
#13  pc 00091139  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, char*)+601)
#14  pc 0006231a  /system/lib/libdvm.so (CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, char*)+106)
#15  pc 000421f4  /system/lib/libdvm.so (Check_CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, char*)+436)
#16  pc 00051dba  /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+42)
#17  pc 00053029  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+969)
#18  pc 000011f7  /system/bin/app_process (main+599)
#19  pc 00016e7f  /system/lib/libc.so (__libc_init+95)

This is all I get, and there is not method call in my application in the stacktrace. So it's very hard to figure out what's causing this crash. There are lot of stackoverflow questions similar to this, but not exactly this.

I am documenting this here so it could help someone who gets this exact error.

1

There are 1 answers

0
Henry On BEST ANSWER

If you look closely, the error occurs in the native library in SkPath in Skia library. That was my first and only clue. So I put a debug point on every statement that referenced a Path. And I finally figured out what was causing this issue. It's the below line:

final Path path = new Path(oldPath);

This was crashing because oldPath was null. Hence the crash.