Application sometimes crashes when taking photos (didHideZoomSlider:)

Originator:ben.rigas
Number:rdar://18762927 Date Originated:Oct 24, 2014
Status:Open Resolved:No
Product:iOS SDK Product Version:8.x
Classification: Reproducible:Yes
 
Summary:
We have received crash reports (through Crashlytics) that our application is crashing when users are taking photos. The stack trace shows a message being sent to a selector "didHideZoomSlider:", which does not exist in our code base. It seems to be a part of CameraKit (a private Apple framework).

Steps to Reproduce:

Using any application that uses UIImagePickerController, a simple one screen application that presents this will do fine. Hook up a button action to present the UIImagePickerController using the camera.

1) tap button to take a photo
2) do a 2 finger pinch zoom gesture to show the zoom slider
3) take a picture
4) tap use photo

Repeat those steps and eventually the application will crash on calling "didHideZoomSlider:" selector on an already released object.

Workaround:
We are able to work around the crash by walking through the view hierarchy looking for an instance of the "CAMZoomSlider" class. Then we are setting it's delegate property to nil and the crash doesn't happen. 

Therefore, we believe this is due to the CAMZoomSlider instance's delegate property not being set to nil in dealloc. This is a problem because the delegate property is "assign" and not weak, so it's possible for it to be pointing to an already deallocated instance instead of nil.

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!