OCR gets crash in Release APK but it works with Debug APK

  • 36 Views
  • Last Post 07 March 2019
Akash Patel posted this 06 March 2019

JNI DETECTED ERROR IN APPLICATION: fid == null
2019-03-06 09:55:54.425 15624-15624/? A/zygote: java_vm_ext.cc:534]   native: #03 pc 0025187f  /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+738)
2019-03-06 09:55:54.425 15624-15624/? A/zygote: java_vm_ext.cc:534]   native: #04 pc 00251c6b  /system/lib/libart.so (art::JavaVMExt::JniAbortF(char const*, char const*, ...)+66)
2019-03-06 09:55:54.426 15624-15624/? A/zygote: runtime.cc:550] JNI DETECTED ERROR IN APPLICATION: fid == null
2019-03-06 09:55:54.426 15624-15624/? A/zygote: runtime.cc:550]   native: #03 pc 0025187f  /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+738)
2019-03-06 09:55:54.426 15624-15624/? A/zygote: runtime.cc:550]   native: #04 pc 00251c6b  /system/lib/libart.so (art::JavaVMExt::JniAbortF(char const*, char const*, ...)+66)
2019-03-06 09:55:54.697 16248-16248/? A/DEBUG: Abort message: 'java_vm_ext.cc:534] JNI DETECTED ERROR IN APPLICATION: fid == null'
2019-03-06 09:55:54.702 16248-16248/? A/DEBUG:     #03 pc 00251a75  /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1240)
2019-03-06 09:55:54.702 16248-16248/? A/DEBUG:     #04 pc 00251c6b  /system/lib/libart.so (art::JavaVMExt::JniAbortF(char const*, char const*, ...)+66)

Order By: Standard | Newest | Votes
Nadezhda A. Solovyeva posted this 06 March 2019

Dear Akash,

1. Do you run your own code or one of the standard samples?

a) If it's a standard sample, then what one?

b) If it's your own code, that what does "fid" variable means? How it's initialized and what is the code string causing the error?

2. Do you run the application on real device or on emulator? What it a device or emulator model name?

Akash Patel posted this 06 March 2019

Hey,

1. Do you run your own code or one of the standard samples?

- I am using my own code but we used your samples as reference.

b) If it's your own code, that what does "fid" variable means? How it's initialized and what is the code string causing the error?

- We haven't took any fid from our end. this is something related to JNI and it is related to some Zygote class error.

2. Do you run the application on real device or on emulator? What it a device or emulator model name?

- I am using Samsung Galaxy J7 Prime device (SM-G610F) but app gets crash in every device.

Strange is it works fine in debug mode but app gets crashed with Signed APK.

Nadezhda A. Solovyeva posted this 06 March 2019

Dear Akash,

Please send us the piece of the code, which has caused the error.

Akash Patel posted this 06 March 2019

Yes, I don't know exactly where It cause the issue because It works well in debug mode.

But issue cause in Signed APK and I have only logcat crash report only.

 

 

2019-03-06 11:36:42.862 26666-26666/? A/zygote: java_vm_ext.cc:534] JNI DETECTED ERROR IN APPLICATION: fid == null 2019-03-06 11:36:42.862 26666-26666/? A/zygote: java_vm_ext.cc:534] in call to SetLongField 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] from boolean com.abbyy.mobile.ocr4.DataArray.create(int) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] "main" prio=5 tid=1 Runnable 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] | group="main" sCount=0 dsCount=0 flags=0 obj=0x7241b718 self=0xe747b000 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] | sysTid=26666 nice=-10 cgrp=default sched=0/0 handle=0xeb72e4b8 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] | state=R schedstat=( 0 0 0 ) utm=216 stm=42 core=2 HZ=100 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] | stack=0xff791000-0xff793000 stackSize=8MB 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] | held mutexes= "mutator lock"(shared held) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] native: #00 pc 002eedcf /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*)+130) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] native: #01 pc 003844db /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits>&, bool, BacktraceMap*, bool) const+206) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] native: #02 pc 00380a57 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits>&, bool, BacktraceMap*, bool) const+34) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] native: #03 pc 0025187f /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+738) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] native: #04 pc 00251c6b /system/lib/libart.so (art::JavaVMExt::JniAbortF(char const*, char const*, ...)+66) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] native: #05 pc 000dd28d /data/app/com.uitc.rs.android-g9K6cie-jyqaDxL717O9Ew==/lib/arm/libabbyy-rtr-sdk.so (Java_com_abbyy_mobile_ocr4_DataArray_create+72) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] native: #06 pc 00000067 /data/app/com.uitc.rs.android-g9K6cie-jyqaDxL717O9Ew==/oat/arm/base.odex (Java_com_abbyy_mobile_ocr4_DataArray_create__I+78) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at com.abbyy.mobile.ocr4.DataArray.create(Native method) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at com.abbyy.mobile.ocr4.DataArray.a(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at com.abbyy.mobile.ocr4.DataArray.(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at com.abbyy.mobile.ocr4.d.(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at com.abbyy.mobile.a.b.b(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at com.abbyy.mobile.a.a.a(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at com.uitc.rs.android.ocr.ViewOCRScreen.s(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at com.uitc.rs.android.ocr.ViewOCRScreen.h(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at com.uitc.rs.android.ocr.ViewOCRScreen.onCreate(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at android.app.Activity.performCreate(Activity.java:7258) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at android.app.Activity.performCreate(Activity.java:7249) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1222) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3059) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at android.app.ActivityThread.-wrap11(ActivityThread.java:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1724) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at android.os.Handler.dispatchMessage(Handler.java:106) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at android.os.Looper.loop(Looper.java:164) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at android.app.ActivityThread.main(ActivityThread.java:7000) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at java.lang.reflect.Method.invoke(Native method) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: java_vm_ext.cc:534] 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:542] Runtime aborting... 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:542] 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] JNI DETECTED ERROR IN APPLICATION: fid == null 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] in call to SetLongField 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] from boolean com.abbyy.mobile.ocr4.DataArray.create(int) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] "main" prio=5 tid=1 Runnable 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] | group="main" sCount=0 dsCount=0 flags=0 obj=0x7241b718 self=0xe747b000 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] | sysTid=26666 nice=-10 cgrp=default sched=0/0 handle=0xeb72e4b8 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] | state=R schedstat=( 0 0 0 ) utm=216 stm=42 core=2 HZ=100 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] | stack=0xff791000-0xff793000 stackSize=8MB 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] | held mutexes= "mutator lock"(shared held) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] native: #00 pc 002eedcf /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*)+130) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] native: #01 pc 003844db /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits>&, bool, BacktraceMap*, bool) const+206) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] native: #02 pc 00380a57 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits>&, bool, BacktraceMap*, bool) const+34) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] native: #03 pc 0025187f /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+738) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] native: #04 pc 00251c6b /system/lib/libart.so (art::JavaVMExt::JniAbortF(char const*, char const*, ...)+66) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] native: #05 pc 000dd28d /data/app/com.uitc.rs.android-g9K6cie-jyqaDxL717O9Ew==/lib/arm/libabbyy-rtr-sdk.so (Java_com_abbyy_mobile_ocr4_DataArray_create+72) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] native: #06 pc 00000067 /data/app/com.uitc.rs.android-g9K6cie-jyqaDxL717O9Ew==/oat/arm/base.odex (Java_com_abbyy_mobile_ocr4_DataArray_create__I+78) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at com.abbyy.mobile.ocr4.DataArray.create(Native method) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at com.abbyy.mobile.ocr4.DataArray.a(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at com.abbyy.mobile.ocr4.DataArray.(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at com.abbyy.mobile.ocr4.d.(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at com.abbyy.mobile.a.b.b(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at com.abbyy.mobile.a.a.a(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at com.uitc.rs.android.ocr.ViewOCRScreen.s(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at com.uitc.rs.android.ocr.ViewOCRScreen.h(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at com.uitc.rs.android.ocr.ViewOCRScreen.onCreate(unavailable:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at android.app.Activity.performCreate(Activity.java:7258) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at android.app.Activity.performCreate(Activity.java:7249) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1222) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3059) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at android.app.ActivityThread.-wrap11(ActivityThread.java:-1) 2019-03-06 11:36:42.863 26666-26666/? A/zygote: runtime.cc:550] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1724) 2019-03-06 11:36:42.864 26666-26666/? A/zygote: runtime.cc:550] at android.os.Handler.dispatchMessage(Handler.java:106) 2019-03-06 11:36:42.864 26666-26666/? A/zygote: runtime.cc:550] at android.os.Looper.loop(Looper.java:164) 2019-03-06 11:36:42.864 26666-26666/? A/zygote: runtime.cc:550] at android.app.ActivityThread.main(ActivityThread.java:7000) 2019-03-06 11:36:42.864 26666-26666/? A/zygote: runtime.cc:550] at java.lang.reflect.Method.invoke(Native method) 2019-03-06 11:36:42.864 26666-26666/? A/zygote: runtime.cc:550] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441) 2019-03-06 11:36:42.864 26666-26666/? A/zygote: runtime.cc:550] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408) 2019-03-06 11:36:42.864 26666-26666/? A/zygote: runtime.cc:550]

Akash Patel posted this 06 March 2019

 Thank you for your support Nadezhda A. Solovyev. Issue is resolved now. Actually, It was pro-guard related issue.

I have added following four lines into proguard-rules.pro and it works fine now.

-keep class com.abbyy.mobile.ocr4.* { *; }

-keep class com.abbyy.mobile.ocr4.layout.* { *; }

-keepclassmembers class com.abbyy.mobile.ocr4.* { *; }

-keepclassmembers class com.abbyy.mobile.ocr4.layout.* { *; }

Nadezhda A. Solovyeva posted this 07 March 2019

Dear Akash,

Thank you for letting us know, I will put this information into our knowledgebase

Close