Code Monkey home page Code Monkey logo

Comments (7)

iamtommcc avatar iamtommcc commented on June 20, 2024 1

Confirming that I too have been able to replicate this bug on a physical iPhone 15 Pro on iOS 17.4

In addition to iso, it also crashes if I try setting videoResolution to max as well.

from react-native-vision-camera.

stevengoldberg avatar stevengoldberg commented on June 20, 2024

Update β€” the crash only happens when I'm using a multi-cam, e.g.

const physicalDevices = [
                  'ultra-wide-angle-camera',
                  'wide-angle-camera',
                  'telephoto-camera',
              ]

If I pass only wide-angle-camera as the physicalDevices, it doesn't crash. Here are the full xcode logs when the crash occurs:

{ minFps: 1,
  videoWidth: 4032,
  minISO: 55,
  photoHeight: 3024,
  maxFps: 30,
  fieldOfView: 103.62532043457031,
  videoHeight: 3024,
  autoFocusSystem: 'phase-detection',
  supportsVideoHdr: false,
  supportsPhotoHdr: false,
  photoWidth: 4032,
  supportsDepthCapture: true,
  maxISO: 12320,
  pixelFormats: 
   [ 'yuv',
     'yuv',
     'rgb',
     'unknown',
     'yuv',
     'unknown',
     'yuv',
     'unknown',
     'rgb' ],
  maxZoom: 189,
  videoStabilizationModes: [ 'auto', 'off' ] }
 This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the `-locationManagerDidChangeAuthorization:` callback and checking `authorizationStatus` first.
{ minFps: [Getter/Setter],
  videoWidth: [Getter/Setter],
  minISO: [Getter/Setter],
  photoHeight: [Getter/Setter],
  maxFps: [Getter/Setter],
  fieldOfView: [Getter/Setter],
  videoHeight: [Getter/Setter],
  autoFocusSystem: [Getter/Setter],
  supportsVideoHdr: [Getter/Setter],
  supportsPhotoHdr: [Getter/Setter],
  photoWidth: [Getter/Setter],
  supportsDepthCapture: [Getter/Setter],
  maxISO: [Getter/Setter],
  pixelFormats: [Getter/Setter],
  maxZoom: [Getter/Setter],
  videoStabilizationModes: [Getter/Setter] }
