Code Monkey home page Code Monkey logo

Comments (13)

mrousavy avatar mrousavy commented on May 26, 2024 1

image

from react-native-vision-camera.

mrousavy avatar mrousavy commented on May 26, 2024 1

Unfortunately there's nothing I can do without logs and potentially a symbolicated stack trace. Please try to get those from the crash, then I can help you

from react-native-vision-camera.

mrousavy avatar mrousavy commented on May 26, 2024

Are you using ProGuard?

from react-native-vision-camera.

mrousavy avatar mrousavy commented on May 26, 2024

Thanks for the issue report, I found a fix: #2546 :) 💪

from react-native-vision-camera.

mrousavy avatar mrousavy commented on May 26, 2024

Screenshot 2024-02-13 at 13 40 41

This is not true. Please only post correct information

from react-native-vision-camera.

luicfrr avatar luicfrr commented on May 26, 2024

@mrousavy Thanks for quick response, I was writing a reply about ProGuard and you already found the fix XD.

This is not true. Please only post correct information

Sorry, my bad.

from react-native-vision-camera.

luicfrr avatar luicfrr commented on May 26, 2024

@mrousavy after trying your fix I've found a new issue while trying to open the camera, IDK if it's related to this issue but now I'm getting a SIGSEGV crash.

Again, in expo dev mode everything works fine, this only happens after doing a release build.

Here's a crashlythics log (I don't think this will help but anyway):

Crashed: Thread: SIGSEGV  0x0000000074656d14
#00 pc 0x38a3a librnworklets.so (BuildId: 8301f61d688b47b85e091d973f253dedc8318c8e)
#01 pc 0x560ea librnworklets.so (BuildId: 8301f61d688b47b85e091d973f253dedc8318c8e)
#02 pc 0x77be5 libc++_shared.so (BuildId: a281f70e586a4296b305d1b986a390917f0ce76d)
#03 pc 0x560ea librnworklets.so (BuildId: 8301f61d688b47b85e091d973f253dedc8318c8e)
#04 pc 0x42c83 librnworklets.so (BuildId: 8301f61d688b47b85e091d973f253dedc8318c8e)
#05 pc 0x77be5 libc++_shared.so (BuildId: a281f70e586a4296b305d1b986a390917f0ce76d)
#06 pc 0x512b1 librnworklets.so (BuildId: 8301f61d688b47b85e091d973f253dedc8318c8e)
#07 pc 0x4810f librnworklets.so (BuildId: 8301f61d688b47b85e091d973f253dedc8318c8e)
#08 pc 0x77be5 libc++_shared.so (BuildId: a281f70e586a4296b305d1b986a390917f0ce76d)
#09 pc 0x3d053 librnworklets.so (BuildId: 8301f61d688b47b85e091d973f253dedc8318c8e)
#10 pc 0x484b3 librnworklets.so (BuildId: 8301f61d688b47b85e091d973f253dedc8318c8e)
#11 pc 0x48047 librnworklets.so (BuildId: 8301f61d688b47b85e091d973f253dedc8318c8e)
#12 pc 0x40e95 librnworklets.so (BuildId: 8301f61d688b47b85e091d973f253dedc8318c8e)
#13 pc 0x124eb libfbjni.so (BuildId: 3f45d53614757fac307a0344134f8a6f380a54a8)
#14 pc 0x4321e libVisionCamera.so (BuildId: facbfe687bb8d540e4a9b50580e327c57e9f59ad)
#15 pc 0x12dcf libfbjni.so (BuildId: 3f45d53614757fac307a0344134f8a6f380a54a8)
#16 pc 0x35e31 libVisionCamera.so (BuildId: facbfe687bb8d540e4a9b50580e327c57e9f59ad)
#17 pc 0x36bd1 librnworklets.so (BuildId: 8301f61d688b47b85e091d973f253dedc8318c8e)
#18 pc 0x3ab19 libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#19 pc 0x3a8c7 libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#20 pc 0x47d2d libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#21 pc 0x47d2d libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#22 pc 0x3a1f3 libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#23 pc 0x5b0ad libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#24 pc 0x1489ae libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#25 pc 0x77857 libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#26 pc 0x77739 libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#27 pc 0x3f225 libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#28 pc 0x4b15f libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#29 pc 0x4c5bf libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#30 pc 0x1489ae libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#31 pc 0x5c89b libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#32 pc 0x49a19 libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)
#33 pc 0x4993d libhermes.so (BuildId: 8cf45cfe669d3aca1b59c6d666e08bfa829764c1)

