🐛 Crash when pixelFormat="yuv"
What's happening?
Why crash when set prop pixelFormat="yuv" if remove these prop work fine but is needed for frameProcessor for process image in ML Kit
Reproduceable Code
{device != null && isActive && (
<PinchGestureHandler onGestureEvent={onPinchGesture} enabled={isActive}>
<Reanimated.View style={StyleSheet.absoluteFill}>
<TapGestureHandler onEnded={onDoubleTap} numberOfTaps={2}>
<ReanimatedCamera
ref={camera}
style={StyleSheet.absoluteFill}
device={device}
format={format}
fps={fps}
hdr={enableHdr}
lowLightBoost={device.supportsLowLightBoost && enableNightMode}
isActive={isActive}
onInitialized={onInitialized}
onError={onError}
enableZoomGesture={false}
animatedProps={cameraAnimatedProps}
enableFpsGraph={true}
photo={true}
video={true}
audio={hasMicrophonePermission}
frameProcessor={frameProcessor}
//pixelFormat={"rgb"}
pixelFormat={'yuv'}
/>
</TapGestureHandler>
</Reanimated.View>
</PinchGestureHandler>
)}
Relevant log output DEBUG
{ [session/camera-has-been-disconnected: [session/camera-has-been-disconnected] The given Camera device (id: 0) has been disconnected! Error: UNKNOWN_CAMERA_DEVICE_ERROR]
name: 'session/camera-has-been-disconnected',
_code: 'session/camera-has-been-disconnected',
_message: '[session/camera-has-been-disconnected] The given Camera device (id: 0) has been disconnected! Error: UNKNOWN_CAMERA_DEVICE_ERROR',
_cause: undefined }
Relevant log output RELEASE
Exception java.lang.IllegalArgumentException: getCameraCharacteristics:1043: Unable to retrieve camera characteristics for unknown device 2: No such file or directory (-2)
at android.hardware.camera2.CameraManager.throwAsPublicException (CameraManager.java:1750)
at android.hardware.camera2.CameraManager.getCameraCharacteristics (CameraManager.java:793)
at com.mrousavy.camera.core.CameraDeviceDetails.<init> (CameraDeviceDetails.kt:26)
at com.mrousavy.camera.CameraDevicesManager.getDevicesJson (CameraDevicesManager.kt:63)
at com.mrousavy.camera.CameraDevicesManager.sendAvailableDevicesChangedEvent (CameraDevicesManager.kt:71)
at com.mrousavy.camera.CameraDevicesManager$callback$1.onCameraUnavailable (CameraDevicesManager.kt:44)
at android.hardware.camera2.CameraManager$CameraManagerGlobal$7.run (CameraManager.java:2529)
at android.os.Handler.handleCallback (Handler.java:942)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loopOnce (Looper.java:226)
at android.os.Looper.loop (Looper.java:313)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:228)
at java.lang.Thread.run (Thread.java:1012)
Device
Samsung Galaxy S20+
VisionCamera Version
3.6.4
Can you reproduce this issue in the VisionCamera Example app?
I didn't try (⚠️ your issue might get ignored & closed if you don't try this)
Additional information
- [ ] I am using Expo
- [X] I have enabled Frame Processors (react-native-worklets-core)
- [X] I have read the Troubleshooting Guide
- [X] I agree to follow this project's Code of Conduct
- [X] I searched for similar issues in this repository and found none.
I'm also running into this on a Galaxy A14.
I'm also running into this on a Galaxy A14.
mmmm, that works in some phone devices but in others crash....
Why pixelFormat="native" is data Inaccessible in frame processor ??? or it's possible??, if yes, how can I access to that data??
@mrousavy Please!
286+ %!!!!!
You tell me if fix that if no I downgrade to V2 because I need a HOTfix urgent.... iOS works well but unfortunately there are not many users, it is growing but a little slower, and I'm sorry but a good service is functional on any device
Well, I guess nobody here is responsible for your app crashing like ***.
Stop whining and do something to fix YOUR app.
Edit: I do remember mrousavy offer paid services of fixing stuff like this, I think you can contact him if you really need such services.
Well, I guess nobody here is responsible for your app crashing like ***.
Stop whining and do something to fix YOUR app.
Edit: I do remember mrousavy offer paid services of fixing stuff like this, I think you can contact him if you really need such services.
It only fails due to the update of this library, I had v3rc2 with worklets in its infancy and it did not have the errors that I have now, 1.- YOU!? Have you done something to fix it!??, because that's what I do at least so that the OPEN source library listens well brother OPEN code!!! 2.- If I can pay 100, 1000 $ but it is version 3.6.4, that is what I will end up doing for an open source library...
@zzz08900
You dare to ask stupid questions like Unable to call 'setState' within 'onBarcodeScanned' and comment here without contributing anything but hate...
@R4tch3t can you ping me on discord? please join discord community if you are not already in it, and ping me. i also need to solve that problem for one of your customers, but i don't have a samsung device right now, maybe we can jump in a pair programming session and figure that out
pixelFormat="native"
unfortunately native format can't be read by a frame processor since the layout is private :(
@R4tch3t fyi https://github.com/mrousavy/react-native-vision-camera/pull/2108
can you run the example app from this PR with pixelFormat set to yuv?
@R4tch3t
You tell me if fix that if no I downgrade to V2 because I need a HOTfix urgent....
If you need something "urgent" then pay me to fix it instead of posting spanish screenshots without context.
Also, you checked that you browsed the github repo for duplicates, but there is literally another issue with almost exactly the same title, lol.
Closing as duplicate of https://github.com/mrousavy/react-native-vision-camera/issues/1947.
Thanks @rodgomesc & @zzz08900 for helping out here ❤️