android-developers
[Arriba] [Todas las Listas]

[android-developers] Accidente nativo cuándo carga dinámica dex en and

To: Android Developers <android-developers@xxxxxxxxxxxxxxxx>
Subject: [android-developers] Accidente nativo cuándo carga dinámica dex en android 5.0/5.1
From: Zhenshui Wang <wang.zhenshui07@xxxxxxxxx>
Date: Thu, 10 Aug 2017 02:29:15 -0700 (PDT)
Delivery-date: Thu, 10 Aug 2017 05:30:04 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=cv1G0JbWGySitMoqfs/LaOMSf6ml1KTDOClP9oUt1hw=; b=T3Ew9wBiLfUQT0QLMX5zqr5X+hrpxgEjXAbWEjjZ2iickd6pVaOkBDDlI4WbHB/PRA +zJue34op7TKqAki7137fl98q0pGixKyiZz/IP9M3RgyJl2X+yEPWzdz8SXdJjipZMq+ WZQYrIg6fxn32RwT+bU2Hq90+UGSQXcPyIBIV/wY56m539EA2xX6lQkcCySM6Lybpm/1 o8KyQWLD3hnY3U+y7l3twED1HDxy2UxTGbXyj8P3Ge2nBvGhzuu0ffqVuNBdPP6GU417 lLIpXnH50AebCA85ewXOPNcMI/DIjlJ2xp6j1KMDMswOd3PXlImV8fp7J+tNLcSZxzfP GQbQ==
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=cv1G0JbWGySitMoqfs/LaOMSf6ml1KTDOClP9oUt1hw=; b=mtezfHsTR1zeN50vvkbpYkT7TE9Z+HJXHZGT0TPt7+bP676hNLdZ+2ezYz9o/TvScM bz1k484PxiuNwNH8/PMVZMK1cHIscto8+MMVWv0ZoUMUtNVmG+1554PIHxyTMtghiZin cBwZdFbdP7Z3T3x9eExybLQy1BzdwcEKVG0Lnd4BB/dMMYISP4Jg7UwphoQW3gSji40n x1WI9J7WmWvF4pq6o5ZA5GKr/D9u533+47EOwQAykztoOYyPb+VGjfEiZbLXfH72jhr8 AS5grpD8FpjlP5nSfz6l3O49tw/SPy5XijXX0OkvQEVN167fKJE6WOmXITxW4DdzeRaS 3uxg==
Envelope-to: traductor@xxxxxxxxxxx
List-archive: <https://groups.google.com/group/android-developer>
List-help: <https://groups.google.com/support/>, <mailto:android-developers+help@googlegroups.com>
List-id: <android-developers.googlegroups.com>
List-post: <https://groups.google.com/group/android-developers/post>, <mailto:android-developers@googlegroups.com>
List-subscribe: <https://groups.google.com/group/android-developers/subscribe>, <mailto:android-developers+subscribe@googlegroups.com>
List-unsubscribe: <mailto:googlegroups-manage+364598216046+unsubscribe@googlegroups.com>, <https://groups.google.com/group/android-developers/subscribe>
Mailing-list: list android-developers@xxxxxxxxxxxxxxxx; contact android-developers+owners@xxxxxxxxxxxxxxxx
Reply-to: android-developers@xxxxxxxxxxxxxxxx
Sender: android-developers@xxxxxxxxxxxxxxxx
In my app, using code 

try {
        compClassLoader = new DexClassLoader(dexFilePath.toString(), odexPath,
                                dexPath, this.getClass().getClassLoader());
    } catch (Throwable e) {
        e.printStackTrace();
    }


found many crash in Android 5.0/5.1, crash stack about SIGABRT like this:

SIGABRT: empty message
#00 pc 0003d4e8 /system/lib/libc.so (tgkill +12)
#01 pc 000164eb /system/lib/libc.so (pthread_kill +66)
#02 pc 000170b7 /system/lib/libc.so (raise +10)
#03 pc 000139a7 /system/lib/libc.so (__libc_android_abort +34)
#04 pc 000120d8 /system/lib/libc.so (abort +04)
#05 pc 00217a19 /system/lib/libart.so (art::Runtime::Abort() +132)
#06 pc 000a6e0d /system/lib/libart.so (art::LogMessage::~LogMessage() +1292)
#07 pc 000d9301 /system/lib/libart.so (art::LoadMultiDexFilesFromOatFile(art::OatFile const*, char const*, unsigned int const*, bool, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >*, std::__1::vector<art::DexFile const*, std::__1::allocator<art::DexFile const*> >*) +1004)
#08 pc 000daf21 /system/lib/libart.so (art::ClassLinker::OpenDexFilesFromOat(char const*, char const*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >*, std::__1::vector<art::DexFile const*, std::__1::allocator<art::DexFile const*> >*) +816)
#09 pc 001eff47 /system/lib/libart.so (art::DexFile_openDexFileNative(_JNIEnv*, _jclass*, _jstring*, _jstring*, int) +186)
#10 pc 00017c67 /data/dalvik-cache/arm/system@framework@xxxxxxxx
java:
dalvik.system.DexFile.openDexFileNative(Native Method)
dalvik.system.DexFile.openDexFile(DexFile.java:295)
dalvik.system.DexFile.<init>(DexFile.java:111)
dalvik.system.DexFile.loadDex(DexFile.java:151)
dalvik.system.DexPathList.loadDexFile(DexPathList.java:265)
dalvik.system.DexPathList.makeDexElements(DexPathList.java:231)
dalvik.system.DexPathList.<init>(DexPathList.java:109)
dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
dalvik.system.DexClassLoader.<init>(DexClassLoader.java:57)


In my app, the loaded dex maybe changed when web server has newest one. The 
crash is not inevitable. It's not appear crash when I test my app in the 
same config machine.
And i found one feature of only crash once in user machine.
Through read the android source code, i know dex need optimize when first 
load. I guess the crash has relationship with this optimize.
But i'm not confirm it.  Does anyone has any experience on these kind crash?








-- 
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to android-developers@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/65835509-4238-483a-8e01-5c633899bd78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Anterior por Tema] Tema Actual [Siguiente por Tema>
  • [android-developers] Accidente nativo cuándo carga dinámica dex en android 5.0/5.1, Zhenshui Wang <=