vision-camera-barcode-scanner icon indicating copy to clipboard operation
vision-camera-barcode-scanner copied to clipboard

Frame Processor Error: Exception in HostFunction: java.lang.RuntimeException: Frame is already closed!

Open marcshilling opened this issue 6 months ago • 3 comments

I'm seeing reports of this from my Android users in production.

The full exception is:

Frame Processor Error: Exception in HostFunction: 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()`

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?

marcshilling avatar Jan 30 '24 22:01 marcshilling