Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The plugin does not work in asynchronous mode #79

Open
lifelonglearner127 opened this issue Oct 12, 2024 · 1 comment
Open

The plugin does not work in asynchronous mode #79

lifelonglearner127 opened this issue Oct 12, 2024 · 1 comment

Comments

@lifelonglearner127
Copy link

lifelonglearner127 commented Oct 12, 2024

On Android, this plugin get my app crashed when I am trying to resize the frame asynchronosuly. If I am resizing synchronously, everything works as expected.

const frameProcessor = useFrameProcessor((frame: Frame) => {
    'worklet'

    runAsync(frame, () => {
      'worklet'
      const resized = resize(frame, {
        scale: {
          width: 192,
          height: 192
        },
        pixelFormat: 'rgb',
        dataType: 'uint8'
      })

      const firstPixel = {
        r: resized[0],
        g: resized[1],
        b: resized[2]
      }
      console.log(firstPixel)
    })
  }, [])


`<Camera`
  ref={camera}
  style={StyleSheet.absoluteFill}
  device={device}
  isActive={isCameraActive}
  video={true}
  frameProcessor={frameProcessor}
/>

Error logs

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8a2c82b004dfe
@francesco-clementi-92
Copy link

Did you manage to find a workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants