After recording a video with UIImagePickerController then deleting the capture directory, UIImagePickerController won't capture until the app is relaunched
| Originator: | sami | ||
| Number: | rdar://28581473 | Date Originated: | 2016-10-02 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 10 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: After recording a video using UIImagePickerController, if the entire capture directory is deleted then UIImagePickerController will fail to record again until the app is relaunched. The error message says "The requested URL was not found on this server.", and the follow messages are logged to the console: [Camera] Encountered an error during video recording! (duration: Zero error: <private>, file: <private>) [Camera] File does not exist: <private> [Camera] Attempting to generate BGRA thumbnail data of format 5003 with an invalid surface. [Generic] video path <private> for PLPreviewImageAndDurationForVideoAtPath does not exist [Generic] video path <private> for PLPreviewImageAndDurationForVideoAtPath does not exist Could not load value for key tracks: The requested URL was not found on this server. Could not load value for key duration: The requested URL was not found on this server. Steps to Reproduce: 1. Capture a video using UIImagePickerController. 2. When complete, delete the capture entire directory (not only the file). 3. Try to capture a video using UIImagePickerController again. Expected Results: Many videos can be captured over and over again. Actual Results: Capture fails until the app is relaunched. Version: iOS 10.0.2 (14A456), iOS 10.1 Beta (14B55c) Notes: This is a regression in iOS 10 and does not occur on iOS 9.3.5. There's a very easy work-around which is to delete only the captured video file and not the entire directory. The documentation for UIImagePickerControllerDelegate doesn't mention anything about deletion at all, so we are left to decide what we should and should not delete. Whether or not the directory is supposed to be deleted it would be nice if the documentation stated something about the policy. Configuration: iPhone 6s, iPhone 6s Plus, or any other iOS 10 device Attachments: 'ImagePickerRequestedURLNotFound_iOS10.zip' was successfully uploaded. https://www.dropbox.com/s/00c68ybi3zzti41/ImagePickerRequestedURLNotFound_iOS10.zip?dl=0
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!