VisionCamera.didSetProps(_:): Updating 21 props: [onInitialized, cameraId, enableBufferCompression, onCodeScanned, collapsable, photoHdr, onStarted, isActive, pixelFormat, onViewReady, onError, onStopped, enableHighQualityPhotos, enableFrameProcessor, format, orientation, flex, width, exposure, zoom, photo]
VisionCamera.configure(_:): configure { ... }: Waiting for lock...
VisionCamera.configure(_:): configure { ... }: Updating CameraSession Configuration... Difference(inputChanged: true, outputsChanged: true, videoStabilizationChanged: true, orientationChanged: true, formatChanged: true, sidePropsChanged: true, torchChanged: true, zoomChanged: true, exposureChanged: true, audioSessionChanged: true)
VisionCamera.configureDevice(configuration:): Configuring Input Device...
VisionCamera.configureDevice(configuration:): Configuring Camera com.apple.avfoundation.avcapturedevice.built-in_video:7...
VisionCamera.configureDevice(configuration:): Successfully configured Input Device!
VisionCamera.configureOutputs(configuration:): Configuring Outputs...
VisionCamera.configureOutputs(configuration:): Adding Photo output...
VisionCamera.configureOutputs(configuration:): Successfully configured all outputs!
VisionCamera.configureFormat(configuration:device:): Configuring Format (4032x3024 | [email protected] (ISO: 55.0..12320.0, Pixel Formats: [VisionCamera.PixelFormat.yuv, VisionCamera.PixelFormat.yuv, VisionCamera.PixelFormat.rgb, VisionCamera.PixelFormat.unknown, VisionCamera.PixelFormat.yuv, VisionCamera.PixelFormat.unknown, VisionCamera.PixelFormat.yuv, VisionCamera.PixelFormat.unknown, VisionCamera.PixelFormat.rgb]))...
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureDevice setActiveDepthDataMinFrameDuration:] activeDepthDataMinFrameDuration cannot be set when activeDepthDataFormat is nil.'
*** First throw call stack:
(0x19966ab28 0x1914b6f78 0x1b6495c5c 0x1b64980f4 0x100f33bf0 0x100f2a920 0x10029f9e0 0x106f88b98 0x106f8a7bc 0x106f9266c 0x106f93408 0x106fa0404 0x106f9fa38 0x1f5568f20 0x1f5568fc0)
DevLauncher tries to handle uncaught exception: *** -[AVCaptureDevice setActiveDepthDataMinFrameDuration:] activeDepthDataMinFrameDuration cannot be set when activeDepthDataFormat is nil.
Stack Trace: (
    "0   CoreFoundation                      0x000000019966ab34 7A70D5D4-0550-38DC-AB33-71B72AFF1F5F + 969524",
    "1   libobjc.A.dylib                     0x00000001914b6f78 objc_exception_throw + 60",
    "2   AVFCapture                          0x00000001b6495c5c 86041496-AB5E-3852-BD13-FF79DDF7875C + 146524",
    "3   AVFCapture                          0x00000001b64980f4 86041496-AB5E-3852-BD13-FF79DDF7875C + 155892",
    "4   Phomo                               0x0000000100f33bf0 $s12VisionCamera0B7SessionC15configureFormat13configuration6deviceyAA0B13ConfigurationC_So15AVCaptureDeviceCtKF + 1080",
    "5   Phomo                               0x0000000100f2a920 $s12VisionCamera0B7SessionC9configureyyyAA0B13ConfigurationCKcFyyYbcfU_ + 2092",
    "6   Phomo                               0x000000010029f9e0 $sIegh_IeyBh_TR + 48",
    "7   libdispatch.dylib                   0x0000000106f88b98 _dispatch_call_block_and_release + 32",
    "8   libdispatch.dylib                   0x0000000106f8
CGAffineTransformInvert: singular matrix.
libc++abi: terminating due to uncaught exception of type NSException

from react-native-vision-camera.

mrousavy avatar mrousavy commented on June 20, 2024

[AVCaptureDevice setActiveDepthDataMinFrameDuration:] activeDepthDataMinFrameDuration cannot be set when activeDepthDataFormat is nil

Are you sure this can be reproduced in the example app? It sounds like you're rolling a custom patch with some changes (activeDepthDataMinFrameDuration)

from react-native-vision-camera.

stevengoldberg avatar stevengoldberg commented on June 20, 2024

I’ll try running it in the example app, but I haven’t made any changes like that β€” the exact same code works correctly on an iPhone 14 Pro, but throws this error on a 15 Pro. I only encountered it because I got a new phone.

from react-native-vision-camera.

stevengoldberg avatar stevengoldberg commented on June 20, 2024

@mrousavy I have been unable to build the example project, but I created a minimal repro of the crash here:

https://github.com/stevengoldberg/vision-camera-crash/

It crashes the same way every time, only on the iPhone 15 Pro. Repro instructions in the readme.

from react-native-vision-camera.

stevengoldberg avatar stevengoldberg commented on June 20, 2024

FWIW I updated to 4.0 beta 8 and the crash doesn’t happen there.

from react-native-vision-camera.

mrousavy avatar mrousavy commented on June 20, 2024

Hey - I think this issue has been fixed in VisionCamera 4.0.0. πŸ₯³

Please try V4 and let me know if you still experience this issue;

  • if not, please consider πŸ’– sponsoring me on GitHub πŸ’– to support the development of VisionCamera and thank me for my time spent on fixing bugs and building new features.
  • if you still see this issue, please comment and we can re-open this. But please update your native logs with the native (Xcode/Android Studio) logs from running VisionCamera V4 so I can investigate 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.