mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
7.26k stars 1.06k forks source link

React Native vision camera freezes on Android 14 with frameProcessor #2712

Closed Ch-Anas-Abdullah closed 4 months ago

Ch-Anas-Abdullah commented 5 months ago

What's happening?

Issue Description:

I am facing an issue with the React Native vision camera freezing when using frameProcessor={frameProcessor} on Android 14. The camera works fine on Android 12 and below, but on Android 14, it freezes when the frameProcessor is added.

Steps to Reproduce:

Use the following setup: React Native version: ^0.73.6 React Native Vision Camera version: ^3.9.0 React Native Reanimated version: ^3.8.0 React Native Vision Camera Face Detector version: ^1.4.0 React Native Worklets Core version: 0.3.0 Add the frameProcessor={frameProcessor} prop to the Camera component. Run the application on an Android 14 device.

Expected Behavior:

The camera should function normally with the frameProcessor added, as it does on Android 12 and below.

Actual Behavior:

The camera freezes when the frameProcessor is added on Android 14

Reproduceable Code

import { Worklets } from 'react-native-reanimated';

const handleFacesDetection = Worklets.createRunInJsFn((result) => {
  if (result.faces.length !== 0) {
    console.log('detection result', result)
    console.log('face bounds', result.faces[0].bounds)
    console.log('face landmarks', result.faces[0].landmarks)
  }
})

const frameProcessor = useFrameProcessor((frame) => {
  'worklet'
  detectFaces(
    frame,
    handleFacesDetection, {
      landmarkMode: "all",
    }
  )
}, [handleFacesDetection])

<Camera
  style={{ width: 320, height: 320, borderRadius: 10 }}
  ref={cameraRef}
  isActive={true}
  device={device}
  frameProcessor={frameProcessor} // Comment out this line to see the camera working
  onError={(error) => console.error(error)}
/>

Relevant log output

