<?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>252302</bug_id>
          
          <creation_ts>2023-02-15 00:32:47 -0800</creation_ts>
          <short_desc>ASSERT_NOT_REACHED in ImageOverlay updateSubtree()</short_desc>
          <delta_ts>2024-08-31 19:18: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>Platform</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>235598</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jean-Yves Avenard [:jya]">jean-yves.avenard</reporter>
          <assigned_to name="Wenson Hsieh">wenson_hsieh</assigned_to>
          <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1933752</commentid>
    <comment_count>0</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2023-02-15 00:32:47 -0800</bug_when>
    <thetext>STR: 
In a debug build,
Create a video element, don&apos;t have the controls showing.
Right click on the video element to show the control menu.

Result:
Assertion
ASSERT_NOT_REACHED in updateSubTree
https://searchfox.org/wubkat/rev/6312ca8a662145d355274780bbf68b6ce735d8e8/Source/WebCore/dom/ImageOverlay.cpp#266

```
(lldb) bt
* thread #1, queue = &apos;com.apple.main-thread&apos;, stop reason = EXC_BAD_ACCESS (code=1, address=0xbbadbeef)
    frame #0: 0x00000001300a8aa0 JavaScriptCore`::WTFCrash() at Assertions.cpp:327:35
    frame #1: 0x00000001460f48d4 WebCore`WTFCrashWithInfo((null)=266, (null)=&quot;/Users/jyavenard/Work/webkit/OpenSource/Source/WebCore/dom/ImageOverlay.cpp&quot;, (null)=&quot;auto WebCore::ImageOverlay::updateSubtree(WebCore::HTMLElement &amp;, const WebCore::TextRecognitionResult &amp;)::(anonymous class)::operator()() const&quot;, (null)=2340) at Assertions.h:758:5
  * frame #2: 0x000000014932dee4 WebCore`WebCore::ImageOverlay::updateSubtree(this=0x000000016fa9d660)::$_11::operator()() const at ImageOverlay.cpp:266:13
    frame #3: 0x00000001493290d4 WebCore`WebCore::ImageOverlay::updateSubtree(element=0x000000013b004720, result=0x000000016fa9dda0) at ImageOverlay.cpp:258:30
    frame #4: 0x0000000149327ef0 WebCore`WebCore::ImageOverlay::updateWithTextRecognitionResult(element=0x000000013b004720, result=0x000000016fa9dda0, cacheTextRecognitionResults=Yes) at ImageOverlay.cpp:494:21
    frame #5: 0x00000001165691e8 WebKit`auto WebKit::WebPage::requestTextRecognition(this=0x00000001030d8428, result=0x000000016fa9dda0)&gt;&amp;&amp;)::$_26::operator()&lt;WebCore::TextRecognitionResult&gt;(WebCore::TextRecognitionResult&amp;&amp;) const at WebPage.cpp:8036:9
    frame #6: 0x00000001165690f0 WebKit`decltype(__f=0x00000001030d8428, __args=0x000000016fa9dda0)&gt;&amp;&amp;)::$_26&gt;()(std::declval&lt;WebCore::TextRecognitionResult&gt;())) std::__1::__invoke[abi:v15006]&lt;WebKit::WebPage::requestTextRecognition(WebCore::Element&amp;, WebCore::TextRecognitionOptions&amp;&amp;, WTF::CompletionHandler&lt;void (WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt; &gt;&amp;&amp;)&gt;&amp;&amp;)::$_26, WebCore::TextRecognitionResult&gt;(WebKit::WebPage::requestTextRecognition(WebCore::Element&amp;, WebCore::TextRecognitionOptions&amp;&amp;, WTF::CompletionHandler&lt;void (WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt; &gt;&amp;&amp;)&gt;&amp;&amp;)::$_26&amp;&amp;, WebCore::TextRecognitionResult&amp;&amp;) at invoke.h:394:23
    frame #7: 0x00000001165690c0 WebKit`decltype(__f=0x00000001030d8428, __t=size=1, (null)=__tuple_indices&lt;0UL&gt; @ 0x000000016fa9dd3f) std::__1::__apply_tuple_impl[abi:v15006]&lt;WebKit::WebPage::requestTextRecognition(WebCore::Element&amp;, WebCore::TextRecognitionOptions&amp;&amp;, WTF::CompletionHandler&lt;void (WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt; &gt;&amp;&amp;)&gt;&amp;&amp;)::$_26, std::__1::tuple&lt;WebCore::TextRecognitionResult&gt;, 0ul&gt;(WebKit::WebPage::requestTextRecognition(WebCore::Element&amp;, WebCore::TextRecognitionOptions&amp;&amp;, WTF::CompletionHandler&lt;void (WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt; &gt;&amp;&amp;)&gt;&amp;&amp;)::$_26&amp;&amp;, std::__1::tuple&lt;WebCore::TextRecognitionResult&gt;&amp;&amp;, std::__1::__tuple_indices&lt;0ul&gt;) at tuple:1789:1
    frame #8: 0x0000000116568a88 WebKit`decltype(__f=0x00000001030d8428, __t=size=1) std::__1::apply[abi:v15006]&lt;WebKit::WebPage::requestTextRecognition(WebCore::Element&amp;, WebCore::TextRecognitionOptions&amp;&amp;, WTF::CompletionHandler&lt;void (WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt; &gt;&amp;&amp;)&gt;&amp;&amp;)::$_26, std::__1::tuple&lt;WebCore::TextRecognitionResult&gt; &gt;(WebKit::WebPage::requestTextRecognition(WebCore::Element&amp;, WebCore::TextRecognitionOptions&amp;&amp;, WTF::CompletionHandler&lt;void (WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt; &gt;&amp;&amp;)&gt;&amp;&amp;)::$_26&amp;&amp;, std::__1::tuple&lt;WebCore::TextRecognitionResult&gt;&amp;&amp;) at tuple:1798:1
    frame #9: 0x00000001165688f4 WebKit`void IPC::Connection::callReply&lt;Messages::WebPageProxy::RequestTextRecognition, WebKit::WebPage::requestTextRecognition(WebCore::Element&amp;, WebCore::TextRecognitionOptions&amp;&amp;, WTF::CompletionHandler&lt;void (WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt; &gt;&amp;&amp;)&gt;&amp;&amp;)::$_26&gt;(decoder=0x0000000103064180, completionHandler=0x00000001030d8428)&gt;&amp;&amp;)::$_26&amp;&amp;) at Connection.h:704:13
    frame #10: 0x0000000116568884 WebKit`IPC::Connection::AsyncReplyHandler IPC::Connection::makeAsyncReplyHandler&lt;Messages::WebPageProxy::RequestTextRecognition, WebKit::WebPage::requestTextRecognition(WebCore::Element&amp;, WebCore::TextRecognitionOptions&amp;&amp;, WTF::CompletionHandler&lt;void (WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt; &gt;&amp;&amp;)&gt;&amp;&amp;)::$_26&gt;(this=0x00000001030d8428, decoder=0x0000000103064180)&gt;&amp;&amp;)::$_26&amp;&amp;, WTF::ThreadLikeAssertion)::&apos;lambda&apos;(IPC::Decoder*)::operator()(IPC::Decoder*) at Connection.h:687:21
    frame #11: 0x0000000116568794 WebKit`WTF::Detail::CallableWrapper&lt;IPC::Connection::AsyncReplyHandler IPC::Connection::makeAsyncReplyHandler&lt;Messages::WebPageProxy::RequestTextRecognition, WebKit::WebPage::requestTextRecognition(WebCore::Element&amp;, WebCore::TextRecognitionOptions&amp;&amp;, WTF::CompletionHandler&lt;void (WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt; &gt;&amp;&amp;)&gt;&amp;&amp;)::$_26&gt;(WebKit::WebPage::requestTextRecognition(WebCore::Element&amp;, WebCore::TextRecognitionOptions&amp;&amp;, WTF::CompletionHandler&lt;void (WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt; &gt;&amp;&amp;)&gt;&amp;&amp;)::$_26&amp;&amp;, WTF::ThreadLikeAssertion)::&apos;lambda&apos;(IPC::Decoder*), void, IPC::Decoder*&gt;::call(this=0x00000001030d8420, in=0x0000000103064180) at Function.h:53:39
    frame #12: 0x000000011539b7cc WebKit`WTF::Function&lt;void (IPC::Decoder*)&gt;::operator(this=0x000000016fa9dea8, in=0x0000000103064180)(IPC::Decoder*) const at Function.h:82:35
    frame #13: 0x00000001153848e0 WebKit`WTF::CompletionHandler&lt;void (IPC::Decoder*)&gt;::operator(this=0x000000016fa9df20, in=0x0000000103064180)(IPC::Decoder*) at CompletionHandler.h:75:16
    frame #14: 0x0000000116a7b434 WebKit`IPC::Connection::dispatchMessage(this=0x000000010303c840, decoder=0x0000000103064180) at Connection.cpp:1179:9
    frame #15: 0x0000000116a7ba3c WebKit`IPC::Connection::dispatchMessage(this=0x000000010303c840, message=IPC::Decoder @ 0x0000000103064180) at Connection.cpp:1245:9
    frame #16: 0x0000000116a7bd78 WebKit`IPC::Connection::dispatchOneIncomingMessage(this=0x000000010303c840) at Connection.cpp:1310:5
    frame #17: 0x0000000116a99a54 WebKit`IPC::Connection::enqueueIncomingMessage(this=0x0000000103068348)::$_17::operator()() const at Connection.cpp:1159:28
    frame #18: 0x0000000116a99994 WebKit`WTF::Detail::CallableWrapper&lt;IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;)::$_17, void&gt;::call(this=0x0000000103068340) at Function.h:53:39
    frame #19: 0x00000001300d1128 JavaScriptCore`WTF::Function&lt;void ()&gt;::operator(this=0x000000016fa9e0c0)() const at Function.h:82:35
    frame #20: 0x0000000130169850 JavaScriptCore`WTF::RunLoop::performWork(this=0x0000000103010100) at RunLoop.cpp:147:9
    frame #21: 0x000000013016ded4 JavaScriptCore`WTF::RunLoop::performWork(context=0x0000000103010100) at RunLoopCF.cpp:46:37
    frame #22: 0x000000018821a884 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
    frame #23: 0x000000018821a818 CoreFoundation`__CFRunLoopDoSource0 + 176
    frame #24: 0x000000018821a588 CoreFoundation`__CFRunLoopDoSources0 + 244
    frame #25: 0x0000000188219190 CoreFoundation`__CFRunLoopRun + 828
    frame #26: 0x0000000188218700 CoreFoundation`CFRunLoopRunSpecific + 612
    frame #27: 0x00000001891929bc Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
    frame #28: 0x000000018920b37c Foundation`-[NSRunLoop(NSRunLoop) run] + 64
    frame #29: 0x0000000187e8a5a0 libxpc.dylib`_xpc_objc_main + 860
    frame #30: 0x0000000187e89ec0 libxpc.dylib`xpc_main + 108
    frame #31: 0x00000001149fbde8 WebKit`WebKit::XPCServiceMain((null)=1, (null)=0x000000016fa9f588) at XPCServiceMain.mm:207:5
    frame #32: 0x0000000116a4c2f4 WebKit`WKXPCServiceMain(argc=1, argv=0x000000016fa9f588) at WKMain.mm:35:12
    frame #33: 0x0000000100363f9c com.apple.WebKit.WebContent.Development`main(argc=1, argv=0x000000016fa9f588) at AuxiliaryProcessMain.cpp:30:12
    frame #34: 0x0000000187de3f28 dyld`start + 2236
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1933753</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-02-15 00:33:12 -0800</bug_when>
    <thetext>&lt;rdar://problem/105486027&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1933754</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-02-15 00:34:33 -0800</bug_when>
    <thetext>&lt;rdar://problem/105486068&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1933755</commentid>
    <comment_count>3</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2023-02-15 00:39:16 -0800</bug_when>
    <thetext>Test case added:
https://jyavenard.github.io/htmltests/tests/252302/index.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2056836</commentid>
    <comment_count>4</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2024-08-31 17:04:42 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/32995</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2056842</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-08-31 19:18:13 -0700</bug_when>
    <thetext>Committed 283030@main (416adec17dd1): &lt;https://commits.webkit.org/283030@main&gt;

Reviewed commits have been landed. Closing PR #32995 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>