mgcrea / vision-camera-barcode-scanner

High performance barcode scanner for React Native using VisionCamera
MIT License
84 stars 11 forks source link

[Android] App crash with frame processor on #3

Closed zzz08900 closed 11 months ago

zzz08900 commented 11 months ago

Not sure if this goes here but my app crashes within ~1 sec of mounting a camera view with this frame processor.

Android 12, vision-camera v3.3.1, react-native-worklets-core v0.2.2, RN 0.72

Camera view works alright without frame processor

Relevant logs might be:

10-12 23:56:20.552  8102  8240 E AndroidRuntime: FATAL EXCEPTION: mrousavy/VisionCamera.video
10-12 23:56:20.552  8102  8240 E AndroidRuntime: Process: com.visioncamerav3test, PID: 8102
10-12 23:56:20.552  8102  8240 E AndroidRuntime: com.facebook.jni.CppException: Compiling JS failed: 1:1:invalid empty parentheses '( )' Buffer size 3 starts with: 280a29
10-12 23:56:20.552  8102  8240 E AndroidRuntime:        at com.mrousavy.camera.frameprocessor.FrameProcessor.call(Native Method)
10-12 23:56:20.552  8102  8240 E AndroidRuntime:        at com.mrousavy.camera.core.VideoPipeline._init_$lambda$0(VideoPipeline.kt:107)
10-12 23:56:20.552  8102  8240 E AndroidRuntime:        at com.mrousavy.camera.core.VideoPipeline.$r8$lambda$EMriwS_FKhtjTFtppM84Z5V8tiI(Unknown Source:0)
10-12 23:56:20.552  8102  8240 E AndroidRuntime:        at com.mrousavy.camera.core.VideoPipeline$$ExternalSyntheticLambda0.onImageAvailable(Unknown Source:2)
10-12 23:56:20.552  8102  8240 E AndroidRuntime:        at android.media.ImageReader$1.run(ImageReader.java:850)
10-12 23:56:20.552  8102  8240 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:938)
10-12 23:56:20.552  8102  8240 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
10-12 23:56:20.552  8102  8240 E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:210)
10-12 23:56:20.552  8102  8240 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:299)
10-12 23:56:20.552  8102  8240 E AndroidRuntime:        at android.os.HandlerThread.run(HandlerThread.java:67)
10-12 23:56:20.552  8102  8240 E AndroidRuntime: JUNK_FATAL_EXCEP: FATAL EXCEPTION: mrousavy/VisionCamera.video,Process: com.visioncamerav3test, PID: 8102

Any idea what's going on?

zzz08900 commented 11 months ago

I do remember someone mentioned similar issue while trying to port god old vision-camera-code-scanner to vision camera v3 and its somehow related to reanimated. Will return with more info.

zzz08900 commented 11 months ago

OK that was on iOS, was react-native-worklets-core v0.2.0 and SHOULD be fixed on v0.2.2.

zzz08900 commented 11 months ago

Seems to be a version incompatibility problem. Somehow I was using reanimated 3.4.2 and bumping it to 3.5.4 solved the problem.