App crashes on reading barcode.
LaxmikanthMadhyastha opened this issue · 4 comments
LaxmikanthMadhyastha commented
I have upgraded the package to use the new ml-kit version and sometimes the app crashes on reading the barcodes with the below error.
This seems to be happening with the new version only and recently I started getting this crash.
[ +93 ms] F/libc (13303): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x78a0c57c77 in tid 13532 (MLHandler), pid 13303
(com.package.name)
[ +156 ms] *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[ ] Build fingerprint: 'OnePlus/OnePlus7Pro/OnePlus7Pro:10/QKQ1.190716.003/2011052232:user/release-keys'
[ ] Revision: '0'
[ ] ABI: 'arm64'
[ ] Timestamp: 2020-12-22 18:27:32+0530
[ ] pid: 13303, tid: 13532, name: MLHandler [ ] uid: 11834
[ ] signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x78a0c57c77
[ ] x0 00000078a6878c98 x1 00000078a0c57c77 x2 00000078a6878cb0 x3 00000000000000cc
[ ] x4 00000078a5719a80 x5 0000000000000330 x6 00000078a0b98000 x7 0000000000000003
[ ] x8 0000000000000000 x9 00000078a5716780 x10 0000000000000f00 x11 0000000000000870
[ ] x12 00000078af40d3c0 x13 0000000000000eff x14 000000000000086f x15 0000000000000f01
[ ] x16 0000000042000000 x17 0000000000000000 x18 0000000000300000 x19 00000078a6878d78
[ ] x20 00000078a6878dc0 x21 00000078a6878d98 x22 00000078e3ebfa20 x23 00000078b2f29a80
[ ] x24 00000078a6879448 x25 00000078a687c020 x26 00000078b2f29ab8 x27 0000000000000100
[ ] x28 0000000000008000 x29 00000078a6879700
[ ] sp 00000078a6878c50 lr 00000078a5587824 pc 00000078a5640644
[ +169 ms] backtrace:
[ ] #00 pc 0000000000136644 /data/app/com.package.name-KB03usj6ncqFilB59UucCw==/lib/arm64/libbarhopper_v2.so (BuildId:
3ab202bad2558ea14dee1a85d6dccdfa)
[ ] #01 pc 000000000007d820 /data/app/com.package.name-KB03usj6ncqFilB59UucCw==/lib/arm64/libbarhopper_v2.so (BuildId:
3ab202bad2558ea14dee1a85d6dccdfa)
[ +1 ms] #02 pc 000000000007a314 /data/app/com.package.name-KB03usj6ncqFilB59UucCw==/lib/arm64/libbarhopper_v2.so (BuildId:
3ab202bad2558ea14dee1a85d6dccdfa)
[ ] #03 pc 000000000007a0e8 /data/app/com.package.name-KB03usj6ncqFilB59UucCw==/lib/arm64/libbarhopper_v2.so (BuildId:
3ab202bad2558ea14dee1a85d6dccdfa)
[ ] #04 pc 0000000000076cf8 /data/app/com.package.name-KB03usj6ncqFilB59UucCw==/lib/arm64/libbarhopper_v2.so (BuildId:
3ab202bad2558ea14dee1a85d6dccdfa)
[ ] #05 pc 0000000000076ea0 /data/app/com.package.name-KB03usj6ncqFilB59UucCw==/lib/arm64/libbarhopper_v2.so
(Java_com_google_android_libraries_barhopper_BarhopperV2_recognizeBufferNative+88) (BuildId: 3ab202bad2558ea14dee1a85d6dccdfa)
[ +1 ms] #06 pc 0000000000140350 /apex/com.android.runtime/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #07 pc 0000000000137334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #08 pc 0000000000145fec /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int,
art::JValue*, char const*)+244) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #09 pc 00000000002e37c0 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*,
art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #10 pc 00000000002dfad0 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*,
art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+692) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #11 pc 00000000005a6294 /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirectRange+260) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #12 pc 0000000000131c14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct_range+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #13 pc 00000000004a037e [anon:dalvik-classes2.dex extracted in memory from
/data/app/com.package.name-KB03usj6ncqFilB59UucCw==/base.apk!classes2.dex] (com.google.android.libraries.barhopper.BarhopperV2.recognize+26)
[ ] #14 pc 00000000005a126c /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #15 pc 0000000000131814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #16 pc 0000000000134ffa [anon:dalvik-classes3.dex extracted in memory from
/data/app/com.package.name-KB03usj6ncqFilB59UucCw==/base.apk!classes3.dex] (com.google.mlkit.vision.barcode.zza.zza+138)
[ ] #17 pc 00000000005a2a8c /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1788) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #18 pc 0000000000131a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #19 pc 00000000001343ae [anon:dalvik-classes3.dex extracted in memory from
/data/app/com.package.name-KB03usj6ncqFilB59UucCw==/base.apk!classes3.dex] (com.google.mlkit.vision.barcode.internal.zzc.zzb+142)
[ ] #20 pc 00000000005a3578 /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1100) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #21 pc 0000000000131914 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #22 pc 0000000000134304 [anon:dalvik-classes3.dex extracted in memory from
/data/app/com.package.name-KB03usj6ncqFilB59UucCw==/base.apk!classes3.dex] (com.google.mlkit.vision.barcode.internal.zzc.run+4)
[ ] #23 pc 00000000005a126c /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #24 pc 0000000000131814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #25 pc 000000000003264c [anon:dalvik-classes.dex extracted in memory from /data/app/com.package.name-KB03usj6ncqFilB59UucCw==/base.apk]
(com.google.mlkit.vision.common.internal.MobileVisionBase.zza+4)
[ ] #26 pc 00000000005a126c /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #27 pc 0000000000131814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #28 pc 0000000000136dc8 [anon:dalvik-classes3.dex extracted in memory from
/data/app/com.package.name-KB03usj6ncqFilB59UucCw==/base.apk!classes3.dex] (com.google.mlkit.vision.common.internal.zzb.call+8)
[ ] #29 pc 00000000005a2a8c /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1788) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #30 pc 0000000000131a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #31 pc 000000000012e7f0 [anon:dalvik-classes3.dex extracted in memory from
/data/app/com.package.name-KB03usj6ncqFilB59UucCw==/base.apk!classes3.dex] (com.google.mlkit.common.sdkinternal.ModelResource.zza+32)
[ ] #32 pc 00000000005a126c /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #33 pc 0000000000131814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #34 pc 0000000000132a14 [anon:dalvik-classes3.dex extracted in memory from
/data/app/com.package.name-KB03usj6ncqFilB59UucCw==/base.apk!classes3.dex] (com.google.mlkit.common.sdkinternal.zzn.call+12)
[ ] #35 pc 00000000005a2a8c /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1788) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #36 pc 0000000000131a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #37 pc 00000000001329a4 [anon:dalvik-classes3.dex extracted in memory from
/data/app/com.package.name-KB03usj6ncqFilB59UucCw==/base.apk!classes3.dex] (com.google.mlkit.common.sdkinternal.zzm.run+36)
[ ] #38 pc 00000000005a2a8c /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1788) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #39 pc 0000000000131a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #40 pc 0000000000132adc [anon:dalvik-classes3.dex extracted in memory from
/data/app/com.package.name-KB03usj6ncqFilB59UucCw==/base.apk!classes3.dex] (com.google.mlkit.common.sdkinternal.zzq.run+20)
[ ] #41 pc 00000000002b4ad4 /apex/com.android.runtime/lib64/libart.so
(_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.12938883504528282530+240) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #42 pc 0000000000592514 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #43 pc 0000000000140468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #44 pc 000000000202b534 /memfd:/jit-cache (deleted) (android.os.Handler.handleCallback+68)
[ ] #45 pc 000000000202bfd0 /memfd:/jit-cache (deleted) (android.os.Handler.dispatchMessage+64)
[ ] #46 pc 0000000000137334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #47 pc 0000000000145fec /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int,
art::JValue*, char const*)+244) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #48 pc 00000000002e37c0 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*,
art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #49 pc 00000000002dea20 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*,
art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #50 pc 00000000005a1c18 /apex/com.android.runtime/lib64/libart.so (MterpInvokeSuper+1564) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #51 pc 0000000000131894 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_super+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #52 pc 00000000003bb80e [anon:dalvik-classes2.dex extracted in memory from
/data/app/com.package.name-KB03usj6ncqFilB59UucCw==/base.apk!classes2.dex] (com.google.android.gms.internal.mlkit_common.zzb.dispatchMessage+2)
[ ] #53 pc 00000000005a126c /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #54 pc 0000000000131814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #55 pc 000000000032b4ca /system/framework/framework.jar (android.os.Looper.loop+466)
[ ] #56 pc 00000000005a3d1c /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+1040) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #57 pc 0000000000131994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #58 pc 0000000000305d24 /system/framework/framework.jar (android.os.HandlerThread.run+56)
[ ] #59 pc 00000000002b4ad4 /apex/com.android.runtime/lib64/libart.so
(_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.12938883504528282530+240) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #60 pc 0000000000592514 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #61 pc 0000000000140468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #62 pc 0000000000137334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #63 pc 0000000000145fec /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int,
art::JValue*, char const*)+244) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #64 pc 00000000004b0eb4 /apex/com.android.runtime/lib64/libart.so (art::(anonymous
namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char
const*)+104) (BuildId: bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #65 pc 00000000004b1fc8 /apex/com.android.runtime/lib64/libart.so
(art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #66 pc 00000000004f2990 /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176) (BuildId:
bdffe04c611dbc98c8441c9efc5c6a12)
[ ] #67 pc 00000000000d6b70 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId:
a2584ee8458a61d422edf24b4cd23b78)
[ ] #68 pc 0000000000074eac /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: a2584ee8458a61d422edf24b4cd23b78)
[ +487 ms] Service protocol connection closed.
[ +1 ms] Lost connection to device.
[ +5 ms] executing: /Users/lens/Library/Android/sdk/platform-tools/adb -s 02a43144 forward --list
[ +8 ms] Exit code 0 from: /Users/lens/Library/Android/sdk/platform-tools/adb -s 02a43144 forward --list
[ ] 02a43144 tcp:62327 tcp:39829
02a43144 tcp:62568 tcp:37907
02a43144 tcp:62732 tcp:41723
[ +1 ms] executing: /Users/lens/Library/Android/sdk/platform-tools/adb -s 02a43144 forward --remove tcp:62327
[ +10 ms] executing: /Users/lens/Library/Android/sdk/platform-tools/adb -s 02a43144 forward --remove tcp:62568
[ +9 ms] executing: /Users/lens/Library/Android/sdk/platform-tools/adb -s 02a43144 forward --remove tcp:62732
[ +10 ms] DevFS: Deleting filesystem on the device (file:///data/user/0/com.package.name/code_cache/)
[ +258 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed
[ +3 ms] executing: /Users/lens/Library/Android/sdk/platform-tools/adb -s 02a43144 forward --list
[ +9 ms] Exit code 0 from: /Users/lens/Library/Android/sdk/platform-tools/adb -s 02a43144 forward --list
[ +2 ms] "flutter run" took 70,188ms.
[ +263 ms] ensureAnalyticsSent: 258ms
[ +2 ms] Running shutdown hooks
[ ] Shutdown hook priority 4
[ +9 ms] Shutdown hooks complete
[ ] exiting with code 0
Flutter doctor
Click To Expand
[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.52.1)
[✓] Connected device (1 available)
• No issues found!
jaysson commented
@LaxmikanthMadhyastha I am facing same issue. How was this fixed?
LaxmikanthMadhyastha commented
It was crashing for me because of the resolution change for the camera that I made, do not keep the highest resolution.
jaysson commented
I am only doing this:
QrCamera(
formats: [BarcodeFormats.QR_CODE],
key: qrKey,
onError: (context, error) => Text(
error.toString(),
style: TextStyle(color: Colors.red),
),
qrCodeCallback: _onDetect,
child: Container(
decoration: BoxDecoration(
color: Colors.transparent,
),
),
)
Can't find anything about resolution in docs.
LaxmikanthMadhyastha commented
Right, resolution change was made by me in native code for some specific requirement hence this crash was happening, it can be a device-specific issue or any other reason for you, try testing with some other device.