Skip to content

The plugin does not work in asynchronous mode #79

@lifelonglearner127

Description

@lifelonglearner127

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions