Bug 202637 - ios13 crash in [UITargetedPreview initWithView:parameters:]
Summary: ios13 crash in [UITargetedPreview initWithView:parameters:]
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad iOS 13
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-07 08:38 PDT by Andrew
Modified: 2019-10-11 10:23 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew 2019-10-07 08:38:32 PDT
Hello everyone! I use ios13 and presented WKWebView and then 3d-touched the screen.
This caused the next crash:

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
)
Comment 1 Alexey Proskuryakov 2019-10-07 14:07:13 PDT
Thank you for the report!

Is this issue reproducible at will?
Comment 2 Andrew 2019-10-10 04:34:24 PDT
Hello! Thank you for response! I pushed example project on github https://github.com/Hoderu/iOS_Developing/tree/master/uikitcore_bug
case:
1. open webview, just tap button
2. after that 3d touch some link in wkwebview
3. crash :)
Comment 3 Wenson Hsieh 2019-10-10 08:08:52 PDT
(In reply to Andrew from comment #2)
> Hello! Thank you for response! I pushed example project on github
> https://github.com/Hoderu/iOS_Developing/tree/master/uikitcore_bug
> case:
> 1. open webview, just tap button
> 2. after that 3d touch some link in wkwebview
> 3. crash :)

I’m able to reproduce the crash on iOS 13.1.
Comment 4 Wenson Hsieh 2019-10-10 08:30:31 PDT
(In reply to Wenson Hsieh from comment #3)
> (In reply to Andrew from comment #2)
> > Hello! Thank you for response! I pushed example project on github
> > https://github.com/Hoderu/iOS_Developing/tree/master/uikitcore_bug
> > case:
> > 1. open webview, just tap button
> > 2. after that 3d touch some link in wkwebview
> > 3. crash :)
> 
> I’m able to reproduce the crash on iOS 13.1.

However, it appears to be fixed in the iOS 13.2 beta.
Comment 5 Alexey Proskuryakov 2019-10-11 10:23:29 PDT
Marking as resolved per the above.