2024-04-03 14:49:38.313 17051-32352 TrafficStats            com.tsg.swivx                        D  tagSocket(133) with statsTag=0x90000, statsUid=-1
2024-04-03 14:49:39.821 17051-17051 PreviewView             com.tsg.swivx                        I  Creating PreviewView...
2024-04-03 14:49:39.822 17051-17051 PreviewView             com.tsg.swivx                        I  PreviewView is 0x0, rendering 1080x1920 content (LANDSCAPE_LEFT). Resizing to: 1080x1920 (COVER)
2024-04-03 14:49:39.822 17051-17051 CameraView              com.tsg.swivx                        I  Updating CameraSession...
2024-04-03 14:49:39.823 17051-17164 CameraSession           com.tsg.swivx                        I  configure { ... }: Waiting for lock...
2024-04-03 14:49:39.823 17051-17164 CameraSession           com.tsg.swivx                        I  configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=true, outputsChanged=true, sidePropsChanged=true, isActiveChanged=true)
2024-04-03 14:49:39.823 17051-17164 CameraSession           com.tsg.swivx                        I  Configuring inputs for CameraSession...
2024-04-03 14:49:39.823 17051-17164 Persistent...ureSession com.tsg.swivx                        D  --> setInput(1)
2024-04-03 14:49:39.823 17051-17164 CameraSession           com.tsg.swivx                        I  Destroying previous outputs...
2024-04-03 14:49:39.824 17051-17164 CameraSession           com.tsg.swivx                        I  Creating outputs for Camera #1...
2024-04-03 14:49:39.829 17051-17051 ScrollerOp...ionManager com.tsg.swivx                        D  registerConfigChangedListener
2024-04-03 14:49:39.832 17051-17164 CameraSession           com.tsg.swivx                        I  Adding 1920x1440 Video Output in YUV_420_888...
2024-04-03 14:49:39.833 17051-17164 VideoPipeline           com.tsg.swivx                        I  Initializing 1920 x 1440 Video Pipeline (format: YUV)
2024-04-03 14:49:39.835 17051-17164 libc                    com.tsg.swivx                        W  Access denied finding property "vendor.display.enable_optimal_refresh_rate"
2024-04-03 14:49:39.835 17051-17164 VideoPipeline           com.tsg.swivx                        I  Using ImageReader round-trip (format: #35)
2024-04-03 14:49:39.831 17051-17051 sionCamera.main         com.tsg.swivx                        W  type=1400 audit(0.0:415999): avc:  denied  { read } for  name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=426 scontext=u:r:untrusted_app:s0:c151,c257,c512,c768 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0 app=com.tsg.swivx
2024-04-03 14:49:39.837 17051-17164 libc                    com.tsg.swivx                        W  Access denied finding property "vendor.display.enable_optimal_refresh_rate"
2024-04-03 14:49:39.835 17051-17051 sionCamera.main         com.tsg.swivx                        W  type=1400 audit(0.0:416000): avc:  denied  { read } for  name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=426 scontext=u:r:untrusted_app:s0:c151,c257,c512,c768 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0 app=com.tsg.swivx
2024-04-03 14:49:39.839 17051-17051 sionCamera.main         com.tsg.swivx                        W  type=1400 audit(0.0:416001): avc:  denied  { read } for  name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=426 scontext=u:r:untrusted_app:s0:c151,c257,c512,c768 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0 app=com.tsg.swivx
2024-04-03 14:49:39.841 17051-17164 Persistent...ureSession com.tsg.swivx                        D  --> setOutputs([VIDEO (1920x1440 in YUV)])
2024-04-03 14:49:39.841 17051-17164 CameraSession           com.tsg.swivx                        I  Successfully configured Session with 1 outputs for Camera #1!
2024-04-03 14:49:39.841 17051-17164 CameraSession           com.tsg.swivx                        I  Updating Video Outputs...
2024-04-03 14:49:39.841 17051-17164 VideoPipeline           com.tsg.swivx                        I  Removing RecordingSession Output...
2024-04-03 14:49:39.841 17051-17164 Persistent...ureSession com.tsg.swivx                        D  --> setRepeatingRequest(...)
2024-04-03 14:49:39.841 17051-17164 Persistent...ureSession com.tsg.swivx                        D  --> setIsActive(false)
2024-04-03 14:49:39.841 17051-17164 Persistent...ureSession com.tsg.swivx                        D  Configure() with isActive: false, ID: 1, device: null, session: null
2024-04-03 14:49:39.841 17051-17164 Persistent...ureSession com.tsg.swivx                        I  Creating new device...
2024-04-03 14:49:39.841 17051-17164 CameraManager           com.tsg.swivx                        I  Camera #1: Opening...
2024-04-03 14:49:39.843 17051-32196 ReactNativeJS           com.tsg.swivx                        I  {
                                                                                                      "formats": [],
                                                                                                      "sensorOrientation": "landscape-right",
                                                                                                      "hardwareLevel": "full",
                                                                                                      "maxZoom": 10,
                                                                                                      "minZoom": 1,
                                                                                                      "maxExposure": 24,
                                                                                                      "supportsLowLightBoost": false,
                                                                                                      "neutralZoom": 1,
                                                                                                      "physicalDevices": [
                                                                                                        "wide-angle-camera"
                                                                                                      ],
                                                                                                      "supportsFocus": false,
                                                                                                      "supportsRawCapture": true,
                                                                                                      "isMultiCam": false,
                                                                                                      "minFocusDistance": 0,
                                                                                                      "minExposure": -24,
                                                                                                      "name": "FRONT (1)",
                                                                                                      "hasFlash": false,
                                                                                                      "hasTorch": false,
                                                                                                      "position": "front",
                                                                                                      "id": "1"
                                                                                                    }
2024-04-03 14:49:39.846 17051-17164 libc                    com.tsg.swivx                        W  Access denied finding property "persist.vendor.camera.privapp.list"
2024-04-03 14:49:39.846 17051-17164 CameraExtImplXiaoMi     com.tsg.swivx                        D  initCameraDevice: 1
2024-04-03 14:49:39.850 17051-17164 CameraManager           com.tsg.swivx                        I  Open camera top activityName is com.tsg.swivx.MainActivity
2024-04-03 14:49:39.853 17051-25547 CameraDevice-JV-1       com.tsg.swivx                        W  Device error received, code 0, frame number 0, request ID -1, subseq ID 0
2024-04-03 14:49:39.853 17051-17165 CameraManager           com.tsg.swivx                        I  Camera #1: Disconnected!
2024-04-03 14:49:39.854 17051-17165 Persistent...ureSession com.tsg.swivx                        I  Camera android.hardware.camera2.impl.CameraDeviceImpl@ac29fd8 closed!
2024-04-03 14:49:39.854 17051-17165 CameraExtImplXiaoMi     com.tsg.swivx                        D  releaseCameraDevice: 1
2024-04-03 14:49:39.856 17051-17165 CameraDevice-JV-1       com.tsg.swivx                        D  close: E. id = 1
2024-04-03 14:49:39.878 17051-17051 CameraView              com.tsg.swivx                        I  Updating CameraSession...
2024-04-03 14:49:39.894 17051-17051 PreviewView             com.tsg.swivx                        I  PreviewView is 880x880, rendering 1080x1920 content (LANDSCAPE_LEFT). Resizing to: 880x1564 (COVER)
2024-04-03 14:49:39.914 17051-17051 SurfaceView             com.tsg.swivx                        D  UPDATE null, mIsCastMode = false
2024-04-03 14:49:39.918 17051-17051 libc                    com.tsg.swivx                        W  Access denied finding property "vendor.display.enable_optimal_refresh_rate"
2024-04-03 14:49:39.915 17051-17051 com.tsg.swivx           com.tsg.swivx                        W  type=1400 audit(0.0:416002): avc:  denied  { read } for  name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=426 scontext=u:r:untrusted_app:s0:c151,c257,c512,c768 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0 app=com.tsg.swivx
2024-04-03 14:49:39.918 17051-17051 CameraSession           com.tsg.swivx                        I  PreviewView Surface created! Surface(name=null)/@0xfce364e
2024-04-03 14:49:39.918 17051-17051 CameraSession           com.tsg.swivx                        I  Setting Preview Output...
2024-04-03 14:49:39.919 17051-17051 CameraSession           com.tsg.swivx                        I  PreviewView Surface updated! Surface(name=null)/@0xfce364e 1920 x 1080
2024-04-03 14:49:39.938 17051-17051 SurfaceView             com.tsg.swivx                        D  UPDATE Surface(name=SurfaceView[com.tsg.swivx/com.tsg.swivx.MainActivity]#102949)/@0x70aad49, mIsProjectionMode = false
2024-04-03 14:49:39.943 17051-17051 VisionCameraProxy       com.tsg.swivx                        D  Finding view 1123...
2024-04-03 14:49:39.944 17051-17051 VisionCameraProxy       com.tsg.swivx                        D  Found view 1123!
2024-04-03 14:49:40.079 17051-17163 BpBinder                com.tsg.swivx                        I  onLastStrongRef automatically unlinking death recipients: 
2024-04-03 14:49:40.082 17051-32197 CameraDevices           com.tsg.swivx                        I  Camera #1 is now available.
2024-04-03 14:49:40.084 17051-17165 BpBinder                com.tsg.swivx                        W  PerfMonitor binderTransact: time=228ms interface=android.hardware.camera2.ICameraDeviceUser code=1
2024-04-03 14:49:40.085 17051-17165 CameraDevice-JV-1       com.tsg.swivx                        D  close: X
2024-04-03 14:49:40.086 17051-17165 CreateCaptureSession    com.tsg.swivx                        I  Camera #1: CameraCaptureSession #6 has been closed.
2024-04-03 14:49:40.086 17051-17165 Persistent...ureSession com.tsg.swivx                        I  Session android.hardware.camera2.impl.CameraCaptureSessionImpl@c0ca2a4 closed!
2024-04-03 14:49:40.094 17051-32197 CameraDevices           com.tsg.swivx                        I  Camera #1 is now unavailable.
2024-04-03 14:49:40.104 17051-17164 BpBinder                com.tsg.swivx                        W  PerfMonitor binderTransact: time=254ms interface=android.hardware.ICameraService code=4
2024-04-03 14:49:40.105 17051-17165 CameraManager           com.tsg.swivx                        I  Camera #1: Opened!
2024-04-03 14:49:40.105 17051-17164 CameraSession           com.tsg.swivx                        I  configure { ... }: Waiting for lock...
2024-04-03 14:49:40.109 17051-17164 CameraSession           com.tsg.swivx                        I  configure { ... }: Waiting for lock...
2024-04-03 14:49:40.110 17051-17164 Persistent...ureSession com.tsg.swivx                        I  Creating new session...
2024-04-03 14:49:40.113 17051-17164 CreateCaptureSession    com.tsg.swivx                        I  Camera #1: Creating Capture Session #7... (Hardware Level: 3 | Outputs: [VIDEO (1920x1440 in YUV)])
2024-04-03 14:49:40.114 17051-17164 CreateCaptureSession    com.tsg.swivx                        I  Using new API (>=28)
2024-04-03 14:49:40.115 17051-17164 CameraDevice-JV-1       com.tsg.swivx                        D  waitUntilIdle: E. id = 1
2024-04-03 14:49:40.116 17051-17164 CameraDevice-JV-1       com.tsg.swivx                        D  waitUntilIdle: X
2024-04-03 14:49:40.130 17051-17144 RenderInspector         com.tsg.swivx                        W  QueueBuffer time out on com.tsg.swivx/com.tsg.swivx.MainActivity, count=1, avg=121 ms, max=121 ms.
2024-04-03 14:49:40.141 17051-17144 RenderInspector         com.tsg.swivx                        W  DequeueBuffer time out on com.tsg.swivx/com.tsg.swivx.MainActivity, count=1, avg=23 ms, max=23 ms.
2024-04-03 14:49:40.296 17051-17165 com.tsg.swivx           com.tsg.swivx                        W  Long monitor contention with owner mrousavy/VisionCamera.main (17164) at void android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating()(CameraDeviceImpl.java:1419) waiters=0 in void android.hardware.camera2.impl.CameraDeviceImpl$4.run() for 181ms
2024-04-03 14:49:40.311 17051-17165 CreateCaptureSession    com.tsg.swivx                        I  Camera #1: Successfully created CameraCaptureSession #7!
2024-04-03 14:49:40.312 17051-17164 Persistent...ureSession com.tsg.swivx                        D  Stopping repeating request...
2024-04-03 14:49:40.312 17051-17164 Persistent...ureSession com.tsg.swivx                        D  Configure() done! isActive: false, ID: 1, device: android.hardware.camera2.impl.CameraDeviceImpl@7c7d505, session: android.hardware.camera2.impl.CameraCaptureSessionImpl@9db695a
2024-04-03 14:49:40.312 17051-17164 CameraSession           com.tsg.swivx                        I  configure { ... }: Completed CameraSession Configuration! (isActive: false, isRunning: false)
2024-04-03 14:49:40.312 17051-17164 CameraView              com.tsg.swivx                        I  invokeOnInitialized()
2024-04-03 14:49:40.316 17051-17164 CameraSession           com.tsg.swivx                        I  configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=false, outputsChanged=false, sidePropsChanged=false, isActiveChanged=true)
2024-04-03 14:49:40.316 17051-17164 Persistent...ureSession com.tsg.swivx                        D  --> setIsActive(false)
2024-04-03 14:49:40.316 17051-17164 Persistent...ureSession com.tsg.swivx                        D  Configure() with isActive: false, ID: 1, device: android.hardware.camera2.impl.CameraDeviceImpl@7c7d505, session: android.hardware.camera2.impl.CameraCaptureSessionImpl@9db695a
2024-04-03 14:49:40.335 17051-17164 Persistent...ureSession com.tsg.swivx                        D  Stopping repeating request...
2024-04-03 14:49:40.335 17051-17164 Persistent...ureSession com.tsg.swivx                        D  Configure() done! isActive: false, ID: 1, device: android.hardware.camera2.impl.CameraDeviceImpl@7c7d505, session: android.hardware.camera2.impl.CameraCaptureSessionImpl@9db695a
2024-04-03 14:49:40.335 17051-17164 CameraSession           com.tsg.swivx                        I  configure { ... }: Completed CameraSession Configuration! (isActive: true, isRunning: false)
2024-04-03 14:49:40.336 17051-17164 CameraSession           com.tsg.swivx                        I  configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=false, outputsChanged=true, sidePropsChanged=true, isActiveChanged=true)
2024-04-03 14:49:40.336 17051-17164 CameraSession           com.tsg.swivx                        I  Destroying previous outputs...
2024-04-03 14:49:40.336 17051-17164 SurfaceOutput           com.tsg.swivx                        I  Closing 1920x1440 Video Pipeline..
2024-04-03 14:49:40.337 17051-32400 TrafficStats            com.tsg.swivx                        D  tagSocket(133) with statsTag=0x90000, statsUid=-1
2024-04-03 14:49:40.338 17051-17164 CameraSession           com.tsg.swivx                        I  Creating outputs for Camera #1...
2024-04-03 14:49:40.357 17051-17164 CameraSession           com.tsg.swivx                        I  Adding 1920x1440 Video Output in YUV_420_888...
2024-04-03 14:49:40.357 17051-17164 VideoPipeline           com.tsg.swivx                        I  Initializing 1920 x 1440 Video Pipeline (format: YUV)
2024-04-03 14:49:40.360 17051-17164 libc                    com.tsg.swivx                        W  Access denied finding property "vendor.display.enable_optimal_refresh_rate"
2024-04-03 14:49:40.360 17051-17164 VideoPipeline           com.tsg.swivx                        I  Using ImageReader round-trip (format: #35)
2024-04-03 14:49:40.361 17051-17164 VideoPipeline           com.tsg.swivx                        I  Creating ImageReader with default usage flags...
2024-04-03 14:49:40.364 17051-17164 libc                    com.tsg.swivx                        W  Access denied finding property "vendor.display.enable_optimal_refresh_rate"
2024-04-03 14:49:40.364 17051-17164 VideoPipeline           com.tsg.swivx                        I  Creating ImageWriter with format #35...
2024-04-03 14:49:40.366 17051-17164 libc                    com.tsg.swivx                        W  Access denied finding property "vendor.display.enable_optimal_refresh_rate"
2024-04-03 14:49:40.372 17051-17164 CameraSession           com.tsg.swivx                        I  Adding 1920x1080 Preview Output...
2024-04-03 14:49:40.373 17051-17051 PreviewView             com.tsg.swivx                        I  Input Orientation changed: LANDSCAPE_LEFT -> LANDSCAPE_RIGHT
2024-04-03 14:49:40.374 17051-17164 Persistent...ureSession com.tsg.swivx                        D  --> setOutputs([VIDEO (1920x1440 in YUV), PREVIEW (1920 x 1080)])
2024-04-03 14:49:40.374 17051-17164 CameraDevice-JV-1       com.tsg.swivx                        D  flush: E. id = 1
2024-04-03 14:49:40.374 17051-17051 PreviewView             com.tsg.swivx                        I  PreviewView is 880x1564, rendering 1080x1920 content (LANDSCAPE_RIGHT). Resizing to: 880x1564 (COVER)
2024-04-03 14:49:40.374 17051-17164 CameraSession           com.tsg.swivx                        I  Successfully configured Session with 2 outputs for Camera #1!
2024-04-03 14:49:40.375 17051-17164 CameraSession           com.tsg.swivx                        I  Updating Video Outputs...
2024-04-03 14:49:40.375 17051-17164 VideoPipeline           com.tsg.swivx                        I  Removing RecordingSession Output...
2024-04-03 14:49:40.375 17051-17164 Persistent...ureSession com.tsg.swivx                        D  --> setRepeatingRequest(...)
2024-04-03 14:49:40.375 17051-17164 Persistent...ureSession com.tsg.swivx                        D  --> setIsActive(true)
2024-04-03 14:49:40.375 17051-17164 Persistent...ureSession com.tsg.swivx                        D  Configure() with isActive: true, ID: 1, device: android.hardware.camera2.impl.CameraDeviceImpl@7c7d505, session: null
2024-04-03 14:49:40.376 17051-17164 Persistent...ureSession com.tsg.swivx                        I  Creating new session...
2024-04-03 14:49:40.378 17051-17164 CreateCaptureSession    com.tsg.swivx                        I  Camera #1: Creating Capture Session #8... (Hardware Level: 3 | Outputs: [VIDEO (1920x1440 in YUV), PREVIEW (1920 x 1080)])
2024-04-03 14:49:40.379 17051-17164 CreateCaptureSession    com.tsg.swivx                        I  Using new API (>=28)
2024-04-03 14:49:40.379 17051-17164 CameraDevice-JV-1       com.tsg.swivx                        D  waitUntilIdle: E. id = 1
2024-04-03 14:49:40.380 17051-17164 CameraDevice-JV-1       com.tsg.swivx                        D  waitUntilIdle: X
2024-04-03 14:49:40.561 17051-25547 BpBinder                com.tsg.swivx                        I  onLastStrongRef automatically unlinking death recipients: 
2024-04-03 14:49:40.561 17051-17165 com.tsg.swivx           com.tsg.swivx                        W  Long monitor contention with owner mrousavy/VisionCamera.main (17164) at void android.hardware.camera2.impl.CameraDeviceImpl.waitUntilIdle()(CameraDeviceImpl.java:1439) waiters=0 in void android.hardware.camera2.impl.CameraDeviceImpl$4.run() for 182ms
2024-04-03 14:49:40.562 17051-17165 CreateCaptureSession    com.tsg.swivx                        I  Camera #1: CameraCaptureSession #7 has been closed.
2024-04-03 14:49:40.562 17051-17165 Persistent...ureSession com.tsg.swivx                        I  Session android.hardware.camera2.impl.CameraCaptureSessionImpl@9db695a closed!
2024-04-03 14:49:40.562 17051-17165 CreateCaptureSession    com.tsg.swivx                        I  Camera #1: Successfully created CameraCaptureSession #8!
2024-04-03 14:49:40.562 17051-17164 Persistent...ureSession com.tsg.swivx                        D  Updating repeating request...
2024-04-03 14:49:40.568 17051-17164 Persistent...ureSession com.tsg.swivx                        D  Configure() done! isActive: true, ID: 1, device: android.hardware.camera2.impl.CameraDeviceImpl@7c7d505, session: android.hardware.camera2.impl.CameraCaptureSessionImpl@28f4d03
2024-04-03 14:49:40.568 17051-17164 CameraSession           com.tsg.swivx                        I  configure { ... }: Completed CameraSession Configuration! (isActive: true, isRunning: true)
2024-04-03 14:49:40.568 17051-17164 CameraView              com.tsg.swivx                        I  invokeOnStarted()
2024-04-03 14:49:41.625 17051-17144 RenderInspector         com.tsg.swivx                        W  QueueBuffer time out on com.tsg.swivx/com.tsg.swivx.MainActivity, count=1, avg=105 ms, max=105 ms.
2024-04-03 14:49:42.366 17051-32643 TrafficStats            com.tsg.swivx                        D  tagSocket(210) with statsTag=0x90000, statsUid=-1
2024-04-03 14:49:44.383 17051-32693 TrafficStats            com.tsg.swivx                        D  tagSocket(210) with statsTag=0x90000, statsUid=-1
2024-04-03 14:49:46.401 17051-32696 TrafficStats            com.tsg.swivx                        D  tagSocket(210) with statsTag=0x90000, statsUid=-1
2024-04-03 14:49:48.414 17051-32700 TrafficStats            com.tsg.swivx                        D  tagSocket(210) with statsTag=0x90000, statsUid=-1
2024-04-03 14:49:49.007 17051-30894 CameraDevice-JV-1       com.tsg.swivx                        W  Device error received, code 3, frame number 8, request ID 0, subseq ID 0
2024-04-03 14:49:49.008 17051-30894 CameraDevice-JV-1       com.tsg.swivx                        W  got error frame 8
2024-04-03 14:49:50.427 17051-32702 TrafficStats            com.tsg.swivx                        D  tagSocket(210) with statsTag=0x90000, statsUid=-1
2024-04-03 14:49:52.445 17051-32706 TrafficStats            com.tsg.swivx                        D  tagSocket(210) with statsTag=0x90000, statsUid=-1
2024-04-03 14:49:54.459 17051-32708 TrafficStats            com.tsg.swivx                        D  tagSocket(210) with statsTag=0x90000, statsUid=-1
2024-04-03 14:49:56.473 17051-32710 TrafficStats            com.tsg.swivx                        D  tagSocket(210) with statsTag=0x90000, statsUid=-1
2024-04-03 14:49:57.007 17051-30894 CameraDevice-JV-1       com.tsg.swivx                        W  Device error received, code 3, frame number 9, request ID 0, subseq ID 0
2024-04-03 14:49:57.009 17051-30894 CameraDevice-JV-1       com.tsg.swivx                        W  got error frame 9
2024-04-03 14:49:58.488 17051-32712 TrafficStats            com.tsg.swivx                        D  tagSocket(210) with statsTag=0x90000, statsUid=-1

Camera Device

{
  "formats": [],
  "sensorOrientation": "landscape-right",
  "hardwareLevel": "full",
  "maxZoom": 10,
  "minZoom": 1,
  "maxExposure": 24,
  "supportsLowLightBoost": false,
  "neutralZoom": 1,
  "physicalDevices": [
    "wide-angle-camera"
  ],
  "supportsFocus": false,
  "supportsRawCapture": true,
  "isMultiCam": false,
  "minFocusDistance": 0,
  "minExposure": -24,
  "name": "FRONT (1)",
  "hasFlash": false,
  "hasTorch": false,
  "position": "front",
  "id": "1"
}

Device

Xiaomi Redmi Note 13

VisionCamera Version

3.9.0

Can you reproduce this issue in the VisionCamera Example app?

Yes, I can reproduce the same issue in the Example app here

Additional information

Timer00 commented 5 months ago

Facing this problem here too (Poco F3 Android 13) ! I believe it might be this same issue.

mrousavy commented 5 months ago

Can you try if VisionCamera V4 fixed the issue?

Timer00 commented 5 months ago

Can you try if VisionCamera V4 fixed the issue?

Good stuff, it works!

mrousavy commented 4 months ago

Great that V4 fixes this, and thanks for the sponsorship @Timer00 !