danielebogo/DBCamera

Inconsistent state

Open

#173 opened on Jul 30, 2015

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Objective-C (256 forks)github user discovery
Hacktoberfest

Repository metrics

Stars
 (1,258 stars)
PR merge metrics
 (PR metrics pending)

Description

I've been using DBCamera manager for a while. In the latest release I'm getting quite a few of these:

Fatal Exception: NSInternalInconsistencyException
*** -[AVCaptureStillImageOutput captureStillImageAsynchronouslyFromConnection:completionHandler:] - inconsistent state.

stack trace:

ReceiptBank 
DBCameraManager.m line 154
-[DBCameraManager captureImageForDeviceOrientation:]

ReceiptBank 
DBCameraViewController.m line 405
-[DBCameraViewController cameraViewStartRecording]

ReceiptBank 
DBCameraView.m line 352
-[DBCameraView triggerAction:]

I've only replicated it once, the camera shows up black (somehow failed to initialise I guess) and upon pressing the capture button the crash occurs. In the wild the crash is occurring quite a often. I'm not sure what part of my code could cause the camera to show up black randomly. I do dismiss the camera controller when the app goes in the background and recreate a new one when going in foreground if needed.

Contributor guide