Android ART loading dex failure

428 Views Asked by At
Build fingerprint: GiONEE/F103/GiONEE_GBL7319:5.0/LRX21M/1433132360:user/release-keys
pid: 28431, tid: 28459  >>> com.lily.web <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr d3b0f000
  #00  pc 0x0  /data/data/***/jars_fusion.dex (???)
  #01  pc 0xa1eb7  /system/lib/libart.so (???)
  #02  pc 0xb1cc8  [heap] (???)
java.lang.Throwable: 
******* Java stack for JNI crash *******
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.lily.web.DexLoader.invokeStaticMethod(SourceFile:70)
    at com.lily.web.t.<init>(SourceFile:77)
    at com.lily.web.d.o(SourceFile:250)
    at com.lily.web.e$2.run(SourceFile:1090)

And the related code is as following:

   public Object invokeStaticMethod(String className, String methodName, Class<?>[] parameterTypes, Object... args)
   {
     try {
       Method method = mClassLoader.loadClass(className).getMethod(methodName, parameterTypes);
       method.setAccessible(true);
       return method.**invoke**(null, args);
     } catch {...}
    }

Another stack trace:

Build fingerprint: htc/htccn_chs_cu/htc_a5dug:5.0.2/LRX22G/510432.3:user/release-keys
pid: 11542, tid: 11613  >>> com.lily.web:tools <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 90876000
  #00  pc 0x0      /data/data/com.lily.web/jars_dex.dex (???)
  #01  pc 0xa0a47  /system/lib/libart.so (???)
  #02  pc 0xf4f49  /data/dalvik-cache/arm/system@[email protected] (oatexec+1003337)
java.lang.Throwable: 
******* Java stack for JNI crash *******
    at java.lang.reflect.Method.**invoke**(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)

As you can see, jars_fusion.dex is a big dex file of our app on Android platform. And there is a JNI crash while invoking a method in that dex, although the method is found successfully in the dex. Moreover, this issue can not be reproduced by my device or our testers, but is reported from crash auto collector system.

So what it can be the real cause of the issue, or it is just a system fault?

0

There are 0 best solutions below