from react-native-vision-camera.

luicfrr avatar luicfrr commented on May 26, 2024

I also noticed that this error happens only when opening app at first time, if I reopen it there's no crash but frame processors doesn't work.

from react-native-vision-camera.

luicfrr avatar luicfrr commented on May 26, 2024

First, I'm using proguard on my expo app (enabled it on BuildProperties)

I got some runtime logs, here they are:

31876-31951 unknown:ViewManagerPropertyUpdater  Could not find generated setter for class com.mrousavy.camera.CameraViewManager
31876-31951 CameraDevices                       Camera #0 is now available.
31876-31951 CameraDevices                       Camera #1 is now available.
31876-31948 ReactNativeJS                       Loading react-native-worklets-core...
31876-31948 ReactNativeJS                       Worklets loaded successfully
31876-31948 VisionCameraProxy                   Initializing VisionCameraProxy...
31876-31948 VisionCameraProxy                   Creating Worklet Context...
31876-31948 VisionCameraProxy                   Worklet Context created!
31876-31948 CameraManager                       getCameraCharacteristics : cameraId = 0
31876-31948 CameraManager                       getCameraCharacteristics : cameraId = 0
31876-31948 CameraManager                       getCameraCharacteristics : cameraId = 1
31876-31948 CameraManager                       getCameraCharacteristics : cameraId = 1
31876-31948 FrameProcessorPluginRegistry        Looking up Frame Processor Plugin "detectFaces"...
31876-31948 FrameProcessorPluginRegistry        Frame Processor Plugin "detectFaces" found! Initializing...
31876-31876 PreviewView                         Creating PreviewView...
31876-31876 PreviewView                         PreviewView is 0x0, rendering 720x1280 content. Resizing to: 0x0 (COVER)
31876-31876 CameraView                          Updating CameraSession...
31876-31940 CameraSession                       configure { ... }: Waiting for lock...
31876-31940 CameraSession                       configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=true, outputsChanged=true, sidePropsChanged=true, isActiveChanged=true)
31876-31940 CameraSession                       Configuring inputs for CameraSession...
31876-31940 PersistentCameraCaptureSession      --> setInput(1)
31876-31951 zygote                              Deoptimizing void com.facebook.react.uimanager.n0.<init>() due to JIT inline cache
31876-31940 CameraSession                       Destroying previous outputs...
31876-31940 CameraManager                       getCameraCharacteristics : cameraId = 1
31876-31951 zygote                              Deoptimizing void com.facebook.react.uimanager.d1.t(com.facebook.react.uimanager.m0, int, com.facebook.react.uimanager.o0) due to JIT inline cache
31876-31940 CameraSession                       Creating outputs for Camera #1...
31876-31940 CameraSession                       Adding 2560x1440 Photo Output in JPEG...
31876-31940 Surface                             sf_framedrop debug : 0x4f4c, game : false, logging : 0
31876-31940 CameraSession                       Adding 1920x1080 Video Output in YUV_420_888...
31876-31940 VideoPipeline                       Initializing 1920 x 1080 Video Pipeline (format: YUV)
31876-31940 Surface                             sf_framedrop debug : 0x4f4c, game : false, logging : 0
31876-31940 VideoPipeline                       Using ImageReader round-trip (format: #35)
31876-31940 VideoPipeline                       Using legacy API for CPU ImageReader...
31876-31940 Surface                             sf_framedrop debug : 0x4f4c, game : false, logging : 0
31876-31951 zygote                              Deoptimizing void com.facebook.react.uimanager.d1.V(int, com.facebook.react.bridge.ReadableArray) due to JIT inline cache
31876-31951 zygote                              Deoptimizing void com.facebook.react.uimanager.n0.d(com.facebook.react.uimanager.n0, int) due to JIT inline cache
31876-31940 Surface                             sf_framedrop debug : 0x4f4c, game : false, logging : 0
31876-31940 PersistentCameraCaptureSession      --> setOutputs([PHOTO (2560x1440 in JPEG), VIDEO (1920x1080 in YUV)])
31876-31940 CameraSession                       Successfully configured Session with 2 outputs for Camera #1!
31876-31940 CameraSession                       Updating Video Outputs...
31876-31940 VideoPipeline                       Removing RecordingSession Output...
31876-31940 PersistentCameraCaptureSession      --> setRepeatingRequest(...)
31876-31940 PersistentCameraCaptureSession      --> setIsActive(false)
31876-31940 PersistentCameraCaptureSession      Configure() with isActive: false, ID: 1, device: null, session: null
31876-31940 PersistentCameraCaptureSession      Creating new device...
31876-31940 CameraManager                       Camera #1: Opening...
31876-31940 CameraManager                       getCameraCharacteristics : cameraId = 1
31876-31876 zygote                              Deoptimizing android.view.View com.facebook.react.uimanager.ViewManager.createViewInstance(int, com.facebook.react.uimanager.y0, com.facebook.react.uimanager.o0, com.facebook.react.uimanager.x0) due to JIT same target
31876-31951 CameraDevices                       Camera #1 is now unavailable.
31876-31951 CameraManager                       getCameraCharacteristics : cameraId = 1
31876-31945 CameraManager                       Camera #1: Opened!
31876-31940 PersistentCameraCaptureSession      Creating new session...
31876-31940 CameraManager                       getCameraCharacteristics : cameraId = 1
31876-31940 CreateCaptureSession                Camera #1: Creating Capture Session #1... (Hardware Level: 0 | Outputs: [PHOTO (2560x1440 in JPEG), VIDEO (1920x1080 in YUV)])
31876-31940 CreateCaptureSession                Using legacy API (<28)
31876-31945 CreateCaptureSession                Camera #1: Successfully created CameraCaptureSession #1!
31876-31940 PersistentCameraCaptureSession      Stopping repeating request...
31876-31940 PersistentCameraCaptureSession      Configure() done! isActive: false, ID: 1, device: android.hardware.camera2.impl.CameraDeviceImpl@7fea12, session: android.hardware.camera2.impl.CameraCaptureSessionImpl@bb455e3
31876-31940 CameraSession                       configure { ... }: Completed CameraSession Configuration! (isActive: false, isRunning: false)
31876-31940 CameraView                          invokeOnInitialized()
31876-31886 zygote                              NativeAllocBackground concurrent copying GC freed 80868(3MB) AllocSpace objects, 1(20KB) LOS objects, 50% free, 8MB/16MB, paused 495us total 250.012ms
31876-31876 zygote                              Deoptimizing void com.facebook.react.uimanager.u.updateProperties(int, com.facebook.react.uimanager.o0) due to JIT same target
31876-31876 zygote                              Deoptimizing void com.facebook.react.uimanager.b1.d(com.facebook.react.bridge.ReadableArray, double[], float, float, com.facebook.react.bridge.ReadableArray) due to JIT inline cache
31876-31876 CameraView                          Updating CameraSession...
31876-31940 CameraSession                       configure { ... }: Waiting for lock...
31876-31940 CameraSession                       configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=false, outputsChanged=false, sidePropsChanged=false, isActiveChanged=true)
31876-31940 PersistentCameraCaptureSession      --> setIsActive(false)
31876-31940 PersistentCameraCaptureSession      Configure() with isActive: false, ID: 1, device: android.hardware.camera2.impl.CameraDeviceImpl@7fea12, session: android.hardware.camera2.impl.CameraCaptureSessionImpl@bb455e3
31876-31940 PersistentCameraCaptureSession      Stopping repeating request...
31876-31940 PersistentCameraCaptureSession      Configure() done! isActive: false, ID: 1, device: android.hardware.camera2.impl.CameraDeviceImpl@7fea12, session: android.hardware.camera2.impl.CameraCaptureSessionImpl@bb455e3
31876-31940 CameraSession                       configure { ... }: Completed CameraSession Configuration! (isActive: true, isRunning: false)
31876-31876 PreviewView                         PreviewView is 720x1280, rendering 720x1280 content. Resizing to: 720x1280 (COVER)
31876-31876 ViewRootImpl@1854c61[MainActivity]  Relayout returned: old=[0,0][720,1280] new=[0,0][720,1280] result=0x1 surface={valid=true 3333732352} changed=false
31876-31876 SurfaceView                         BG show() Surface(name=Background for - SurfaceView - dev.rheconhece/dev.rheconhece.MainActivity@a665515@0) ib.p0{a665515 V.E...... ......ID 0,0-720,1280}
31876-31876 Surface                             sf_framedrop debug : 0x4f4c, game : false, logging : 0
31876-31876 SurfaceView                         surfaceCreated 1 #8 ib.p0{a665515 V.E...... ......ID 0,0-720,1280}
31876-31876 CameraSession                       PreviewView Surface created! Surface(name=null)/@0xebcd02a
31876-31876 CameraSession                       Setting Preview Output...
31876-31876 SurfaceView                         surfaceChanged (720,1280) 1 #8 ib.p0{a665515 V.E...... ......ID 0,0-720,1280}
31876-31876 CameraSession                       PreviewView Surface updated! Surface(name=null)/@0xebcd02a 720 x 1280
31876-31940 CameraSession                       configure { ... }: Waiting for lock...
31876-31940 CameraSession                       configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=false, outputsChanged=true, sidePropsChanged=true, isActiveChanged=true)
31876-31940 CameraSession                       Destroying previous outputs...
31876-31940 SurfaceOutput                       Closing 2560x1440 PHOTO ImageReader..
31876-31940 SurfaceOutput                       Closing 1920x1080 Video Pipeline..
31876-31940 CameraManager                       getCameraCharacteristics : cameraId = 1
31876-31940 CameraSession                       Creating outputs for Camera #1...
31876-31940 CameraSession                       Adding 2560x1440 Photo Output in JPEG...
31876-31940 Surface                             sf_framedrop debug : 0x4f4c, game : false, logging : 0
31876-31940 CameraSession                       Adding 1920x1080 Video Output in YUV_420_888...
31876-31940 VideoPipeline                       Initializing 1920 x 1080 Video Pipeline (format: YUV)
31876-31940 Surface                             sf_framedrop debug : 0x4f4c, game : false, logging : 0
31876-31940 VideoPipeline                       Using ImageReader round-trip (format: #35)
31876-31940 VideoPipeline                       Using legacy API for CPU ImageReader...
31876-31940 Surface                             sf_framedrop debug : 0x4f4c, game : false, logging : 0
31876-31940 Surface                             sf_framedrop debug : 0x4f4c, game : false, logging : 0
31876-31940 CameraSession                       Adding 1280x720 Preview Output...
31876-31876 zygote                              Deoptimizing int com.facebook.react.bridge.JavaOnlyArray.size() due to JIT inline cache
31876-31876 VisionCameraProxy                   Finding view 1329...
31876-31876 VisionCameraProxy                   Found view 1329!
31876-31876 ViewRootImpl@1854c61[MainActivity]  Relayout returned: old=[0,0][720,1280] new=[0,0][720,1280] result=0x1 surface={valid=true 3333732352} changed=false
31876-31876 PreviewView                         Setting PreviewView Surface Size to 720x1280...
31876-31876 SurfaceHolder                       Resizing SurfaceHolder to 1280 x 720...
31876-31876 SurfaceView                         setPackageUsesOwnResolution() (Java SurfaceView) for dev.rheconhece: 1280x720 (true)
31876-31876 SurfaceView                         BG show() Surface(name=Background for - SurfaceView - dev.rheconhece/dev.rheconhece.MainActivity@a665515@0) ib.p0{a665515 V.E...... ......ID 0,0-720,1280}
31876-31876 SurfaceView                         surfaceChanged (1280,720) 2 #8 ib.p0{a665515 V.E...... ......ID 0,0-720,1280}
31876-31876 CameraSession                       PreviewView Surface updated! Surface(name=null)/@0xebcd02a 1280 x 720
31876-31876 SurfaceHolder                       Resized SurfaceHolder to 1280 x 720!
31876-31876 ViewRootImpl@1854c61[MainActivity]  Relayout returned: old=[0,0][720,1280] new=[0,0][720,1280] result=0x1 surface={valid=true 3333732352} changed=false
31876-31940 PersistentCameraCaptureSession      --> setOutputs([PHOTO (2560x1440 in JPEG), VIDEO (1920x1080 in YUV), PREVIEW (1280 x 720)])
31876-31940 CameraSession                       Successfully configured Session with 3 outputs for Camera #1!
31876-31940 CameraSession                       Updating Video Outputs...
31876-31940 VideoPipeline                       Removing RecordingSession Output...
31876-31940 PersistentCameraCaptureSession      --> setRepeatingRequest(...)
31876-31940 PersistentCameraCaptureSession      --> setIsActive(true)
31876-31940 PersistentCameraCaptureSession      Configure() with isActive: true, ID: 1, device: android.hardware.camera2.impl.CameraDeviceImpl@7fea12, session: null
31876-31940 PersistentCameraCaptureSession      Creating new session...
31876-31940 CameraManager                       getCameraCharacteristics : cameraId = 1
31876-31940 CreateCaptureSession                Camera #1: Creating Capture Session #2... (Hardware Level: 0 | Outputs: [PHOTO (2560x1440 in JPEG), VIDEO (1920x1080 in YUV), PREVIEW (1280 x 720)])
31876-31940 CreateCaptureSession                Using legacy API (<28)
31876-31945 CreateCaptureSession                Camera #1: CameraCaptureSession #1 has been closed.
31876-31945 PersistentCameraCaptureSession      Session android.hardware.camera2.impl.CameraCaptureSessionImpl@bb455e3 closed!
31876-31945 CreateCaptureSession                Camera #1: Successfully created CameraCaptureSession #2!
31876-31940 PersistentCameraCaptureSession      Updating repeating request...
31876-31940 CameraManager                       getCameraCharacteristics : cameraId = 1
31876-31876 ViewRootImpl@1854c61[MainActivity]  Relayout returned: old=[0,0][720,1280] new=[0,0][720,1280] result=0x1 surface={valid=true 3333732352} changed=false
31876-31940 PersistentCameraCaptureSession      Configure() done! isActive: true, ID: 1, device: android.hardware.camera2.impl.CameraDeviceImpl@7fea12, session: android.hardware.camera2.impl.CameraCaptureSessionImpl@39e00f7
31876-31940 CameraSession                       configure { ... }: Completed CameraSession Configuration! (isActive: true, isRunning: true)
31876-31940 CameraView                          invokeOnStarted()
31876-31886 zygote                              NativeAllocBackground concurrent copying GC freed 33532(1373KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 7MB/14MB, paused 4.779ms total 255.337ms
31876-31945 VideoPipeline                       ImageReader::onImageAvailable!
31876-31886 zygote                              NativeAllocBackground concurrent copying GC freed 15236(603KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 7MB/14MB, paused 7.749ms total 351.642ms
31876-31945 libc                                Fatal signal 11 (SIGSEGV), code 2, fault addr 0x74656d14 in tid 31945 (ionCamera.video)

On first app load (or if you clean app data and reopen it) there's a crash when trying to open camera view but after the crash if I reopen the app there's no crash but frame processors are not beeing called because none of my logs are printed, only 32675-32737 VideoPipeline ImageReader::onImageAvailable!.

Can you say something with these logs? Is there something I can try to fix this?

from react-native-vision-camera.

mrousavy avatar mrousavy commented on May 26, 2024

Hm. What does your Frame Processor look like? Does it work if you use an empty Frame Processor? Or none at all

from react-native-vision-camera.

luicfrr avatar luicfrr commented on May 26, 2024

@mrousavy I did a lot of testing in my app and I discovered that if I replace runAsync with runAtTargetFps in my frame processor the app doesn't crash but there's a side effect that camera preview freezes when my face detector plugin is processing.

I also tryed increasing and decreasing target fps value but when frame is beeing processed camera preview freezes.

What does your Frame Processor look like?

Here is my plugin repo.

Crashing:

const handleDetectionWorklet = Worklets.createRunInJsFn( (
    result: DetectionResult
  ) => { 
    console.log( 'detection result', result )
  })
  const frameProcessor = useFrameProcessor((frame) => {
    'worklet'
    runAsync(frame, () => {
      'worklet'
      detectFaces(
        frame,
        handleDetectionWorklet, {
          // detection settings
        }
      )
    })
  }, [handleDetectionWorklet])

Not crashing but freezing:

const handleDetectionWorklet = Worklets.createRunInJsFn( (
    result: DetectionResult
  ) => { 
    console.log( 'detection result', result )
  })
  const frameProcessor = useFrameProcessor((frame) => {
    'worklet'
    runAtTargetFps(2, () => {
      'worklet'
      detectFaces(
        frame,
        handleDetectionWorklet, {
          // detection settings
        }
      )
    })
  }, [handleDetectionWorklet])

Does it work if you use an empty Frame Processor? Or none at all?

If you mean this code, yes it works:

const frameProcessor = useFrameProcessor((frame) => {
    'worklet'
    console.log('I'm running')
  }, [])

But if I add a runAsync (with processNestedWorklets in babel config) the app crash.

Without processNestedWorklets I got Regular javascript function cannot be shared. Try decorating the function with the 'worklet' keyword to allow the javascript function to be used as a worklet. error related here.

If I use runAtTargetFps it works doesn't matter if processNestedWorklets is present or not on babel config but with preview frozing issue.

Any suggestion?

from react-native-vision-camera.

mrousavy avatar mrousavy commented on May 26, 2024
  1. runAsync and runAtTargetFps are two completely different things - runAsync schedules the function to run on a background Thread, with a maximum of one function at a time being able to run. runAtTargetFps runs on the same thread as the Frame Processor, but skips all Frames that come in more often than the target FPS rate.
    So by design, runAtTargetFps still freezes the Camera if your code is slow. This is how it works, by design.
  2. Can you use runAsync in the Example app here? For me that works.

from react-native-vision-camera.

luicfrr avatar luicfrr commented on May 26, 2024

Ok, after a lot of tests I got a conclusion:

I have coppied whole example CameraPage.tsx code and remove everything I don't need, I left only most basic things. Here is my current code.

The problem is: If I try to use react-native-reanimated there's no crash but runAsync method is NOT called. Also here's my whole package.json

{
  "name": "myApp",
  "version": "1",
  "private": true,
  "scripts": {
    "lint": "yarn test && eslint --quiet --fix --ext .js,.ts,.tsx,.jsx .",
    "test": "tsc",
    "prebuild": "npx expo prebuild",
    "prebuild:clean": "npx expo prebuild --clean",
    "android": "yarn prebuild && npx expo run:android -d",
    "android:prod": "yarn prebuild &&  npx expo run:android -d --variant release",
    "ios": "yarn prebuild && npx expo run:ios -d",
    "ios:prod": "yarn prebuild && npx expo run:ios -d --configuration Release",
    "android:clean": "yarn prebuild:clean && npx expo run:android -d --no-build-cache",
    "ios:clean": "yarn prebuild:clean && npx expo run:ios -d --no-build-cache",
    "start": "expo start --dev-client"
  },
  "main": "index.js",
  "dependencies": {
    "@react-native-community/hooks": "^3.0.0",
    "@react-navigation/native": "^6.1.9",
    "expo": "~50.0.6",
    "expo-application": "~5.8.3",
    "expo-build-properties": "~0.11.1",
    "expo-constants": "~15.4.5",
    "expo-dev-client": "~3.3.8",
    "react": "18.2.0",
    "react-native": "0.73.4",
    "react-native-gesture-handler": "~2.14.1",
    "react-native-hole-view": "^3.0.0-alpha4",
    "react-native-reanimated": "~3.7.0",
    "react-native-safe-area-context": "4.8.2",
    "react-native-svg": "^14.1.0",
    "react-native-vector-icons": "^10.0.3",
    "react-native-vision-camera": "3.9.0-beta.5",
    "react-native-vision-camera-face-detector": "^1.2.2",
    "react-native-worklets-core": "^0.3.0"
  },
  "devDependencies": {
    "@babel/core": "^7.23.9",
    "@types/react": "~18.2.48",
    "@typescript-eslint/eslint-plugin": "^6.19.1",
    "@typescript-eslint/parser": "^6.19.1",
    "babel-plugin-module-resolver": "^5.0.0",
    "eslint": "^8.56.0",
    "eslint-config-google": "^0.14.0",
    "eslint-config-next": "^14.1.0",
    "eslint-plugin-import": "^2.29.1",
    "eslint-plugin-react": "^7.33.2",
    "typescript": "^5.3.3"
  },
  "resolutions": {
    "@expo/config-plugins": "^7.8.0"
  }
}

No matter what I do in the code, If I run my app using yarn android:prod the app don't crash but frame processor is not called.

About the crashes.... the problem is react-native-svg. If I try to use any Svg with vision-camera the app crash. I tryed:

  • create a aniamted svg:
import Svg from 'react-native-svg'
const AnimatedSvg = Animated.createAnimatedComponent( Svg )
  • returning only a normal svg:
return (
  <Camera
    ....
  />
  <Svg>
    ...
  </Svg>
)

My SVG is rendered in front of camera preview because I'm creating a hole view (indication where user face must be).

@mrousavy do you have any thoughts on this?

from react-native-vision-camera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.