Comments (7)
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.
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.
[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.
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.
@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.
FWIW I updated to 4.0 beta 8 and the crash doesnβt happen there.
from react-native-vision-camera.
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)
- π Cannot read property 'useCameraDevice' of undefined HOT 2
- π How can I get realtime frames in JS context HOT 7
- π [Android] Native method - jdk.internal.misc.Unsafe.park Input dispatching timed out HOT 6
- π Android Camera view width/height and photo width/height not the same. HOT 1
- π Disabled location showing an error log HOT 4
- Slow response while scanning 1D barcode in iOS intermittently. HOT 2
- π Unable to use more than 3 video outputs on Android HOT 11
- π Differences between iPhone native camera and available camera devices HOT 3
- π Blank screen when enabling photo (`photo={true}`) HOT 6
- π Android Back Camera Zoom Breaks in 4.0.4 HOT 2
- π Taking a photo throws `[session/recoverable-error]: An unknown error occurred while creating the Camera Session, but the Camera can recover from it` HOT 5
- barcodeScan mask flipped view HOT 1
- π Is it possible to display the front and back cameras at the same time HOT 1
- β¨ Contrast HOT 1
- _NativeCameraModule.CameraModule.getLocationPermissionStatus is not a function (it is undefined)π§ HOT 1
- π Two separate frame processors at different target FPS HOT 7
- π [AVCaptureDevice setActiveColorSpace:] Not supported - use activeFormat.supportedColorSpaces'. HOT 2
- π APK Size increase After implementing react-native-vision-camera lib double the apk size HOT 5
- π Why the Photo Result Does Not Come Out in the Specified Aspect Ratio HOT 1
- π `finally` on a `Promise` stops camera on Android HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-vision-camera.