SafariViewController may result in an unrecoverable black screen after interactive dismissal

Originator:wlisac
Number:rdar://23811209 Date Originated:12/8/15
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 9.2
Classification:Serious Bug Reproducible:Always
 
Summary:
My application may be left with a black screen after attempting to dismiss SafariViewController interactively.

Steps to Reproduce:
1) Present SafariViewController modally from a view controller that prefers a `LightContent` status bar style.
2) Start to dismiss SafariViewController interactively (with the edge pan gesture), but stop before the status bar changes color (back to light content).
3) Tap “Done” in SafariViewController or attempt to interactively dismiss it again.

Expected Results:
SafariViewController should be dismissed and my presenting view controller should be visible.

Actual Results:
My presenting view controller is hidden by a black view. The application is in an unrecoverable state.

Notes:
After step 3 - I’ll run these commands. The results are interesting:

(lldb) po [[UIWindow keyWindow] recursiveDescription]
<UIWindow: 0x7fdb8941f800; frame = (0 0; 375 667); autoresize = W+H; gestureRecognizers = <NSArray: 0x7fdb894209f0>; layer = <UIWindowLayer: 0x7fdb8941cb70>>
   | <UITransitionView: 0x7fdb8954dbd0; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x7fdb8954a010>>



(lldb) po [[[UIWindow keyWindow] rootViewController] _printHierarchy]
<SafariTest.ViewController 0x7fdb8941d320>, state: appearing, view: <UIView 0x7fdb894239f0> not in the window
   + <SFSafariViewController 0x7fdb89434850>, state: disappearing, view: <UIView 0x7fdb8b3989f0> not in the window, presented with: <_UIFullscreenPresentationController 0x7fdb8b394450>
   |    | <SFBrowserRemoteViewController 0x7fdb8a827800>, state: disappearing, view: <_UISizeTrackingView 0x7fdb8b39bc50> not in the window

Comments

This problem does not happen when presenting from a view controller with a Default status bar color.

I'm also seeing the black screen issue. In addition, when I present from a Light status bar ViewController, then edge swipe dismiss, my app is in an bad state. I can no longer present new view controllers, and UINavController pushes and pops fail.

By buchanan.paul at Dec. 14, 2015, 10:54 p.m. (reply...)

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!