Bug 223266 - WK1 hits debug thread assert under [WebView _touchEventRegions] when clicked
Summary: WK1 hits debug thread assert under [WebView _touchEventRegions] when clicked
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 223268
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-16 11:00 PDT by Antti Koivisto
Modified: 2021-03-16 12:08 PDT (History)
4 users (show)

See Also:


Attachments
patch (1.26 KB, patch)
2021-03-16 11:03 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2021-03-16 11:00:29 PDT
Clicking anything in UIWebView test app in debug build hits thread assert immediately.
Comment 1 Antti Koivisto 2021-03-16 11:03:21 PDT
Created attachment 423357 [details]
patch
Comment 2 Antti Koivisto 2021-03-16 11:05:24 PDT
2021-03-16 19:44:41.692075+0200 WK1VideoTest[55736:12935718] ASSERTION FAILED: !m_impl || m_impl->wasConstructedOnMainThread() == isMainThread()
ASSERTION FAILED: !m_impl || m_impl->wasConstructedOnMainThread() == isMainThread()
2021-03-16 19:44:41.692233+0200 WK1VideoTest[55736:12935718] /Users/antti/Build/Debug-iphonesimulator/usr/local/include/wtf/WeakPtr.h(107) : T *WTF::WeakPtr<WebCore::Frame, WTF::EmptyCounter>::operator->() const [T = WebCore::Frame, Counter = WTF::EmptyCounter]
/Users/antti/Build/Debug-iphonesimulator/usr/local/include/wtf/WeakPtr.h(107) : T *WTF::WeakPtr<WebCore::Frame, WTF::EmptyCounter>::operator->() const [T = WebCore::Frame, Counter = WTF::EmptyCounter]
2021-03-16 19:44:41.693935+0200 WK1VideoTest[55736:12935718] 1   0x123046229 WTFCrash
1   0x123046229 WTFCrash
2021-03-16 19:44:41.698947+0200 WK1VideoTest[55736:12935718] 2   0x12a93174b WTFCrashWithInfo(int, char const*, char const*, int)
2   0x12a93174b WTFCrashWithInfo(int, char const*, char const*, int)
2021-03-16 19:44:41.704032+0200 WK1VideoTest[55736:12935718] 3   0x12d40e909 WTF::WeakPtr<WebCore::Frame, WTF::EmptyCounter>::operator->() const
3   0x12d40e909 WTF::WeakPtr<WebCore::Frame, WTF::EmptyCounter>::operator->() const
2021-03-16 19:44:41.712088+0200 WK1VideoTest[55736:12935718] 4   0x12d405c30 WebCore::Document::topDocument() const
4   0x12d405c30 WebCore::Document::topDocument() const
2021-03-16 19:44:41.718365+0200 WK1VideoTest[55736:12935718] 5   0x12d691784 WebCore::Document::getTouchRects(WTF::Vector<WebCore::IntRect, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>&)
5   0x12d691784 WebCore::Document::getTouchRects(WTF::Vector<WebCore::IntRect, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>&)
2021-03-16 19:44:41.718828+0200 WK1VideoTest[55736:12935718] 6   0x10a30ecc5 -[WebView(WebPrivate) _touchEventRegions]
6   0x10a30ecc5 -[WebView(WebPrivate) _touchEventRegions]
2021-03-16 19:44:41.719259+0200 WK1VideoTest[55736:12935718] 7   0x14a11a3c2 -[UIWebBrowserView(UIWebTouchEventsGestureRecognizerDelegateImplementation) isAnyTouchOverActiveArea:]
7   0x14a11a3c2 -[UIWebBrowserView(UIWebTouchEventsGestureRecognizerDelegateImplementation) isAnyTouchOverActiveArea:]
2021-03-16 19:44:41.719700+0200 WK1VideoTest[55736:12935718] 8   0x14a15eb36 -[UIWebTouchEventsGestureRecognizer touchesBegan:withEvent:]
8   0x14a15eb36 -[UIWebTouchEventsGestureRecognizer touchesBegan:withEvent:]
2021-03-16 19:44:41.720105+0200 WK1VideoTest[55736:12935718] 9   0x14969cd2e -[UIGestureRecognizer _componentsBegan:withEvent:]
9   0x14969cd2e -[UIGestureRecognizer _componentsBegan:withEvent:]
2021-03-16 19:44:41.720513+0200 WK1VideoTest[55736:12935718] 10  0x149bff718 -[UITouchesEvent _sendEventToGestureRecognizer:]
10  0x149bff718 -[UITouchesEvent _sendEventToGestureRecognizer:]
2021-03-16 19:44:41.720874+0200 WK1VideoTest[55736:12935718] 11  0x149691647 __47-[UIGestureEnvironment _updateForEvent:window:]_block_invoke
11  0x149691647 __47-[UIGestureEnvironment _updateForEvent:window:]_block_invoke
2021-03-16 19:44:41.721222+0200 WK1VideoTest[55736:12935718] 12  0x1496912d1 -[UIGestureEnvironment _updateForEvent:window:]
12  0x1496912d1 -[UIGestureEnvironment _updateForEvent:window:]
2021-03-16 19:44:41.721579+0200 WK1VideoTest[55736:12935718] 13  0x149bb0baa -[UIWindow sendEvent:]
13  0x149bb0baa -[UIWindow sendEvent:]
2021-03-16 19:44:41.721956+0200 WK1VideoTest[55736:12935718] 14  0x149b8acbd -[UIApplication sendEvent:]
14  0x149b8acbd -[UIApplication sendEvent:]
2021-03-16 19:44:41.722315+0200 WK1VideoTest[55736:12935718] 15  0x149c1d7ee __processEventQueue
15  0x149c1d7ee __processEventQueue
2021-03-16 19:44:41.722664+0200 WK1VideoTest[55736:12935718] 16  0x149c13594 __eventFetcherSourceCallback
16  0x149c13594 __eventFetcherSourceCallback
2021-03-16 19:44:41.722840+0200 WK1VideoTest[55736:12935718] 17  0x109a34f16 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
17  0x109a34f16 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
2021-03-16 19:44:41.723016+0200 WK1VideoTest[55736:12935718] 18  0x109a34e0e __CFRunLoopDoSource0
18  0x109a34e0e __CFRunLoopDoSource0
2021-03-16 19:44:41.723165+0200 WK1VideoTest[55736:12935718] 19  0x109a342d6 __CFRunLoopDoSources0
19  0x109a342d6 __CFRunLoopDoSources0
2021-03-16 19:44:41.723326+0200 WK1VideoTest[55736:12935718] 20  0x109a2ea2f __CFRunLoopRun
20  0x109a2ea2f __CFRunLoopRun
2021-03-16 19:44:41.723481+0200 WK1VideoTest[55736:12935718] 21  0x109a2e1df CFRunLoopRunSpecific
21  0x109a2e1df CFRunLoopRunSpecific
2021-03-16 19:44:41.723623+0200 WK1VideoTest[55736:12935718] 22  0x10d4cfd85 GSEventRunModal
22  0x10d4cfd85 GSEventRunModal
2021-03-16 19:44:41.724003+0200 WK1VideoTest[55736:12935718] 23  0x149b6c513 -[UIApplication _run]
23  0x149b6c513 -[UIApplication _run]
2021-03-16 19:44:41.724386+0200 WK1VideoTest[55736:12935718] 24  0x149b713d0 UIApplicationMain
24  0x149b713d0 UIApplicationMain
2021-03-16 19:44:41.724518+0200 WK1VideoTest[55736:12935718] 25  0x1091466b1 main
25  0x1091466b1 main
2021-03-16 19:44:41.724641+0200 WK1VideoTest[55736:12935718] 26  0x10eec7bbd start
26  0x10eec7bbd start
Comment 3 EWS 2021-03-16 11:35:23 PDT
Committed r274499: <https://commits.webkit.org/r274499>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 423357 [details].
Comment 4 Radar WebKit Bug Importer 2021-03-16 11:36:18 PDT
<rdar://problem/75486328>
Comment 5 WebKit Commit Bot 2021-03-16 12:01:42 PDT
Re-opened since this is blocked by bug 223268
Comment 6 Antti Koivisto 2021-03-16 12:02:11 PDT
That's actually not correct, this code is actively trying to avoid taking a lock.
Comment 7 Antti Koivisto 2021-03-16 12:07:44 PDT
The assert is probably wrong here as isMainThread() returns false if the lock is not held.
Comment 8 Antti Koivisto 2021-03-16 12:08:15 PDT
The event region is protected by a separate lock though.