WKWebView on Mac causes Autolayout Crash After Exiting Full screen Video

I configured a WKWebView to support full screen elements like this:

 WKWebViewConfiguration *webViewConfig = [[WKWebViewConfiguration alloc]init];
WKPreferences *prefs = [[WKPreferences alloc]init];
 prefs.elementFullscreenEnabled = YES;
 webViewConfig.preferences = prefs;

//Create a WKWebView with the configuration and load a url like Youtube that supports  playing videos in full screen....

Then I run the app and play a YouTube video. I enter full screen. Then I exit full screen and I hit an Autolayout crash.

0 libobjc.A.dylib 0x188365820 objc_msgSend + 32

1 CoreAutoLayout 0x1904ed82c -[NSLayoutConstraint _layoutEngine] + 36

2 CoreAutoLayout 0x1904ee3c0 __55+[NSLayoutConstraint _addOrRemoveConstraints:activate:]_block_invoke + 160

3 CoreAutoLayout 0x1904d4514 -[NSISEngine withBehaviors:performModifications:] + 88

4 CoreAutoLayout 0x1904ee238 +[NSLayoutConstraint _addOrRemoveConstraints:activate:] + 308

5 WebKit 0x1a82777fc -[WKFullScreenWindowController finishedExitFullScreenAnimationAndExitImmediately:] + 936

6 WebKit 0x1a7d63868 -[WKFullScreenWindowController windowDidExitFullScreen:] + 44

7 CoreFoundation 0x1887a6560 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 148

8 CoreFoundation 0x188844044 ___CFXRegistrationPost_block_invoke + 88

9 CoreFoundation 0x188843f8c _CFXRegistrationPost + 440

10 CoreFoundation 0x188777b64 _CFXNotificationPost + 708

11 Foundation 0x18966738c -[NSNotificationCenter postNotificationName:object:userInfo:] + 88

12 AppKit 0x18c4a3210 -[NSWindow(NSFullScreen) _didExitFullScreen] + 336

13 AppKit 0x18c2aa3ac -[_NSExitFullScreenTransitionController _doAfterExitFullScreen] + 304

14 AppKit 0x18c2acb28 ___NSRunLoopTimerCreateWithHandler_block_invoke + 56

15 CoreFoundation 0x1887cb54c CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 32

16 CoreFoundation 0x1887cb1f4 __CFRunLoopDoTimer + 940

17 CoreFoundation 0x1887cad4c __CFRunLoopDoTimers + 356

18 CoreFoundation 0x1887b0734 __CFRunLoopRun + 1896

19 CoreFoundation 0x1887af878 CFRunLoopRunSpecific + 612

20 HIToolbox 0x191e8ffa0 RunCurrentEventLoopInMode + 292

21 HIToolbox 0x191e8fde4 ReceiveNextEventCommon + 672

22 HIToolbox 0x191e8fb2c _BlockUntilNextEventMatchingListInModeWithFilter + 72

23 AppKit 0x18ba3584c _DPSNextEvent + 632

24 AppKit 0x18ba349dc -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728

25 AppKit 0x18ba28e0c -[NSApplication run] + 464

26 AppKit 0x18ba00250 NSApplicationMain + 880

27 AppKitWKWebviewProjectForWebInspector 0x102fbbf80 main + 44 (main.m:14)

28 dyld 0x1883a7e50 start + 2544

I filed FB12008643.

WKWebView on Mac causes Autolayout Crash After Exiting Full screen Video
 
 
Q