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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Crash in CodeScanner/MLKit: BarhopperV3_recognizeBufferNative #2116

Closed
3 of 5 tasks
iliapnmrv opened this issue Oct 31, 2023 · 40 comments
Closed
3 of 5 tasks

馃悰 Crash in CodeScanner/MLKit: BarhopperV3_recognizeBufferNative #2116

iliapnmrv opened this issue Oct 31, 2023 · 40 comments
Labels
馃悰 bug Something isn't working

Comments

@iliapnmrv
Copy link

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

@iliapnmrv iliapnmrv added the 馃悰 bug Something isn't working label Oct 31, 2023
@zzz08900
Copy link
Contributor

zzz08900 commented Nov 1, 2023

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.

@parlet
Copy link
Contributor

parlet commented Nov 3, 2023

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 bundled com.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.

@mohshafie
Copy link

Also same issue after upgrading to version 3
Java_com_google_android_libraries_barhopper_BarhopperV3_recognizeBufferNative

Another reported issue that i think is related
Java_com_google_android_gms_vision_barcode_internal_NativeBarcodeDetector_recognizeBufferNative

Screenshot 1445-05-07 at 12 13 02鈥疨M

@WitchMad
Copy link

Any updates? Having same issue.

@rodgomesc
Copy link
Contributor

can you guys please test if this change solves the issue for you?

remove node_modules modify vision-camera in package.json to be like below and see what happens

"dependencies": {
  "react-native-vision-camera": "github:rodgomesc/react-native-vision-camera#cad3699"
}

@WitchMad
Copy link

Appears to be working! I will run it on others devices to confirm.

@rodgomesc
Copy link
Contributor

rodgomesc commented Nov 21, 2023

Appears to be working! I will run it on others devices to confirm.

looking forward to know if it will work then i'll send a pr, @WitchMad qualquer coisa me chama no discord user: rodgomesc

@OtayNacef
Copy link

can you guys please test if this change solves the issue for you?

remove node_modules modify vision-camera in package.json to be like below and see what happens

Thank you for the fix! I've tested it on multiple devices, and it works perfectly. go ahead and create a pull request.

@iliapnmrv
Copy link
Author

iliapnmrv commented Nov 22, 2023

does anyone get an npm error once i set "github:rodgomesc/react-native-vision-camera#cad3699"?

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/user/.npm/_cacache/tmp/git-cloneOHBQrz/package.json                                                  
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/user/.npm/_cacache/tmp/git-cloneOHBQrz/package.json'      
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 
npm ERR! A complete log of this run can be found in: /Users/user/.npm/_logs/debug-0.log          

@netdown
Copy link

netdown commented Nov 23, 2023

@iliapnmrv Use gitpkg
"react-native-vision-camera": "https://gitpkg.now.sh/rodgomesc/react-native-vision-camera/package?cad3699"

@iliapnmrv
Copy link
Author

@iliapnmrv Use gitpkg "react-native-vision-camera": "https://gitpkg.now.sh/rodgomesc/react-native-vision-camera/package?cad3699"

it works, thanks a lot鉂わ笍

@netdown
Copy link

netdown commented Nov 23, 2023

@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 crash

11-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:
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 : #1 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 : #2 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 : #3 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 : #5 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 : #6 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 : #7 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 : #8 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 : #9 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(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(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(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(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

@parlet
Copy link
Contributor

parlet commented Nov 24, 2023

@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:

