react-native-vision-camera: š Crash in CodeScanner/MLKit: `BarhopperV3_recognizeBufferNative`
Whatās happening?
Iām using react-native-vision-camera v3.6.4
. On QR code scan I get google mlkit error Java_com_google_android_libraries_barhopper_BarhopperV3_recognizeBufferNative
. Iāve found known issues in mlkit repository. Do you have any ideas?
Did not have any issues on v3.5.1
Sentry error here may be useful
Reproduceable Code
const codeScanner: CodeScanner = {
codeTypes: ['qr'],
onCodeScanned: codes => {},
};
<Camera
device={device}
isActive={isCameraActive}
codeScanner={codeScanner}
style={styles.cameraStyle}
/>
Relevant log output
10-31 18:40:45.183 3395 7552 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x749afc3f53 in tid 7552 (pool-9-thread-9), pid 3395 (tscloud.scanner)
10-31 18:40:45.425 9017 9017 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-31 18:40:45.425 9017 9017 F DEBUG : Build fingerprint: 'samsung/a32ser/a32:11/RP1A.200720.012/A325FXXU2AVC1:user/release-keys'
10-31 18:40:45.425 9017 9017 F DEBUG : Revision: '4'
10-31 18:40:45.425 9017 9017 F DEBUG : ABI: 'arm64'
10-31 18:40:45.426 9017 9017 F DEBUG : Timestamp: 2023-10-31 18:40:45+0300
10-31 18:40:45.426 9017 9017 F DEBUG : pid: 3395, tid: 7552, name: pool-9-thread-9 >>> com.ticketscloud.scanner <<<
10-31 18:40:45.426 9017 9017 F DEBUG : uid: 10356
10-31 18:40:45.426 9017 9017 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x749afc3f53
10-31 18:40:45.426 9017 9017 F DEBUG : x0 00000074bdd7c878 x1 00000000000000e2 x2 0000007609005d38 x3 0000000000000014
10-31 18:40:45.426 9017 9017 F DEBUG : x4 0000000000000014 x5 0000000000000000 x6 0000000000001dff x7 00000074bdd7d470
10-31 18:40:45.426 9017 9017 F DEBUG : x8 0000000000000000 x9 0000000000000071 x10 000000000000006d x11 b4000074af2c8000
10-31 18:40:45.426 9017 9017 F DEBUG : x12 0000000000000070 x13 0000000000057f53 x14 000000749afc3f53 x15 000000749afc3a53
10-31 18:40:45.426 9017 9017 F DEBUG : x16 000000749af6c000 x17 000000769ae6e080 x18 00000000000e05fc x19 00000074bdd7c998
10-31 18:40:45.426 9017 9017 F DEBUG : x20 00000074bdd7c938 x21 00000074bdd7cad0 x22 0000000000000071 x23 000000000000006d
10-31 18:40:45.426 9017 9017 F DEBUG : x24 b4000074a7372278 x25 00000000000002d0 x26 00000000133a7e60 x27 00000074bdd7d188
10-31 18:40:45.426 9017 9017 F DEBUG : x28 00000074bdd7d1c8 x29 00000000000006ef
10-31 18:40:45.426 9017 9017 F DEBUG : lr 000000748c46dff4 sp 00000074bdd7c870 pc 000000748c46e0bc pst 0000000080000000
10-31 18:40:45.809 9017 9017 F DEBUG : backtrace:
10-31 18:40:45.810 9017 9017 F DEBUG : NOTE: Function names and BuildId information is missing for some frames due
10-31 18:40:45.810 9017 9017 F DEBUG : NOTE: to unreadable libraries. For unwinds of apps, only shared libraries
10-31 18:40:45.810 9017 9017 F DEBUG : NOTE: found under the lib/ directory are readable.
10-31 18:40:45.810 9017 9017 F DEBUG : #00 pc 00000000001290bc /data/user_de/0/com.google.android.gms/app_chimera/m/0000021d/dl-VisionBarcode.optional_234212100400.apk
10-31 18:40:45.810 9017 9017 F DEBUG : #01 pc 00000000000816a8 /data/user_de/0/com.google.android.gms/app_chimera/m/0000021d/dl-VisionBarcode.optional_234212100400.apk
10-31 18:40:45.810 9017 9017 F DEBUG : #02 pc 000000000007b294 /data/user_de/0/com.google.android.gms/app_chimera/m/0000021d/dl-VisionBarcode.optional_234212100400.apk
10-31 18:40:45.810 9017 9017 F DEBUG : #03 pc 000000000007afe8 /data/user_de/0/com.google.android.gms/app_chimera/m/0000021d/dl-VisionBarcode.optional_234212100400.apk
10-31 18:40:45.810 9017 9017 F DEBUG : #04 pc 000000000007b544 /data/user_de/0/com.google.android.gms/app_chimera/m/0000021d/dl-VisionBarcode.optional_234212100400.apk
10-31 18:40:45.810 9017 9017 F DEBUG : #05 pc 0000000000079924 /data/user_de/0/com.google.android.gms/app_chimera/m/0000021d/dl-VisionBarcode.optional_234212100400.apk
10-31 18:40:45.810 9017 9017 F DEBUG : #06 pc 00000000000799c4 /data/user_de/0/com.google.android.gms/app_chimera/m/0000021d/dl-VisionBarcode.optional_234212100400.apk
10-31 18:40:45.811 9017 9017 F DEBUG : #07 pc 000000000013eed4 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.811 9017 9017 F DEBUG : #08 pc 00000000021d19b8 /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.android.libraries.barhopper.BarhopperV3.recognize+104)
10-31 18:40:45.811 9017 9017 F DEBUG : #09 pc 0000000002011204 /memfd:jit-cache (deleted) (offset 0x2000000) (m.pp.g+452)
10-31 18:40:45.811 9017 9017 F DEBUG : #10 pc 00000000020fbd20 /memfd:jit-cache (deleted) (offset 0x2000000) (m.pp.b+5376)
10-31 18:40:45.811 9017 9017 F DEBUG : #11 pc 00000000021c580c /memfd:jit-cache (deleted) (offset 0x2000000) (m.bgj.a+396)
10-31 18:40:45.811 9017 9017 F DEBUG : #12 pc 00000000021bff08 /memfd:jit-cache (deleted) (offset 0x2000000) (m.bq.onTransact+200)
10-31 18:40:45.811 9017 9017 F DEBUG : #13 pc 00000000021113fc /memfd:jit-cache (deleted) (offset 0x2000000) (android.os.Binder.transact+140)
10-31 18:40:45.811 9017 9017 F DEBUG : #14 pc 00000000021caa6c /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.android.gms.internal.mlkit_vision_barcode.zza.zzb+124)
10-31 18:40:45.811 9017 9017 F DEBUG : #15 pc 00000000021cabe0 /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.android.gms.internal.mlkit_vision_barcode.zzvt.zzd+128)
10-31 18:40:45.811 9017 9017 F DEBUG : #16 pc 0000000002112d18 /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.mlkit.vision.barcode.internal.zzn.zza+776)
10-31 18:40:45.811 9017 9017 F DEBUG : #17 pc 00000000020cde84 /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.mlkit.vision.barcode.internal.zzk.zze+164)
10-31 18:40:45.812 9017 9017 F DEBUG : #18 pc 00000000021da77c /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.mlkit.vision.barcode.internal.zzk.run+92)
10-31 18:40:45.812 9017 9017 F DEBUG : #19 pc 00000000021e4cd8 /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.mlkit.vision.common.internal.MobileVisionBase.zza+136)
10-31 18:40:45.812 9017 9017 F DEBUG : #20 pc 00000000021e3aac /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.mlkit.vision.common.internal.zza.call+76)
10-31 18:40:45.812 9017 9017 F DEBUG : #21 pc 00000000021d51d4 /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.mlkit.common.sdkinternal.ModelResource.zza+244)
10-31 18:40:45.812 9017 9017 F DEBUG : #22 pc 00000000021da6b4 /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.mlkit.common.sdkinternal.zzn.run+132)
10-31 18:40:45.812 9017 9017 F DEBUG : #23 pc 00000000021cc3b8 /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.mlkit.common.sdkinternal.zzt.run+152)
10-31 18:40:45.812 9017 9017 F DEBUG : #24 pc 0000000002110c08 /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.mlkit.common.sdkinternal.MlKitThreadPool.zze+152)
10-31 18:40:45.812 9017 9017 F DEBUG : #25 pc 00000000021ccb2c /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzc+140)
10-31 18:40:45.812 9017 9017 F DEBUG : #26 pc 00000000021ceb98 /memfd:jit-cache (deleted) (offset 0x2000000) (com.google.mlkit.common.sdkinternal.zzk.run+56)
10-31 18:40:45.812 9017 9017 F DEBUG : #27 pc 00000000020f9c74 /memfd:jit-cache (deleted) (offset 0x2000000) (java.util.concurrent.ThreadPoolExecutor.runWorker+388)
10-31 18:40:45.812 9017 9017 F DEBUG : #28 pc 0000000000135564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.813 9017 9017 F DEBUG : #29 pc 00000000001ab7e8 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.813 9017 9017 F DEBUG : #30 pc 00000000003260c0 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.813 9017 9017 F DEBUG : #31 pc 000000000031c2a8 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+912) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.813 9017 9017 F DEBUG : #32 pc 00000000006919e0 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+848) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.813 9017 9017 F DEBUG : #33 pc 000000000012f814 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.813 9017 9017 F DEBUG : #34 pc 00000000001f8eb0 /apex/com.android.art/javalib/core-oj.jar (java.util.concurrent.ThreadPoolExecutor$Worker.run+4)
10-31 18:40:45.813 9017 9017 F DEBUG : #35 pc 00000000006936c4 /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1812) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.813 9017 9017 F DEBUG : #36 pc 000000000012fa14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.814 9017 9017 F DEBUG : #37 pc 000000000054bfc4 /data/app/~~WWPxHzksEkaj9FpEv1Ufjw==/com.ticketscloud.scanner-0uNGsi-S3GFiZ9zPOq6yYQ==/oat/arm64/base.vdex (com.google.mlkit.common.sdkinternal.MlKitThreadPool.zzd+20)
10-31 18:40:45.815 9017 9017 F DEBUG : #38 pc 0000000000694be0 /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+1224) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.815 9017 9017 F DEBUG : #39 pc 000000000012f994 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.817 9017 9017 F DEBUG : #40 pc 0000000000550334 /data/app/~~WWPxHzksEkaj9FpEv1Ufjw==/com.ticketscloud.scanner-0uNGsi-S3GFiZ9zPOq6yYQ==/oat/arm64/base.vdex (com.google.mlkit.common.sdkinternal.zzi.run+4)
10-31 18:40:45.817 9017 9017 F DEBUG : #41 pc 00000000006936c4 /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1812) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.817 9017 9017 F DEBUG : #42 pc 000000000012fa14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.817 9017 9017 F DEBUG : #43 pc 00000000000eb858 /apex/com.android.art/javalib/core-oj.jar (java.lang.Thread.run+8)
10-31 18:40:45.818 9017 9017 F DEBUG : #44 pc 0000000000313550 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.6193178744241938144)+264) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.818 9017 9017 F DEBUG : #45 pc 0000000000680168 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+776) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.818 9017 9017 F DEBUG : #46 pc 000000000013eff8 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.818 9017 9017 F DEBUG : #47 pc 0000000000135564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.818 9017 9017 F DEBUG : #48 pc 00000000001ab7e8 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.818 9017 9017 F DEBUG : #49 pc 0000000000567e94 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.818 9017 9017 F DEBUG : #50 pc 00000000005b8184 /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1308) (BuildId: bd4bbcfee9112dc043c9dc3ab6bd8478)
10-31 18:40:45.818 9017 9017 F DEBUG : #51 pc 00000000000ed098 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 7c95cc0d17d92058007afa23409fd94e)
10-31 18:40:45.819 9017 9017 F DEBUG : #52 pc 000000000008cb10 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 7c95cc0d17d92058007afa23409fd94e)
Camera Device
{
"sensorOrientation": "landscape-right",
"hardwareLevel": "limited",
"maxZoom": 4,
"minZoom": 1,
"supportsLowLightBoost": false,
"neutralZoom": 1,
"physicalDevices": [
"wide-angle-camera"
],
"supportsFocus": true,
"supportsRawCapture": false,
"isMultiCam": false,
"name": "BACK (0)",
"hasFlash": true,
"hasTorch": true,
"position": "back",
"id": "0"
}
Device
Android Samsung, Honor, Huawei, Redmi
VisionCamera Version
3.6.4
Can you reproduce this issue in the VisionCamera Example app?
Yes, I can reproduce the same issue in the Example app here
Additional information
- I am using Expo
- I have enabled Frame Processors (react-native-worklets-core)
- I have read the Troubleshooting Guide
- I agree to follow this projectās Code of Conduct
- I searched for similar issues in this repository and found none.
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Reactions: 13
- Comments: 39 (11 by maintainers)
Iāve done some experimentation today:
This seem to indicate a race condition when closing down the code reader, or that itās trying to work with image buffers which are freed when closing the camera.
I open/close the camera using
isActive
Google seems to recommend using
acquireLatestImage()
instead ofacquireNextImage()
,but this didnāt seem make any difference in my testing(not sure that my changes actually compiled properly using Expo, so this is still untested).I might have found a way to avoid or minimize this. Iām curious if others are doing what I was and unmounting the camera component/navigating away right after they get a scan. I canāt seem to reproduce the crash anymore after:
isActive={false}
on the camera after I get a scanGive this a shot in your apps. Iām on
v3.8.0
now.Iām hitting this as well (tried both
3.8.2
and3.9.0-beta.0
) when using my barcode scanner plugin that leverages a frame processor and that relies as well on Google MLKit. Can be reproduced pretty quickly with a hard mount/unmount interval, so I guess itās on MLKit side, but still interesting what changes lead to an increase in reports.By the way, for tracking purposes, this bug is logged in the Googleās public issue tracker as #294890843 and #314930525. We may have better luck if we tackle this issue at its source.
Iām seeing the same issue appearing at random after scanning a QR code.
Perhaps unsurprisingly, this happens whether using the
com.google.android.gms/play-services-mlkit-barcode-scanning@18.3.0
or the bundledcom.google.mlkit:barcode-scanning@17.2.0
.The frequency of this issue and the numbers being reported from the field are staggering. It appears that the problem lies within the MLKit itself, rather than this specific library, though. Letās hope Google gets their act together and deals with this soon.
@rodgomesc, thanks for the solution! I tried it, but it unfortunately didnāt fix the issue on my end. Still, appreciate your help! š
I can confirm, though, that downgrading to v3.5.1 seems to do the trick. š Hereās the commit diff between v3.5.1 and v3.6.4, for the interested. Iāll dig into this and see if I can make progress.
For reference and posterity, you can also track this issue via #2189 in this project, while the root cause itself, which lies within the
mlkit
package, can be tracked at googlesamples/mlkit#714.Below is what Iām seeing:
Agree that we should comment on the Google Issue Tracker instead - this does not seem like an issue on my end. See the issues #294890843 and #314930525.
I have the same problem, happens to around 4% of my users - so pretty frequent. 3.7.0 did not solve this issue.
still seems to be an issue in 3.7.0 ⦠Tried both VisionCamera_enableCodeScanner=true and VisionCamera_enableCodeScanner=false Samsung device (SDK 33)
can you guys please test if this change solves the issue for you?
remove
node_modules
modify vision-camera inpackage.json
to be like below and see what happensMight be worth trying the latest
4.0.0-beta.10
as it seems to have fixed this race condition issues when unmounting the camera, see https://github.com/mrousavy/react-native-vision-camera/issues/2341#issuecomment-2018139327.@rodgomesc It still crashes for me on android after scanning a qr code (same on latest):
cannot open libmiuindbg.so: No such file or directory
. On my device, it works with 3.6.8, but we got error reports of the BarhopperV3_recognizeBufferNative crash11-23 10:30:50.911 1195 2550 I CHIUSECASE: [INFO ] chxperf.cpp:850 ReleasePerfLock() Release perflock type: 16 11-23 10:30:50.911 1195 2550 I CHIUSECASE: [INFO ] chxperf.cpp:1138 ReleasePerfLock() Perflock already released or not acquired 11-23 10:30:50.911 1195 2550 I CHIUSECASE: [INFO ] chxextensionmodule.cpp:1198 GetCameraIdIndex() AppId => LogicalId:0 => 0 11-23 10:30:50.911 1195 2550 E CamX : [ERROR][HAL ] camxhal3module.cpp:149 ReleaseTorchForCamera() Facing = 0. 11-23 10:30:50.911 1195 2550 E CamX : [ERROR][HAL ] camxhal3module.cpp:155 ReleaseTorchForCamera() sensor: 0, logicalCameraId: 0, facing: 0 11-23 10:30:50.911 1195 2550 I CamX : [ INFO][HAL ] camxhal3module.cpp:377 SetTorchModeInternal() forbid torchStatus 1 3 0 11-23 10:30:50.911 1195 2550 I CamX : [ INFO][HAL ] camxhal3module.cpp:385 SetTorchModeInternal() Torch notify state is (inReleaseMode = 1, dropCallbacks = 0, logicalCameraId = 0) 11-23 10:30:50.911 1748 25093 I CameraProviderManager: Camera device device@3.5/legacy/0 torch status is now AVAILABLE_OFF 11-23 10:30:50.911 1748 25093 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=1 11-23 10:30:50.912 14976 15002 I BpBinder: onLastStrongRef automatically unlinking death recipients: <uncached descriptor> 11-23 10:30:50.912 1195 2550 E CamX : [ERROR][HAL ] camxhal3module.cpp:155 ReleaseTorchForCamera() sensor: 1, logicalCameraId: 0, facing: 1 11-23 10:30:50.912 1195 2550 E CamX : [ERROR][HAL ] camxhal3module.cpp:155 ReleaseTorchForCamera() sensor: 2, logicalCameraId: 0, facing: 0 11-23 10:30:50.912 1195 2550 I CamX : [ INFO][HAL ] camxhal3module.cpp:377 SetTorchModeInternal() forbid torchStatus 1 3 2 11-23 10:30:50.912 1195 2550 I CamX : [ INFO][HAL ] camxhal3module.cpp:385 SetTorchModeInternal() Torch notify state is (inReleaseMode = 1, dropCallbacks = 0, logicalCameraId = 2) 11-23 10:30:50.912 1748 25093 I CameraProviderManager: Camera device device@3.5/legacy/2 torch status is now AVAILABLE_OFF 11-23 10:30:50.912 1748 25093 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=2, newStatus=1 11-23 10:30:50.912 1748 25093 E CameraService: onTorchStatusChangedLocked: cannot get torch status of camera 2: No such file or directory (-2) 11-23 10:30:50.912 1195 2550 E CamX : [ERROR][HAL ] camxhal3module.cpp:155 ReleaseTorchForCamera() sensor: 3, logicalCameraId: 0, facing: 0 11-23 10:30:50.912 1195 2550 I CamX : [ INFO][HAL ] camxhal3module.cpp:377 SetTorchModeInternal() forbid torchStatus 1 3 3 11-23 10:30:50.912 1195 2550 I CamX : [ INFO][HAL ] camxhal3module.cpp:385 SetTorchModeInternal() Torch notify state is (inReleaseMode = 1, dropCallbacks = 0, logicalCameraId = 3) 11-23 10:30:50.912 1748 25093 I CameraProviderManager: Camera device device@3.5/legacy/3 torch status is now AVAILABLE_OFF 11-23 10:30:50.912 1748 25093 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=3, newStatus=1 11-23 10:30:50.913 1195 2550 E CamX : [ERROR][HAL ] camxhal3module.cpp:155 ReleaseTorchForCamera() sensor: 4, logicalCameraId: 0, facing: 0 11-23 10:30:50.913 1195 2550 I CamX : [ INFO][HAL ] camxhal3module.cpp:377 SetTorchModeInternal() forbid torchStatus 1 3 4 11-23 10:30:50.913 1195 2550 I CamX : [ INFO][HAL ] camxhal3module.cpp:385 SetTorchModeInternal() Torch notify state is (inReleaseMode = 1, dropCallbacks = 0, logicalCameraId = 4) 11-23 10:30:50.913 1748 25093 I CameraProviderManager: Camera device device@3.5/legacy/4 torch status is now AVAILABLE_OFF 11-23 10:30:50.913 1748 25093 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=4, newStatus=1 11-23 10:30:50.913 1195 2550 E CamX : [ERROR][HAL ] camxhal3module.cpp:155 ReleaseTorchForCamera() sensor: 5, logicalCameraId: 0, facing: 0 11-23 10:30:50.913 1195 2550 I CamX : [ INFO][HAL ] camxhal3module.cpp:377 SetTorchModeInternal() forbid torchStatus 1 3 5 11-23 10:30:50.913 1195 2550 I CamX : [ INFO][HAL ] camxhal3module.cpp:385 SetTorchModeInternal() Torch notify state is (inReleaseMode = 1, dropCallbacks = 0, logicalCameraId = 5) 11-23 10:30:50.913 1748 25093 I CameraProviderManager: Camera device device@3.5/legacy/5 torch status is now AVAILABLE_OFF 11-23 10:30:50.913 1748 25093 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=5, newStatus=1 11-23 10:30:50.913 1195 2550 E CamX : [ERROR][HAL ] camxhal3module.cpp:155 ReleaseTorchForCamera() sensor: 6, logicalCameraId: 0, facing: 0 11-23 10:30:50.913 1195 2550 I CamX : [ INFO][HAL ] camxhal3module.cpp:377 SetTorchModeInternal() forbid torchStatus 1 3 6 11-23 10:30:50.913 1195 2550 I CamX : [ INFO][HAL ] camxhal3module.cpp:385 SetTorchModeInternal() Torch notify state is (inReleaseMode = 1, dropCallbacks = 0, logicalCameraId = 6) 11-23 10:30:50.913 1748 25093 I CameraProviderManager: Camera device device@3.5/legacy/6 torch status is now AVAILABLE_OFF 11-23 10:30:50.913 1748 25093 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=6, newStatus=1 11-23 10:30:50.913 14593 14613 W CameraManagerGlobal: ignore the torch status update of camera: 3 11-23 10:30:50.913 1195 2550 E CamX : [ERROR][HAL ] camxhal3module.cpp:155 ReleaseTorchForCamera() sensor: 7, logicalCameraId: 0, facing: 1 11-23 10:30:50.913 1195 2550 I CHIUSECASE: [INFO ] chxextensionmodule.cpp:1198 GetCameraIdIndex() AppId => LogicalId:0 => 0 11-23 10:30:50.913 1195 2550 I CHIUSECASE: [INFO ] chxextensionmodule.cpp:1198 GetCameraIdIndex() AppId => LogicalId:0 => 0 11-23 10:30:50.913 1195 2550 I CamX : [ INFO][HAL ] camxhaldevice.cpp:1139 CloseCachedSensorHandles() Get logicalCameraType 0 11-23 10:30:50.913 14593 14613 W CameraManagerGlobal: ignore the torch status update of camera: 4 11-23 10:30:50.913 5151 22168 W CameraManagerGlobal: ignore the torch status update of camera: 3 11-23 10:30:50.913 14593 14613 W CameraManagerGlobal: ignore the torch status update of camera: 5 11-23 10:30:50.914 5151 22168 W CameraManagerGlobal: ignore the torch status update of camera: 4 11-23 10:30:50.914 1748 25093 I Camera3-Device: disconnectImpl: X 11-23 10:30:50.914 14593 14613 W CameraManagerGlobal: ignore the torch status update of camera: 6 11-23 10:30:50.914 5151 22168 W CameraManagerGlobal: ignore the torch status update of camera: 5 11-23 10:30:50.914 5151 22168 W CameraManagerGlobal: ignore the torch status update of camera: 6 11-23 10:30:50.913 5087 5149 W CameraManagerGlobal: ignore the torch status update of camera: 3 11-23 10:30:50.915 5087 5149 W CameraManagerGlobal: ignore the torch status update of camera: 4 11-23 10:30:50.915 5087 5149 W CameraManagerGlobal: ignore the torch status update of camera: 5 11-23 10:30:50.915 14976 15464 W libc : Access denied finding property āvendor.camera.aux.packagelistā 11-23 10:30:50.915 14593 14613 E CameraManagerGlobal: Camera 5 is not available. Ignore physical camera status change 11-23 10:30:50.915 5087 5150 W CameraManagerGlobal: ignore the torch status update of camera: 6 11-23 10:30:50.915 5087 5150 E CameraManagerGlobal: Camera 5 is not available. Ignore physical camera status change 11-23 10:30:50.915 14976 15464 W CameraManagerGlobal: ignore the torch status update of camera: 3 11-23 10:30:50.916 1748 25093 I CameraService: disconnect: Disconnected client for camera 0 for PID 14976 11-23 10:30:50.916 1748 25093 E CameraService: setNfcPolling: E 11-23 10:30:50.916 1748 25093 E CameraService: setNfcPolling: X 11-23 10:30:50.916 5151 19880 E CameraManagerGlobal: Camera 5 is not available. Ignore physical camera status change 11-23 10:30:50.916 14976 14976 D CameraDevice-JV-0: close: X 11-23 10:30:50.916 14976 15464 W libc : Access denied finding property āvendor.camera.aux.packagelistā 11-23 10:30:50.916 14976 14976 I SurfaceOutput: Closing BarcodeScanner⦠11-23 10:30:50.916 5151 5151 I BeautyService: onCameraAvailable:0 11-23 10:30:50.916 14976 15464 W CameraManagerGlobal: ignore the torch status update of camera: 4 11-23 10:30:50.917 3378 3579 D FlashlightController: TorchCallback: onTorchModeChanged: enabled: false 11-23 10:30:50.918 14976 15464 W libc : Access denied finding property āvendor.camera.aux.packagelistā 11-23 10:30:50.918 14976 15464 W CameraManagerGlobal: ignore the torch status update of camera: 5 11-23 10:30:50.918 14976 15112 W fotologusmobil: Long monitor contention with owner main (14976) at com.facebook.react.uimanager.ViewManager com.facebook.react.uimanager.NativeViewHierarchyManager.resolveViewManager(int)(NativeViewHierarchyManager.java:114) waiters=0 in int com.facebook.react.uimanager.NativeViewHierarchyManager.getRootViewNum() for 702ms 11-23 10:30:50.919 14976 15464 W libc : Access denied finding property āvendor.camera.aux.packagelistā 11-23 10:30:50.919 14976 15464 W CameraManagerGlobal: ignore the torch status update of camera: 6 11-23 10:30:50.921 14976 15464 E CameraManagerGlobal: Camera 5 is not available. Ignore physical camera status change 11-23 10:30:50.928 14976 14976 W Looper : PerfMonitor doFrame : time=723ms vsyncFrame=0 latency=1ms procState=-1 11-23 10:30:50.929 14976 14976 I Choreographer: Skipped 42 frames! The application may be doing too much work on its main thread. 11-23 10:30:50.938 14976 14976 W Looper : PerfMonitor doFrame : time=9ms vsyncFrame=0 latency=708ms procState=-1 historyMsgCount=4 11-23 10:30:50.949 14976 14976 D IS_CTS_MODE: false 11-23 10:30:50.949 14976 14976 D MULTI_WINDOW_SWITCH_ENABLED: false 11-23 10:30:50.950 1372 1372 D CompositionEngine: writeOutputDependentGeometryStateToHWC layer[com.fotologusmobile/com.fotologusmobile.MainActivity#0] set Z 134217728 miFodLayer 134217728 11-23 10:30:50.950 1372 1372 D CompositionEngine: writeOutputDependentGeometryStateToHWC layer[#0] set Z 134217729 miFodLayer 134217728 11-23 10:30:50.950 1372 1372 D CompositionEngine: writeOutputDependentGeometryStateToHWC layer[StatusBar#0] set Z 134217730 miFodLayer 134217728 11-23 10:30:50.950 1372 1372 D CompositionEngine: writeOutputDependentGeometryStateToHWC layer[NavigationBar0#0] set Z 134217731 miFodLayer 134217728 11-23 10:30:50.950 1372 1372 D CompositionEngine: writeOutputDependentGeometryStateToHWC layer[RoundCornerTop#0] set Z 134217732 miFodLayer 134217728 11-23 10:30:50.950 1372 1372 D CompositionEngine: writeOutputDependentGeometryStateToHWC layer[RoundCornerBottom#0] set Z 134217733 miFodLayer 134217728
11-23 10:30:50.958 14976 15002 I OpenGLRenderer: Davey! duration=731ms; Flags=0, FrameTimelineVsyncId=5271905, IntendedVsync=475006579992478, Vsync=475006579992478, InputEventId=0, HandleInputStart=475006580657491, AnimationStart=475006580660772, PerformTraversalsStart=475007296530876, DrawStart=475007297202751, FrameDeadline=475006596659144, FrameInterval=475006580635043, FrameStartTime=16666666, SyncQueued=475007299674782, SyncStart=475007299972386, IssueDrawCommandsStart=475007303516918, SwapBuffers=475007308849365, FrameCompleted=475007312201240, DequeueBufferDuration=77292, QueueBufferDuration=2076510, GpuCompleted=475007312201240, SwapBuffersCompleted=475007312201240, DisplayPresentTime=0, 11-23 10:30:50.958 15483 15483 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 11-23 10:30:50.958 15483 15483 F DEBUG : Build fingerprint: āXiaomi/toco_global/toco:12/SKQ1.210908.001/V13.0.4.0.SFNMIXM:user/release-keysā 11-23 10:30:50.958 15483 15483 F DEBUG : Revision: ā0ā 11-23 10:30:50.958 15483 15483 F DEBUG : ABI: āarm64ā 11-23 10:30:50.958 15483 15483 F DEBUG : Timestamp: 2023-11-23 10:30:50.552294286+0100 11-23 10:30:50.958 15483 15483 F DEBUG : Process uptime: 0s 11-23 10:30:50.958 15483 15483 F DEBUG : Cmdline: com.fotologusmobile 11-23 10:30:50.958 15483 15483 F DEBUG : pid: 14976, tid: 15460, name: pool-20-thread- >>> com.fotologusmobile <<< 11-23 10:30:50.958 15483 15483 F DEBUG : uid: 10523 11-23 10:30:50.958 15483 15483 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7968145370 11-23 10:30:50.958 15483 15483 F DEBUG : x0 00000079680e0de8 x1 00000000000000d0 x2 00000079680e0f08 x3 0000000000000002 11-23 10:30:50.958 15483 15483 F DEBUG : x4 00000079680e1140 x5 00000079680e11a8 x6 b400007b00000100 x7 00000079680e19e0 11-23 10:30:50.958 15483 15483 F DEBUG : x8 0000000000000000 x9 0000000000000068 x10 000000000000005f x11 b400007996db8800 11-23 10:30:50.958 15483 15483 F DEBUG : x12 0000000000000067 x13 0000000000058370 x14 0000007968145370 x15 0000007968144e70 11-23 10:30:50.958 15483 15483 F DEBUG : x16 00000079680ed000 x17 0000007bac0f8884 x18 00000000000e05fc x19 00000079680e0f08 11-23 10:30:50.958 15483 15483 F DEBUG : x20 00000079680e0ea8 x21 00000079680e1040 x22 0000000000000068 x23 000000000000005f 11-23 10:30:50.958 15483 15483 F DEBUG : x24 b400007b01d174fc x25 0000007b24e16000 x26 0000000000000007 x27 00000079680e16f8 11-23 10:30:50.958 15483 15483 F DEBUG : x28 00000079680e1738 x29 00000000000006ef 11-23 10:30:50.958 15483 15483 F DEBUG : lr 00000079763689ec sp 00000079680e0de0 pc 0000007976368ab4 pst 0000000080000000 11-23 10:30:50.958 15483 15483 F DEBUG : backtrace: 11-23 10:30:50.958 15483 15483 F DEBUG : NOTE: Function names and BuildId information is missing for some frames due 11-23 10:30:50.958 15483 15483 F DEBUG : NOTE: to unreadable libraries. For unwinds of apps, only shared libraries 11-23 10:30:50.958 15483 15483 F DEBUG : NOTE: found under the lib/ directory are readable. 11-23 10:30:50.958 15483 15483 F DEBUG : NOTE: On this device, run setenforce 0 to make the libraries readable. 11-23 10:30:50.958 15483 15483 F DEBUG : #00 pc 0000000000128ab4 /data/user_de/0/com.google.android.gms/app_chimera/m/00000583/dl-VisionBarcode.optional_234414100400.apk 11-23 10:30:50.958 15483 15483 F DEBUG : #01 pc 00000000000812d4 /data/user_de/0/com.google.android.gms/app_chimera/m/00000583/dl-VisionBarcode.optional_234414100400.apk 11-23 10:30:50.958 15483 15483 F DEBUG : #02 pc 000000000007af18 /data/user_de/0/com.google.android.gms/app_chimera/m/00000583/dl-VisionBarcode.optional_234414100400.apk 11-23 10:30:50.958 15483 15483 F DEBUG : #03 pc 000000000007ac18 /data/user_de/0/com.google.android.gms/app_chimera/m/00000583/dl-VisionBarcode.optional_234414100400.apk 11-23 10:30:50.958 15483 15483 F DEBUG : #04 pc 000000000007b1c8 /data/user_de/0/com.google.android.gms/app_chimera/m/00000583/dl-VisionBarcode.optional_234414100400.apk 11-23 10:30:50.958 15483 15483 F DEBUG : #05 pc 0000000000079554 /data/user_de/0/com.google.android.gms/app_chimera/m/00000583/dl-VisionBarcode.optional_234414100400.apk 11-23 10:30:50.958 15483 15483 F DEBUG : #06 pc 00000000000795f4 /data/user_de/0/com.google.android.gms/app_chimera/m/00000583/dl-VisionBarcode.optional_234414100400.apk 11-23 10:30:50.958 15483 15483 F DEBUG : #07 pc 000000000034aa30 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #08 pc 0000000000333fa4 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #09 pc 0000000000380e60 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+300) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #10 pc 0000000000380684 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1960) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #11 pc 00000000004a07d8 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+10904) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #12 pc 000000000034d1d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #13 pc 0000000000054c28 /data/user_de/0/com.google.android.gms/app_chimera/m/00000583/dl-VisionBarcode.optional_234414100400.apk 11-23 10:30:50.958 15483 15483 F DEBUG : #14 pc 0000000000378bb0 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.11907307138045539842)+232) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #15 pc 0000000000511d44 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+5252) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #16 pc 000000000049e100 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false>(art::interpreter::SwitchImplContext*)+960) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #17 pc 000000000034d1d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #18 pc 0000000000051d88 /data/user_de/0/com.google.android.gms/app_chimera/m/00000583/dl-VisionBarcode.optional_234414100400.apk 11-23 10:30:50.958 15483 15483 F DEBUG : #19 pc 0000000000378bb0 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.11907307138045539842)+232) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #20 pc 00000000003784a8 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+964) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #21 pc 000000000034ab68 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 4cfdaa9e5146c43e20ae36ee1caf9b7f) 11-23 10:30:50.958 15483 15483 F DEBUG : #22 pc 0000000002024c60 /memfd:jit-cache (deleted) 11-23 10:30:50.962 14976 15471 I OpenGLRenderer: Davey! duration=723ms; Flags=0, FrameTimelineVsyncId=5271907, IntendedVsync=475006596408195, Vsync=475007296408167, InputEventId=0, HandleInputStart=475007304936709, AnimationStart=475007304941136, PerformTraversalsStart=475007305358532, DrawStart=475007305859678, FrameDeadline=475006629741527, FrameInterval=475007304766240, FrameStartTime=16666666, SyncQueued=475007306295095, SyncStart=475007312923272, IssueDrawCommandsStart=475007313766084, SwapBuffers=475007317209782, FrameCompleted=475007326825511, DequeueBufferDuration=27395, QueueBufferDuration=2490782, GpuCompleted=475007326825511, SwapBuffersCompleted=475007320364574, DisplayPresentTime=0, 11-23 10:30:50.988 15483 15483 E crash_dump64: cannot open libmiuindbg.so: No such file or directory 11-23 10:30:50.990 715 715 E tombstoned: Tombstone written to: tombstone_21 11-23 10:30:50.995 2052 15512 I DropBoxManagerService: add tag=data_app_native_crash isTagEnabled=true flags=0x2 11-23 10:30:50.999 2052 15510 W ActivityTaskManager: Force finishing activity com.fotologusmobile/.MainActivity 11-23 10:30:51.003 2052 15510 W MiuiFreeFormGesturePointerEventListener: setMiuiFreeFormTouchExcludeRegion mTouchExcludeRegion = SkRegion((0,0,1080,73)(0,333,92,570)(0,2210,1080,2340)) 11-23 10:30:51.005 2052 2668 I BootReceiver: Copying /data/tombstones/tombstone_21 to DropBox (SYSTEM_TOMBSTONE) 11-23 10:30:51.005 2052 2668 I DropBoxManagerService: add tag=SYSTEM_TOMBSTONE isTagEnabled=true flags=0x6 11-23 10:30:51.014 2052 15510 D ActivityTrigger: ActivityTrigger activityPauseTrigger 11-23 10:30:51.017 2052 15510 W MiuiFreeFormGesturePointerEventListener: setMiuiFreeFormTouchExcludeRegion mTouchExcludeRegion = SkRegion((0,0,1080,2340))
11-23 10:30:51.018 2052 2668 I DropBoxManagerService: add tag=SYSTEM_TOMBSTONE_PROTO isTagEnabled=true flags=0x4
No Expo v50, using v0.73.6
I havenāt been able to crash v4 yet, this issue seems fixed! š
Java_com_google_android_libraries_barhopper_BarhopperV3_recognizeBufferNative. Getting the same issue in production, It occurs randomly while scanning and navigating between screens.
Also this guy: https://github.com/googlesamples/mlkit/issues/714
Iām seeing some reports of this crash coming from my prod app (vision-camera v3.6.17).
I can reproduce it on roughly 25% of my barcode scansā¦crashes right after the successful scan.
Update: Tried out 3.7.0ā¦no difference.
Same error happened to me on
v3.6.9
. Going back tov3.5.1
seems to solve this issue.Thank you for the fix! Iāve tested it on multiple devices, and it works perfectly. go ahead and create a pull request.
looking forward to know if it will work then iāll send a pr, @WitchMad qualquer coisa me chama no discord user: rodgomesc
Appears to be working! I will run it on others devices to confirm.
You can using try another version of MLKit by editing the
build.gradle
of vision-camera.I have no idea which (or if any) other version works so, good hunting.