Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Native crash in /system/lib64/libart.so

My application are reporting some native crash with only some device. I try to understand the stacktrace wit the help of https://source.android.com/devices/tech/debug/native-crash.
But I don't find the cause.

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> my.package <<<

backtrace:
  #00  pc 0000000000264298  /system/lib64/libart.so (_ZN3art6mirror5Class24ResolvedMethodAccessTestILb1ELb1ELNS_10InvokeTypeE0EEEbNS_6ObjPtrIS1_EEPNS_9ArtMethodEjNS4_INS0_8DexCacheEEE+352)
  #01  pc 00000000002978a8  /system/lib64/libart.so (_ZN3art11interpreterL8DoInvokeILNS_10InvokeTypeE0ELb0ELb1EEEbPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+508)
  #02  pc 000000000028c824  /system/lib64/libart.so (_ZN3art11interpreter17ExecuteSwitchImplILb1ELb0EEENS_6JValueEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameES2_b+36540)
  #03  pc 000000000025d6fc  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+664)
  #04  pc 00000000004e4a88  /system/lib64/libart.so (artQuickToInterpreterBridge+1468)
  #05  pc 000000000051281c  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
  #06  pc 000000000052da6c  /system/framework/arm64/boot.oat (java.util.TimSort.countRunAndMakeAscending+396)
  #07  pc 0000000000532508  /system/framework/arm64/boot.oat (java.util.TimSort.sort+440)
  #08  pc 000000000044a740  /system/framework/arm64/boot.oat (java.util.Arrays.sort+128)
  #09  pc 0000000000811f0c  /data/app/my.package-Py1SDcJah4ZBAmxAxgjfww==/oat/arm64/base.odex

The devices are all on Android 8.0 and there are:

  • Galaxy S8 (dreamlte)
  • Xperia X Compact (F5321)
  • Galaxy S9 (starlte)
  • Mate 10 Pro (HWBLA)

Can anyone help me with this stacktrace? Is there a way to find the root cause of this?

like image 840
Kevin Robatel Avatar asked Sep 26 '18 12:09

Kevin Robatel


1 Answers

I had a similar crash which appeared to be caused by the wrong java compatibility being used. It was resolved by adding the following to the module build.gradle file:

compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
}
like image 194
Zurvæ Avatar answered Sep 21 '22 19:09

Zurvæ