11-24 08:04:04.444 29862 29862 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-24 08:04:04.445 29862 29862 F DEBUG   : Build fingerprint: 'samsung/a71naeea/a71:13/TP1A.220624.014/A715FXXUADWH4:user/release-keys'
11-24 08:04:04.445 29862 29862 F DEBUG   : Revision: '6'
11-24 08:04:04.445 29862 29862 F DEBUG   : ABI: 'arm64'
11-24 08:04:04.445 29862 29862 F DEBUG   : Processor: '2'
11-24 08:04:04.445 29862 29862 F DEBUG   : Timestamp: 2023-11-24 08:04:03.941381277+0100
11-24 08:04:04.445 29862 29862 F DEBUG   : Process uptime: 89s
11-24 08:04:04.445 29862 29862 F DEBUG   : Cmdline: [redacted]
11-24 08:04:04.445 29862 29862 F DEBUG   : pid: 29378, tid: 29614, name: pool-8-thread-8  >>> [redacted] <<<
11-24 08:04:04.445 29862 29862 F DEBUG   : uid: 10439
11-24 08:04:04.445 29862 29862 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x00000075e01ad74c
[鈥
11-24 08:04:04.445 29862 29862 F DEBUG   : backtrace:
11-24 08:04:04.445 29862 29862 F DEBUG   :       #00 pc 00000000000ed660  /data/app/~~5ZTjAHjyw9v0-g7a8S1RxQ==/[redacted]-ND50NrMo9LMyMfhybnr8LA==/lib/arm64/libbarhopper_v3.so (BuildId: cf64ac3d5cfd71b04d3bc4112d678e48)

@SamiChab
Copy link

SamiChab commented Dec 6, 2023

Same error happened to me on v3.6.9. Going back to v3.5.1 seems to solve this issue.

@mrousavy
Copy link
Owner

mrousavy commented Jan 8, 2024

Heyo! Does #2355 maybe fix your issue?

@4yki
Copy link

4yki commented Jan 8, 2024

still seems to be an issue in 3.7.0 .. Tried both VisionCamera_enableCodeScanner=true and VisionCamera_enableCodeScanner=false
Samsung device (SDK 33)

@augustjoergensen
Copy link

I have the same problem, happens to around 4% of my users - so pretty frequent. 3.7.0 did not solve this issue.

@marcshilling
Copy link

marcshilling commented Jan 11, 2024

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.

@marcshilling
Copy link

@rodgomesc did you ever make a PR for this fix?

@mrousavy
Copy link
Owner

@parlet I just went thru the changes again and nothing seems to be related to the CodeScanner.

I don't know why this is happening, on my test devices it does not happen so I currently cannot reproduce this.

If you / your company absolutely needs this fixed, consider contracting me/my agency to fix this issue

@parlet
Copy link
Contributor

parlet commented Jan 16, 2024

@mrousavy, Yeah, I remember doing a cursory run through the code diffs before, and I didn't see anything that would attract my attention either, although of course I don't have an in-depth knowledge of the code base.

I hope I'll find some time to debug this issue and dig deeper into what within this library might help, although ultimately, the problem lies in the libbarhopper_v3.so and that's where we'd ideally find the solution. Something tells me this might be a race condition.

Anyway, thank you very much for your attention to this issue. =)
Just let me know If there is anything more I could assist with.

@marcshilling
Copy link

marcshilling commented Jan 16, 2024

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:

  1. Setting isActive={false} on the camera after I get a scan
  2. Inserting a brief setTimeout delay of 500ms before calling my Navigation.dismiss

Give this a shot in your apps. I'm on v3.8.0 now.

@augustjoergensen
Copy link

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:

  1. Setting isActive={false} on the camera after I get a scan
  2. Inserting a brief setTimeout delay of 500ms before calling my Navigation.dismiss

Give this a shot in your apps. I'm on v3.8.0 now.

I will try this - we are using the camera in many different workflows - this means going from one camera instance to the next pretty rapidly. Currently i have minimised the errors by waiting 100 m/s on viewDidMount to initialise the camera.

@marcshilling
Copy link

I'm still getting reports of it in prod even on 3.5.1 for what it's worth, although definitely seems less frequent

@parlet
Copy link
Contributor

parlet commented Jan 23, 2024

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.

@marcshilling
Copy link

I can also seem to reproduce this every once in a while by simply backgrounding the app while the camera view is active, then resuming the app. On the occasional resume, this crash will occur right away.

