Crash after dismissing a popover during a UINavigationController transition

Originator:adam
Number:rdar://18894218 Date Originated:06-Nov-2014
Status:Open Resolved:
Product:iOS SDK Product Version:8.1
Classification:Crash Reproducible:Always
 
Summary:
I have presented a popover from within a view controller that is inside a UINavigationController. If I allow the user to press the back button while the popover is visible then it remains on the screen. To fix this I added code to dismiss the popover in viewWillDisappear. Unfortunately, if I do this then once the back transition animation is complete the app crashes.

Steps to Reproduce:
1. Build and run the attached application.
2. Press the button to navigate to the second screen.
3. Press the button to show the popover.
4. Without dismissing the popover press the back button in the top-left to return to the first screen. The app will crash after this transition is complete.

Expected Results:
The popover should disappear, and the app should not crash.

Actual Results:
The app crashes.

Version:
iOS 8.1

Notes:


Configuration:
iPad

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!