YPImagePicker icon indicating copy to clipboard operation
YPImagePicker copied to clipboard

Crash when hardware corrupted camera is used for capturing photo

Open M-I-N opened this issue 2 years ago • 1 comments

Describe the bug When any camera is corrupted for hardware failure, using that camera for capturing photo causes a fatal crash. Also the camera flipping feature doesn't work. A console log is printed in the case of fatal crash:

[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] No active and enabled video connection

To Reproduce Prerequisite: An iPhone with a camera (preferably back camera) that is corrupted due to hardware failure. Steps to reproduce the behavior:

  1. Run the example project
  2. Click on 'Pick'
  3. Tap 'Photo' on the bottom selector
  4. Allow camera permission if needed
  5. Tap the flip camera button with no success
  6. Tap the green 'Capture' button
  7. Observe the crash

Expected behavior Crash should be prevented. Flip camera button should actually flip the camera.

Environment (please complete the following information):

  • Device: [e.g. iPhone8]
  • OS: [Any]
  • Xcode Version [e.g. 13.2.1]
  • Swift Version [e.g. 5.3]

Installation Type

  • SPM
  • Cocoapods
  • Manual

M-I-N avatar Mar 10 '22 06:03 M-I-N

Any news about this crash ? Still have it today with the last version.

xav42mac avatar Apr 05 '24 07:04 xav42mac