<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>223266</bug_id>
          
          <creation_ts>2021-03-16 11:00:29 -0700</creation_ts>
          <short_desc>WK1 hits debug thread assert under [WebView _touchEventRegions] when clicked</short_desc>
          <delta_ts>2021-03-16 12:08:15 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>223268</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Antti Koivisto">koivisto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1740042</commentid>
    <comment_count>0</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2021-03-16 11:00:29 -0700</bug_when>
    <thetext>Clicking anything in UIWebView test app in debug build hits thread assert immediately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1740044</commentid>
    <comment_count>1</comment_count>
      <attachid>423357</attachid>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2021-03-16 11:03:21 -0700</bug_when>
    <thetext>Created attachment 423357
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1740048</commentid>
    <comment_count>2</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2021-03-16 11:05:24 -0700</bug_when>
    <thetext>2021-03-16 19:44:41.692075+0200 WK1VideoTest[55736:12935718] ASSERTION FAILED: !m_impl || m_impl-&gt;wasConstructedOnMainThread() == isMainThread()
ASSERTION FAILED: !m_impl || m_impl-&gt;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&lt;WebCore::Frame, WTF::EmptyCounter&gt;::operator-&gt;() const [T = WebCore::Frame, Counter = WTF::EmptyCounter]
/Users/antti/Build/Debug-iphonesimulator/usr/local/include/wtf/WeakPtr.h(107) : T *WTF::WeakPtr&lt;WebCore::Frame, WTF::EmptyCounter&gt;::operator-&gt;() 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&lt;WebCore::Frame, WTF::EmptyCounter&gt;::operator-&gt;() const
3   0x12d40e909 WTF::WeakPtr&lt;WebCore::Frame, WTF::EmptyCounter&gt;::operator-&gt;() 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&lt;WebCore::IntRect, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;)
5   0x12d691784 WebCore::Document::getTouchRects(WTF::Vector&lt;WebCore::IntRect, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;)
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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1740067</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2021-03-16 11:35:23 -0700</bug_when>
    <thetext>Committed r274499: &lt;https://commits.webkit.org/r274499&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 423357.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1740068</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-03-16 11:36:18 -0700</bug_when>
    <thetext>&lt;rdar://problem/75486328&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1740090</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2021-03-16 12:01:42 -0700</bug_when>
    <thetext>Re-opened since this is blocked by bug 223268</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1740092</commentid>
    <comment_count>6</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2021-03-16 12:02:11 -0700</bug_when>
    <thetext>That&apos;s actually not correct, this code is actively trying to avoid taking a lock.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1740099</commentid>
    <comment_count>7</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2021-03-16 12:07:44 -0700</bug_when>
    <thetext>The assert is probably wrong here as isMainThread() returns false if the lock is not held.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1740101</commentid>
    <comment_count>8</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2021-03-16 12:08:15 -0700</bug_when>
    <thetext>The event region is protected by a separate lock though.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>423357</attachid>
            <date>2021-03-16 11:03:21 -0700</date>
            <delta_ts>2021-03-16 12:04:28 -0700</delta_ts>
            <desc>patch</desc>
            <filename>eventregion-thread-assert.patch</filename>
            <type>text/plain</type>
            <size>1294</size>
            <attacher name="Antti Koivisto">koivisto</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXRMZWdhY3kvbWFjL0NoYW5nZUxvZyBiL1NvdXJjZS9X
ZWJLaXRMZWdhY3kvbWFjL0NoYW5nZUxvZwppbmRleCA3ZTIxMjBkNzBhNjIuLjAzMWQzYTdkNThl
OCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYktpdExlZ2FjeS9tYWMvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJLaXRMZWdhY3kvbWFjL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE1IEBACisyMDIxLTAz
LTE2ICBBbnR0aSBLb2l2aXN0byAgPGFudHRpQGFwcGxlLmNvbT4KKworICAgICAgICBbV2ViVmll
dyBfdG91Y2hFdmVudFJlZ2lvbnNdIG5lZWRzIHRvIHRha2UgdGhlIHdlYiBsb2NrCisgICAgICAg
IGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0yMjMyNjYKKworICAgICAg
ICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBDbGlja2luZyBhbnl0aGlu
ZyBpbiBVSVdlYlZpZXcgdGVzdCBhcHAgaW4gZGVidWcgYnVpbGQgaGl0cyB0aHJlYWQgYXNzZXJ0
IGltbWVkaWF0ZWx5LgorCisgICAgICAgICogV2ViVmlldy9XZWJWaWV3Lm1tOgorICAgICAgICAo
LVtXZWJWaWV3IF90b3VjaEV2ZW50UmVnaW9uc10pOgorCiAyMDIxLTAzLTE2ICBBbnR0aSBLb2l2
aXN0byAgPGFudHRpQGFwcGxlLmNvbT4KIAogICAgICAgICBSRUdSRVNTSU9OIChyMjcyMzAwKTog
W2l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