[Webkit-unassigned] [Bug 184144] Reproducible, recurring crash when -[runJavaScriptAlertPanelWithMessage:initiatedByFrame: completionHandler:] was called then the WKWebView is destroyed without any alert buttons being pressed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 2 06:43:23 PDT 2018


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

--- Comment #4 from AV <aravindv2007 at gmail.com> ---
I have attached a test project to reproduce this. Below is the crash logs. The scenario is, we delete a view controller when the app enters background and dismiss all active modals.

This crash happens when the alert view gets dismissed as part of clearing all active modals from the view before entering into the background state.

Is there a way to handle this other than manually keeping track of all active WebKit JS Modals and calling all their corresponding completion-handlers, as this seems to be a complex workaround?


------------------------------------------------------------------------------------

2018-04-02 19:06:36.665964+0530 webKitCompText[1175:13720] [MC] Reading from private effective user settings.
2018-04-02 19:06:38.173182+0530 webKitCompText[1175:13720] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Completion handler passed to -[ViewController webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:] was not called'
*** First throw call stack:
(
        0   CoreFoundation                      0x0000000109c4112b __exceptionPreprocess + 171
        1   libobjc.A.dylib                     0x00000001092d5f41 objc_exception_throw + 48
        2   CoreFoundation                      0x0000000109cb6245 +[NSException raise:format:] + 197
        3   WebKit                              0x0000000108529365 _ZN6WebKit28CompletionHandlerCallCheckerD2Ev + 129
        4   WebKit                              0x000000010856bfc4 _ZNK3WTF20ThreadSafeRefCountedIN6WebKit28CompletionHandlerCallCheckerEE5derefEv + 36
        5   WebKit                              0x0000000108605889 _ZZN3WTF8BlockPtrIFvvEE12fromCallableIZN6WebKit10UIDelegate8UIClient18runJavaScriptAlertEPNS4_12WebPageProxyERKNS_6StringEPNS4_13WebFrameProxyERKN7WebCore18SecurityOriginDataEONS_8FunctionIS1_EEE3$_1EES2_T_ENUlPKvE_8__invokeESO_ + 29
        6   libsystem_blocks.dylib              0x000000011205d99d _Block_release + 111
        7   webKitCompText                      0x000000010821796d __destroy_helper_block_ + 29
        8   libsystem_blocks.dylib              0x000000011205d99d _Block_release + 111
        9   UIKit                               0x000000010aba2e9a -[UIAlertController _clearActionHandlers] + 246
        10  UIKit                               0x000000010aba1282 -[UIAlertController dealloc] + 420
        11  libobjc.A.dylib                     0x00000001092eb178 _ZN12_GLOBAL__N_119AutoreleasePoolPage3popEPv + 860
        12  FrontBoardServices                  0x0000000115f074a0 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 32
        13  FrontBoardServices                  0x0000000115f0714e -[FBSSerialQueue _performNext] + 464
        14  FrontBoardServices                  0x0000000115f076bd -[FBSSerialQueue _performNextFromRunLoopSource] + 45
        15  CoreFoundation                      0x0000000109be4101 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
        16  CoreFoundation                      0x0000000109c83f71 __CFRunLoopDoSource0 + 81
        17  CoreFoundation                      0x0000000109bc8a19 __CFRunLoopDoSources0 + 185
        18  CoreFoundation                      0x0000000109bc7fff __CFRunLoopRun + 1279
        19  CoreFoundation                      0x0000000109bc7889 CFRunLoopRunSpecific + 409
        20  GraphicsServices                    0x000000010d7a09c6 GSEventRunModal + 62
        21  UIKit                               0x000000010a7d25d6 UIApplicationMain + 159
        22  webKitCompText                      0x0000000108217adf main + 111
        23  libdyld.dylib                       0x0000000111fecd81 start + 1
        24  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180402/7b1d1864/attachment-0002.html>


More information about the webkit-unassigned mailing list