@mrousavy
Copy link
Owner

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.

@mrousavy mrousavy changed the title 馃悰 [Android] [CodeScanner] Java_com_google_android_libraries_barhopper_BarhopperV3_recognizeBufferNative 馃悰 Crash in CodeScanner/MLKit: Java_com_google_android_libraries_barhopper_BarhopperV3_recognizeBufferNative Jan 30, 2024
@mrousavy mrousavy changed the title 馃悰 Crash in CodeScanner/MLKit: Java_com_google_android_libraries_barhopper_BarhopperV3_recognizeBufferNative 馃悰 Crash in CodeScanner/MLKit: ..._BarhopperV3_recognizeBufferNative Jan 30, 2024
@mrousavy mrousavy changed the title 馃悰 Crash in CodeScanner/MLKit: ..._BarhopperV3_recognizeBufferNative 馃悰 Crash in CodeScanner/MLKit: BarhopperV3_recognizeBufferNative Jan 30, 2024
@marcshilling
Copy link

Also this guy: googlesamples/mlkit#714

@mgcrea
Copy link

mgcrea commented Feb 5, 2024

I'm hitting this as well (tried both 3.8.2 and 3.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.

  useEffect(() => {
    const interval = setInterval(() => {
      setIsMounted(prevIsMounted => {
        console.log({isMounted: !prevIsMounted});
        return !prevIsMounted;
      });
    }, 3000);
    return () => {
      clearInterval(interval);
    };
  }, []);

@gaurav00729
Copy link

Java_com_google_android_libraries_barhopper_BarhopperV3_recognizeBufferNative.
Getting the same issue in production, It occurs randomly while scanning and navigating between screens.

@sorinrinse
Copy link

I didn't have time to look deeply into this, but FWIW react-native-camera-kit uses the same MLKit version and doesn't crash in production while scanning QRs.

@oscar-b
Copy link

oscar-b commented Feb 12, 2024

I've done some experimentation today:

  • If I scan barcodes and keep the camera open, it doesn't crash.
  • If I scan barcodes and then move the camera away from the codes for a couple of seconds before closing the camera, it doesn't crash.
  • If I scan barcodes and actively keep the camera at the barcodes whilst closing the camera, it crashes.

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 of acquireNextImage(), 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).

This function is recommended to use over acquireNextImage() for most use-cases, as it's more suited for real-time processing.

@mgcrea
Copy link

mgcrea commented Mar 25, 2024

Might 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 #2341 (comment).

@mrousavy
Copy link
Owner

Hey - I think this issue has been fixed in VisionCamera 4.0.0. 馃コ

Please try V4 and let me know if you still experience this issue;

  • if not, please consider 馃挅 sponsoring me on GitHub 馃挅 to support the development of VisionCamera and thank me for my time spent on fixing bugs and building new features.
  • if you still see this issue, please comment and we can re-open this. But please update your native logs with the native (Xcode/Android Studio) logs from running VisionCamera V4 so I can investigate this.

@oscar-b
Copy link

oscar-b commented Apr 22, 2024

I haven't been able to crash v4 yet, this issue seems fixed! 馃帀

@pke
Copy link

pke commented Apr 26, 2024

@oscar-b did you upgrade your ReactNative version to use 4.0?

@oscar-b
Copy link

oscar-b commented Apr 26, 2024

@oscar-b did you upgrade your ReactNative version to use 4.0?

RNVC v4.0.1 yes.

@pke
Copy link

pke commented Apr 26, 2024

No I mean the React Native version to 0.72.3?

@oscar-b
Copy link

oscar-b commented Apr 26, 2024

No I mean the React Native version to 0.72.3?

No Expo v50, using v0.73.6

@spsaucier
Copy link

We are still seeing this in Vision 4.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃悰 bug Something isn't working
Projects
None yet
Development

No branches or pull requests