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@framew...@boot.oat
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+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
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.

Reply via email to