After updating library to 0.3 I am getting a JNI crash with the library. Seems to originate from code below (Note: this code works fine in 0.2):
new Thread() {
@Override
public void run() {
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
StorjAndroid.getInstance(mContext).downloadFile(mBucket, mFiles.get(mCount), ThumbnailDownloader.this);
}
}.start();
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] JNI DETECTED ERROR IN APPLICATION: thread Thread[28,tid=9010,Native,Thread*=0xec3e1c00,peer=0x13143e30,"Thread-12"] using JNIEnv* from thread Thread[24,tid=8996,Runnable,Thread*=0xd9208600,peer=0x12fc9348,"Thread-11"]
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] in call to FindClass
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] from void io.storj.libstorj.Storj._downloadFile(io.storj.libstorj.Storj$Environment, java.lang.String, java.lang.String, java.lang.String, io.storj.libstorj.DownloadFileCallback)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] "Thread-12" prio=5 tid=28 Runnable
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] | group="main" sCount=0 dsCount=0 flags=0 obj=0x13143e30 self=0xec3e1c00
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] | sysTid=9010 nice=10 cgrp=default sched=0/0 handle=0xd68ff970
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] | state=R schedstat=( 71440107 34942031 90 ) utm=6 stm=0 core=3 HZ=100
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] | stack=0xd67fd000-0xd67ff000 stackSize=1038KB
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] | held mutexes= "mutator lock"(shared held)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] native: #00 pc 002ec503 /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*)+130)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] native: #01 pc 0037f41b /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+206)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] native: #02 pc 0037b997 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+34)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] native: #03 pc 0024fd77 /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+738)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] native: #04 pc 002500ef /system/lib/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list)+58)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] native: #05 pc 000d674f /system/lib/libart.so (art::ScopedCheck::AbortF(char const*, ...)+46)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] native: #06 pc 000d621d /system/lib/libart.so (art::ScopedCheck::CheckThread(_JNIEnv*)+104)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] native: #07 pc 000d4c89 /system/lib/libart.so (art::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::JniValueType*)+596)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] native: #08 pc 000c18db /system/lib/libart.so (art::CheckJNI::FindClass(_JNIEnv*, char const*)+450)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] native: #09 pc 0006410b /data/app/co.intellidev.storj-fGwA_EAoZV3clA_m6Ml1XQ==/lib/arm/libstorj-java.so (???)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] native: #10 pc 001d8184 /data/app/co.intellidev.storj-fGwA_EAoZV3clA_m6Ml1XQ==/lib/arm/libstorj-java.so (???)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] at io.storj.libstorj.Storj._downloadFile(Native method)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] at io.storj.libstorj.Storj.downloadFile(Storj.java:248)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] at io.storj.libstorj.Storj.downloadFile(Storj.java:242)
01-04 15:36:16.823 8839-9010/co.intellidev.storj A/zygote: java_vm_ext.cc:534] at io.storj.libstorj.Storj.downloadFile(Storj.java:237)