Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.0-beta.5 Crash with JNI DETECTED ERROR IN APPLICATION: java_class == null #602

Open
proguru58 opened this issue May 18, 2018 · 7 comments

Comments

@proguru58
Copy link

I am getting the following error in this library. It works fine on debug mode. It fails running with release APK

05-18 11:44:13.994 2746-2780/? A/art: art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: java_class == null
art/runtime/java_vm_ext.cc:410] in call to GetMethodID
art/runtime/java_vm_ext.cc:410] from com.shockwave.pdfium.a.a com.shockwave.pdfium.PdfiumCore.nativeGetPageSizeByIndex(long, int, int)
art/runtime/java_vm_ext.cc:410] "AsyncTask #5" prio=5 tid=19 Runnable
art/runtime/java_vm_ext.cc:410] | group="main" sCount=0 dsCount=0 obj=0x12e412e0 self=0xade9ee00
art/runtime/java_vm_ext.cc:410] | sysTid=2780 nice=10 cgrp=apps/bg_non_interactive sched=0/0 handle=0x9ca72930
art/runtime/java_vm_ext.cc:410] | state=R schedstat=( 225362362 112423375 384 ) utm=15 stm=7 core=3 HZ=100
art/runtime/java_vm_ext.cc:410] | stack=0x9c970000-0x9c972000 stackSize=1038KB
art/runtime/java_vm_ext.cc:410] | held mutexes= "mutator lock"(shared held)
art/runtime/java_vm_ext.cc:410] native: #00 pc 0037169f /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+142)
art/runtime/java_vm_ext.cc:410] native: #1 pc 00350cd5 /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEP12BacktraceMap+160)
art/runtime/java_vm_ext.cc:410] native: #2 pc 0025afab /system/lib/libart.so (ZN3art9JavaVMExt8JniAbortEPKcS2+742)
art/runtime/java_vm_ext.cc:410] native: #3 pc 0025b703 /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortFEPKcS2_z+74)
art/runtime/java_vm_ext.cc:410] native: #4 pc 00284731 /system/lib/libart.so (ZN3art3JNI11GetMethodIDEP7_JNIEnvP7_jclassPKcS6+672)
art/runtime/java_vm_ext.cc:410] native: #5 pc 000076a7 /data/app/com.vesselvanguard.app-1/lib/arm/libjniPdfium.so (ZN7_JNIEnv11GetMethodIDEP7_jclassPKcS3+8)
art/runtime/java_vm_ext.cc:410] native: #6 pc 00007db1 /data/app/com.vesselvanguard.app-1/lib/arm/libjniPdfium.so (Java_com_shockwave_pdfium_PdfiumCore_nativeGetPageSizeByIndex+144)
art/runtime/java_vm_ext.cc:410] native: #7 pc 0333ed2b /data/app/com.vesselvanguard.app-1/oat/arm/base.odex (Java_com_shockwave_pdfium_PdfiumCore_nativeGetPageSizeByIndex__JII+110)
art/runtime/java_vm_ext.cc:410] at com.shockwave.pdfium.PdfiumCore.nativeGetPageSizeByIndex(Native method)
art/runtime/java_vm_ext.cc:410] at com.shockwave.pdfium.PdfiumCore.b(PdfiumCore.java:249)
art/runtime/java_vm_ext.cc:410] - locked <0x04ff4927> (a java.lang.Object)
art/runtime/java_vm_ext.cc:410] at com.github.barteksc.pdfviewer.f.b(PdfFile.java:86)
art/runtime/java_vm_ext.cc:410] at com.github.barteksc.pdfviewer.f.(PdfFile.java:75)
art/runtime/java_vm_ext.cc:410] at com.github.barteksc.pdfviewer.c.a(DecodingAsyncTask.java:51)
art/runtime/java_vm_ext.cc:410] at com.github.barteksc.pdfviewer.c.doInBackground(DecodingAsyncTask.java:25)
art/runtime/java_vm_ext.cc:410] at android.os.AsyncTask$2.call(AsyncTask.java:295)
art/runtime/java_vm_ext.cc:410] at java.util.concurrent.FutureTask.run(FutureTask.java:237)
art/runtime/java_vm_ext.cc:410] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
art/runtime/java_vm_ext.cc:410] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
art/runtime/java_vm_ext.cc:410] at java.lang.Thread.run(Thread.java:818)
art/runtime/java_vm_ext.cc:410]
art/runtime/runtime.cc:368] Runtime aborting...
art/runtime/runtime.cc:368]

@ZhangPeibin
Copy link

me too 。。

@ZhangPeibin
Copy link

@proguru58 你怎么解决的啊

@proguru58
Copy link
Author

@ZhangPeibin I have solved this problem with downgrading android-pdf-viewer in gradle.

compile 'com.github.barteksc:android-pdf-viewer:2.8.2'

@ZhangPeibin
Copy link

@proguru58 Thank you very much !!!!

@polesapart
Copy link

3.2.0-beta1 seems to be affected as well.

@polesapart
Copy link

The work-around seems to add this to proguard-rules.pro:
-keep class com.shockwave.**

@amuchand47
Copy link

The work-around seems to add this to proguard-rules.pro:
-keep class com.shockwave.**

Still not able to resolve error, getting same error after that. Please help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants