Hi WebKit! I found crash in Safari and in my application only on iPhone 8+ Steps to reproduce: 1. Open any site with video 2. Set device orientation on portraitUpsideDown 3. Enter video fullscreen -- Application crashes with stack: Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'preferredInterfaceOrientationForPresentation 'portraitUpsideDown' must match a supported interface orientation: 'portrait, landscapeLeft, landscapeRight'!' *** First throw call stack: ( 0 CoreFoundation 0x000000018040e7ec __exceptionPreprocess + 172 1 libobjc.A.dylib 0x0000000180051144 objc_exception_throw + 56 2 CoreFoundation 0x000000018040e6fc -[NSException initWithCoder:] + 0 3 UIKitCore 0x0000000143b72438 -[UIViewController _preferredInterfaceOrientationForPresentationInWindow:fromInterfaceOrientation:] + 200 4 UIKitCore 0x0000000143a8b0ec -[_UIFullscreenPresentationController _adjustOrientationIfNecessaryInWindow:forViewController:preservingViewController:] + 468 5 UIKitCore 0x0000000143a82c28 -[UIPresentationController _presentWithAnimationController:inWindow:interactionController:target:didFinish:] + 520 6 UIKitCore 0x0000000143b69f74 -[UIViewController _presentViewController:modalSourceViewController:presentationController:animationController:interactionController:completion:] + 1132 7 UIKitCore 0x0000000143b6c604 -[UIViewController _presentViewController:withAnimationController:completion:] + 3216 8 UIKitCore 0x0000000143b6d10c __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 88 9 UIKitCore 0x0000000143b6d364 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 364 10 UIKitCore 0x0000000143b6d078 -[UIViewController _presentViewController:animated:completion:] + 160 11 UIKitCore 0x0000000143b6d408 -[UIViewController presentViewController:animated:completion:] + 140 12 AVKit 0x000000013df9b304 -[AVTransitionController _present:fromViewController:animated:completion:] + 152 13 AVKit 0x000000013df9930c -[AVTransitionController beginFullScreenPresentationOfViewController:fromView:isInteractive:completion:] + 592 14 AVKit 0x000000013df30fd0 -[AVPlayerViewController _transitionToAttachedFullScreenAnimated:interactive:completionHandler:] + 396 15 AVKit 0x000000013df30e04 -[AVPlayerViewController _transitionToFullScreenAnimated:interactive:completionHandler:] + 588 16 AVKit 0x000000013df38284 -[AVPlayerViewController(AVPlayerViewController_WebKitOnly) enterFullScreenAnimated:completionHandler:] + 648 17 WebCore 0x000000014fe0ad60 _ZN7WebCore29VideoFullscreenInterfaceAVKit17doEnterFullscreenEv + 152 18 WebKit 0x00000001159ed760 _ZN6WebKit27VideoFullscreenManagerProxy15enterFullscreenEN3WTF16ObjectIdentifierINS_36PlaybackSessionContextIdentifierTypeEEE + 92 19 JavaScriptCore 0x00000001407a2e5c _ZN3WTF7RunLoop11performWorkEv + 172 20 JavaScriptCore 0x00000001407a3890 _ZN3WTF7RunLoop11performWorkEPv + 32
Created attachment 465884 [details] MobileSafari crash log
This is both not a WebKit bug (it's a platform bug, rdar://problem/98819383), and is already fixed in iOS 16.4 (which shipped last month).
thanks