Open marcshilling opened 9 months ago
I faced the same issue. In my case, it happens when the camera turns off because of leaving the screen.
ERROR Frame Processor Error: Exception in HostObject::get for prop 'width': java.lang.RuntimeException: Frame is already closed! Are you trying to access the Image data outside of a Frame Processor's lifetime?
- If you want to use `console.log(frame)`, use `console.log(frame.toString())` instead.
- If you want to do async processing, use `runAsync(...)` instead.
- If you want to use runOnJS, increment it's ref-count: `frame.incrementRefCount()`, js engine: VisionCamera
Downgrading to these versions has partly settled the problem.
{
"@mgcrea/vision-camera-barcode-scanner": "0.6.6",
"react-native-vision-camera": "3.6.16"
}
The error still occurs but doesn’t lead to crashes anymore.
This seems to be a common issue on many Samsung devices. Other seem fine according to my logs. I can see this crash on the following Samsung devices:
You can try the latest release as it might fix this.
I'm seeing reports of this from my Android users in production.
The full exception is:
This seems to be an exception that was intentionally put in to throw when apparently doing something wrong: https://github.com/mrousavy/react-native-vision-camera/pull/2327
Not sure if this is a problem with your implementation of the frame processor or upstream: https://github.com/mrousavy/react-native-vision-camera/issues/2253. Any ideas?