-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Comments
You can using try another version of MLKit by editing the I have no idea which (or if any) other version works so, good hunting. |
I'm seeing the same issue appearing at random after scanning a QR code. Perhaps unsurprisingly, this happens whether using the The frequency of this issue and the numbers being reported from the field are staggering. |
Any updates? Having same issue. |
can you guys please test if this change solves the issue for you? remove "dependencies": {
"react-native-vision-camera": "github:rodgomesc/react-native-vision-camera#cad3699"
} |
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 |
Thank you for the fix! I've tested it on multiple devices, and it works perfectly. go ahead and create a pull request. |
does anyone get an npm error once i set
|
@iliapnmrv Use gitpkg |
it works, thanks a lot鉂わ笍 |
@rodgomesc It still crashes for me on android after scanning a qr code (same on latest): 11-23 10:30:50.911 1195 2550 I CHIUSECASE: [INFO ] chxperf.cpp:850 ReleasePerfLock() Release perflock type: 16 |
@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. 馃帀 For reference and posterity, you can also track this issue via #2189 in this project, while the root cause itself, which lies within the Below is what I'm seeing:
|
Same error happened to me on |
Heyo! Does #2355 maybe fix your issue? |
still seems to be an issue in 3.7.0 .. Tried both VisionCamera_enableCodeScanner=true and VisionCamera_enableCodeScanner=false |
I have the same problem, happens to around 4% of my users - so pretty frequent. 3.7.0 did not solve this issue. |
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. |
@rodgomesc did you ever make a PR for this fix? |
@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 |
@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 Anyway, thank you very much for your attention to this issue. =) |
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:
Give this a shot in your apps. I'm on |
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. |
I'm still getting reports of it in prod even on 3.5.1 for what it's worth, although definitely seems less frequent |
By the way, for tracking purposes, this bug is logged in the Google's public issue tracker as #294890843 and #314930525. |
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. |
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. |
Java_com_google_android_libraries_barhopper_BarhopperV3_recognizeBufferNative
Java_com_google_android_libraries_barhopper_BarhopperV3_recognizeBufferNative
..._BarhopperV3_recognizeBufferNative
..._BarhopperV3_recognizeBufferNative
BarhopperV3_recognizeBufferNative
Also this guy: googlesamples/mlkit#714 |
I'm hitting this as well (tried both useEffect(() => {
const interval = setInterval(() => {
setIsMounted(prevIsMounted => {
console.log({isMounted: !prevIsMounted});
return !prevIsMounted;
});
}, 3000);
return () => {
clearInterval(interval);
};
}, []); |
Java_com_google_android_libraries_barhopper_BarhopperV3_recognizeBufferNative. |
I didn't have time to look deeply into this, but FWIW |
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 Google seems to recommend using
|
Might be worth trying the latest |
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;
|
I haven't been able to crash v4 yet, this issue seems fixed! 馃帀 |
@oscar-b did you upgrade your ReactNative version to use 4.0? |
RNVC v4.0.1 yes. |
No I mean the React Native version to 0.72.3? |
No Expo v50, using v0.73.6 |
We are still seeing this in Vision 4.0.3. |
What's happening?
I'm using react-native-vision-camera
v3.6.4
. On QR code scan I get google mlkit errorJava_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
Relevant log output
Camera Device
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
The text was updated successfully, but these errors were encountered: