iOS13. UIKitCore crash in [UITargetedPreview initWithView:parameters:]

Hello everyone! I use ios13 and presented web page in WKWebView and then 3d-touched link in the screen.

This caused the next crash.

Anything that can point us in the right direction would me much appreciated.

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'This UITargetedPreview initializer
 requires that the view is in a window, but it is not. 
Either fix that, or use the other initializer that takes a target. (view: <SFSafariView: 0x7ffcab917310>)'
*** First throw call stack:
(
  0 CoreFoundation 0x00007fff23b98bde __exceptionPreprocess + 350
  1 libobjc.A.dylib 0x00007fff503b5b20 objc_exception_throw + 48
  2 CoreFoundation 0x00007fff23b98958 +[NSException raise:format:arguments:] + 88
  3 Foundation 0x00007fff255eb6f5 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
  4 UIKitCore 0x00007fff46bcf329 -[UITargetedPreview initWithView:parameters:] + 302
  5 UIKitCore 0x00007fff4707208e -[_UIPreviewPlatterPresentationAnimator prepareTransitionFromView:toView:containerView:] + 1257
  6 UIKitCore 0x00007fff4674eb39 __68-[_UIRapidClickPresentationAssistant _performPresentationAnimations]_block_invoke + 129
  7 UIKitCore 0x00007fff47628a26 +[UIView(Animation) performWithoutAnimation:] + 84
  8 UIKitCore 0x00007fff4674e91c -[_UIRapidClickPresentationAssistant _performPresentationAnimations] + 373
  9 UIKitCore 0x00007fff4674e6d6 -[_UIRapidClickPresentationAssistant presentFromViewController:sourcePreview:dismissalCompletion:] + 370
  10 UIKitCore 0x00007fff470cf845 __55-[_UIClickPresentationInteraction _performPresentation]_block_invoke_2 + 70
  11 UIKitCore 0x00007fff46b0baf9 +[UIViewController _performWithoutDeferringTransitionsAllowingAnimation:actions:] + 153
  12 UIKitCore 0x00007fff470cf796 __55-[_UIClickPresentationInteraction _performPresentation]_block_invoke.181 + 152
  13 UIKitCore 0x00007fff470cf496 -[_UIClickPresentationInteraction _performPresentation] + 896
  14 UIKitCore 0x00007fff470d111c __55-[_UIClickPresentationInteraction _prepareStateMachine]_block_invoke_4 + 194
  15 UIKitCore 0x00007fff471f0eea -[_UIStateMachine handleEvent:withContext:] + 214
  16 UIKitCore 0x00007fff470cff63 -[_UIClickPresentationInteraction clickInteractionDidClickUp:] + 55
  17 UIKitCore 0x00007fff46dd5aed -[_UIClickInteraction clickDriver:didPerformEvent:] + 316
  18 UIKitCore 0x00007fff46a3831f __58-[_UILongPressClickInteractionDriver _prepareStateMachine]_block_invoke_2 + 74
  19 UIKitCore 0x00007fff471f0fb0 -[_UIStateMachine handleEvent:withContext:] + 412
  20 UIKitCore 0x00007fff46a38e04 -[_UILongPressClickInteractionDriver _updateForActiveGestureRecognizer] + 673
  21 UIKitCore 0x00007fff46a38a59 -[_UILongPressClickInteractionDriver _handleGestureRecognizer:] + 382
  22 UIKitCore 0x00007fff46d1e777 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 44
  23 UIKitCore 0x00007fff46d27909 _UIGestureRecognizerSendTargetActions + 109
  24 UIKitCore 0x00007fff46d24fc5 _UIGestureRecognizerSendActions + 298
  25 UIKitCore 0x00007fff46d242f2 -[UIGestureRecognizer _updateGestureForActiveEvents] + 757
  26 UIKitCore 0x00007fff46d16308 _UIGestureEnvironmentUpdate + 2700
  27 CoreFoundation 0x00007fff23afaeb7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
  28 CoreFoundation 0x00007fff23af594e __CFRunLoopDoObservers + 430
  29 CoreFoundation 0x00007fff23af5fca __CFRunLoopRun + 1514
  30 CoreFoundation 0x00007fff23af56b6 CFRunLoopRunSpecific + 438
  31 GraphicsServices 0x00007fff3815cbb0 GSEventRunModal + 65
  32 UIKitCore 0x00007fff47162a67 UIApplicationMain + 1621
  33 MRMail-Alpha-Enterprise 0x0000000110036d9f main + 367
  34 libdyld.dylib 0x00007fff5123bcf5 start + 1
)

Accepted Reply

It was resolved in 13.2 beta

https://bugs.webkit.org/show_bug.cgi?id=202637

Replies

Same issues happened here.

It was resolved in 13.2 beta

https://bugs.webkit.org/show_bug.cgi?id=202637