Android Marshmallow ART“未能找到dex的本机偏移”崩溃

sig*_*egv 5 android android-6.0-marshmallow

自2015年12月以来,我们仅在少数运行Android 6.0和6.0.1的设备上遇到奇怪的崩溃。其中大多数是Nexus 5。

首先,崩溃日志从Play商店中提取。从art_method.cc来看,似乎某种方法到本机代码的映射失败。也许是编译引起的?

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/MMB29Q/2480792:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 18737, tid: 18737, name: omittedapp  >>> com.omitteddomain.omittedapp <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'art/runtime/art_method.cc:245] Failed to find native offset for dex pc 0x58 in android.view.View com.omitteddomain.omittedapp.PlotWidget.a(android.view.ViewGroup, android.view.LayoutInflater, java.util.List)'
    r0 00000000  r1 00004931  r2 00000006  r3 b6f24b7c
    r4 b6f24b84  r5 b6f24b34  r6 00000001  r7 0000010c
    r8 b4c3f800  r9 b4c3de44  sl b361d3db  fp b4c23450
    ip 00000006  sp beb2ca90  lr b6c93b61  pc b6c95f50  cpsr 40070010

backtrace:
    #00 pc 00041f50  /system/lib/libc.so (tgkill+12)
    #01 pc 0003fb5d  /system/lib/libc.so (pthread_kill+32)
    #02 pc 0001c30f  /system/lib/libc.so (raise+10)
    #03 pc 000194c1  /system/lib/libc.so (__libc_android_abort+34)
    #04 pc 000174ac  /system/lib/libc.so (abort+4)
    #05 pc 00333971  /system/lib/libart.so (art::Runtime::Abort()+228)
    #06 pc 000f45fb  /system/lib/libart.so (art::LogMessage::~LogMessage()+2226)
    #07 pc 000f08d1  /system/lib/libart.so (art::Barrier::~Barrier()+216)
    #08 pc 0035b473  /system/lib/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+162)
    #09 pc 00333a35  /system/lib/libart.so (art::Runtime::Abort()+424)
    #10 pc 000f45fb  /system/lib/libart.so (art::LogMessage::~LogMessage()+2226)
    #11 pc 000ef88b  /system/lib/libart.so (art::ArtMethod::ToNativeQuickPc(unsigned int, bool)+918)
    #12 pc 00329055  /system/lib/libart.so (art::CatchBlockStackVisitor::VisitFrame()+180)
    #13 pc 0033ccbd  /system/lib/libart.so (art::StackVisitor::WalkStack(bool)+224)
    #14 pc 0032910d  /system/lib/libart.so (art::QuickExceptionHandler::FindCatch(art::mirror::Throwable*)+92)
    #15 pc 0034a61d  /system/lib/libart.so (art::Thread::QuickDeliverException()+140)
    #16 pc 003fb7d9  /system/lib/libart.so (artThrowNullPointerExceptionFromCode+20)
    #17 pc 00a15f01  /data/app/com.omitteddomain.omittedapp-1/oat/arm/base.odex (offset 0x59d000)
Run Code Online (Sandbox Code Playgroud)

据报道,发生类似崩溃的唯一其他事件(此处为Android ART:“无法为PC偏移找到Dex偏移...”)可能与无限递归问题有关。尽管在相同的“ a”方法中存在无限递归问题,但该问题已得到解决。

一些其他信息:

  1. 有问题的PlotWidget类通过第三方库向用户显示图表。购物车视图是在上述“ a”方法内部配置的。我们多次更改了库,但结果没有差异。

  2. 所有第三方库都是最新的。

  3. 我们已经能够使用显示给受影响用户之一的相同数据来测试该应用程序,而无需重现问题(作为敏感信息,我们仅提供了绘制图表所需的严格数据)。

  4. 重现此问题的尝试因配置/风味,启用/禁用proguard,zipalign是/否等的每种组合而失败。

该应用程序使用Android Studio 1.5和最新的SDK(针对API 23)进行编译。在设置较低的目标API并在无数次发布无用的更新之前,我想知道是有人遇到并解决了类似问题。

欢迎任何建议。