<?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>289007</bug_id>
          
          <creation_ts>2025-03-03 14:53:49 -0800</creation_ts>
          <short_desc>REGRESSION(262954@main): [GTK] Attempts access to disengaged optional with caret blinking disabled</short_desc>
          <delta_ts>2025-03-04 08:24:17 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=266396</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>252687</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Perez">aperez</reporter>
          <assigned_to name="Adrian Perez">aperez</assigned_to>
          <cc>bugs-noreply</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2100045</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2025-03-03 14:53:49 -0800</bug_when>
    <thetext>After enabling C++ library assertions (bug #266396), configuring the system to disable caret blinking (in the GNOME Control Center, for example), will hit this when tabbing in-out and back into a text field:

/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/optional:475: _Tp &amp;std::_Optional_base_impl&lt;WTF::Seconds, std::_Optional_base&lt;WTF::Seconds&gt;&gt;::_M_get() [_Tp = WTF::Seconds, _Dp = std::_Optional_base&lt;WTF::Seconds&gt;]: Assertion &apos;this-&gt;_M_is_engaged()&apos; failed.


The backtrace is:

(gdb) bt
#0  __pthread_kill_implementation (threadid=&lt;optimized out&gt;, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007d5da80a56d3 in __pthread_kill_internal (threadid=&lt;optimized out&gt;, signo=6) at pthread_kill.c:89
#2  0x00007d5da804bba0 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007d5da8033582 in __GI_abort () at abort.c:73
#4  0x00007d5da30d3f70 in std::__glibcxx_assert_fail (file=&lt;optimized out&gt;, line=&lt;optimized out&gt;, function=&lt;optimized out&gt;, condition=&lt;optimized out&gt;) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/assert_fail.cc:41
#5  0x00007d5dabfa0f9f in std::_Optional_base_impl&lt;WTF::Seconds, std::_Optional_base&lt;WTF::Seconds, true, true&gt; &gt;::_M_get (this=&lt;optimized out&gt;)
    at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/optional:475
#6  std::optional&lt;WTF::Seconds&gt;::operator*() &amp; (this=&lt;optimized out&gt;) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/optional:972
#7  WebCore::SimpleCaretAnimator::updateAnimationProperties (this=0x7d5d820ccf00) at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WebCore/platform/SimpleCaretAnimator.cpp:62
#8  0x00007d5dabeaa67d in WTF::Function&lt;void(WebCore::Document&amp;)&gt;::operator() (this=0x7ffdb6b52b80, in=...) at WTF/Headers/wtf/Function.h:82
#9  WebCore::Page::forEachRenderableDocument (this=&lt;optimized out&gt;, functor=...) at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WebCore/page/Page.cpp:4400
#10 0x00007d5dabea929c in WebCore::Page::updateRendering()::$_0::operator()(WebCore::RenderingUpdateStep, WTF::Function&lt;void (WebCore::Document&amp;)&gt; const&amp;) const
    (step=WebCore::RenderingUpdateStep::CaretAnimation, perDocumentFunction=..., this=&lt;optimized out&gt;) at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WebCore/page/Page.cpp:2108
#11 WebCore::Page::updateRendering (this=0x7d5d8d001800) at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WebCore/page/Page.cpp:2176
#12 0x00007d5daa04e2c3 in WebKit::WebPage::updateRendering (this=0x7d5d8d001200) at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WebKit/WebProcess/WebPage/WebPage.cpp:5040
#13 WebKit::LayerTreeHost::flushLayers (this=0x7d5d820a82a0) at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:184
#14 0x00007d5daa0501e6 in WebKit::LayerTreeHost::layerFlushTimerFired (this=0x7d5d820a82a0) at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:255
#15 0x00007d5daa0535d0 in WTF::RunLoop::Timer::Timer&lt;WebKit::LayerTreeHost&gt;(WTF::Ref&lt;WTF::RunLoop, WTF::RawPtrTraits&lt;WTF::RunLoop&gt;, WTF::DefaultRefDerefTraits&lt;WTF::RunLoop&gt; &gt;&amp;&amp;, WebKit::LayerTreeHost*, void (WebKit::LayerTreeHost::*)()) requires WTF::HasCheckedPtrMemberFunctions&lt;WebKit::LayerTreeHost&gt;::value&amp;&amp;(!WTF::HasRefPtrMemberFunctions&lt;WebKit::LayerTreeHost&gt;::value)::{lambda()#1}::operator()() const (this=&lt;optimized out&gt;) at WTF/Headers/wtf/RunLoop.h:200
#16 WTF::Detail::CallableWrapper&lt;WTF::RunLoop::Timer::Timer&lt;WebKit::LayerTreeHost&gt;(WTF::Ref&lt;WTF::RunLoop, WTF::RawPtrTraits&lt;WTF::RunLoop&gt;, WTF::DefaultRefDerefTraits&lt;WTF::RunLoop&gt; &gt;&amp;&amp;, WebKit::LayerTreeHost*, void (WebKit::LayerTreeHost::*)()) requires WTF::HasCheckedPtrMemberFunctions&lt;WebKit::LayerTreeHost&gt;::value&amp;&amp;(!WTF::HasRefPtrMemberFunctions&lt;WebKit::LayerTreeHost&gt;::value)::{lambda()#1}, void&gt;::call() (this=&lt;optimized out&gt;) at WTF/Headers/wtf/Function.h:53
#17 0x00007d5da7cbeec3 in WTF::RunLoop::TimerBase::TimerBase(WTF::Ref&lt;WTF::RunLoop, WTF::RawPtrTraits&lt;WTF::RunLoop&gt;, WTF::DefaultRefDerefTraits&lt;WTF::RunLoop&gt; &gt;&amp;&amp;)::$_0::operator()(void*) const
    (userData=0x7d5d820a8320, this=&lt;optimized out&gt;) at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WTF/wtf/glib/RunLoopGLib.cpp:177
#18 WTF::RunLoop::TimerBase::TimerBase(WTF::Ref&lt;WTF::RunLoop, WTF::RawPtrTraits&lt;WTF::RunLoop&gt;, WTF::DefaultRefDerefTraits&lt;WTF::RunLoop&gt; &gt;&amp;&amp;)::$_0::__invoke(void*) (userData=0x7d5d820a8320)
    at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WTF/wtf/glib/RunLoopGLib.cpp:169
#19 0x00007d5da7cbd9f0 in WTF::RunLoop::$_0::operator()
    (source=0x6499227afda0, callback=0x7d5da7cbee30 &lt;WTF::RunLoop::TimerBase::TimerBase(WTF::Ref&lt;WTF::RunLoop, WTF::RawPtrTraits&lt;WTF::RunLoop&gt;, WTF::DefaultRefDerefTraits&lt;WTF::RunLoop&gt; &gt;&amp;&amp;)::$_0::__invoke(void*)&gt;, userData=0x7d5d820a8320, this=&lt;optimized out&gt;) at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WTF/wtf/glib/RunLoopGLib.cpp:53
#20 WTF::RunLoop::$_0::__invoke
    (source=0x6499227afda0, callback=0x7d5da7cbee30 &lt;WTF::RunLoop::TimerBase::TimerBase(WTF::Ref&lt;WTF::RunLoop, WTF::RawPtrTraits&lt;WTF::RunLoop&gt;, WTF::DefaultRefDerefTraits&lt;WTF::RunLoop&gt; &gt;&amp;&amp;)::$_0::__invoke(void*)&gt;, userData=0x7d5d820a8320)
    at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WTF/wtf/glib/RunLoopGLib.cpp:45
#21 0x00007d5da36de919 in g_main_dispatch (context=0x6499226bf610) at ../glib/glib/gmain.c:3357
#22 0x00007d5da37415d7 in g_main_context_dispatch_unlocked (context=0x6499226bf610) at ../glib/glib/gmain.c:4208
#23 g_main_context_iterate_unlocked.isra.0 (context=0x6499226bf610, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at ../glib/glib/gmain.c:4273
#24 0x00007d5da36df647 in g_main_loop_run (loop=0x6499226b6050) at ../glib/glib/gmain.c:4475
#25 0x00007d5da7cbe4d2 in WTF::RunLoop::run () at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WTF/wtf/glib/RunLoopGLib.cpp:108
#26 0x00007d5daa0611dd in WebKit::AuxiliaryProcessMainBase&lt;WebKit::WebProcess, true&gt;::run (this=0x7ffdb6b52ea0, argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;)
    at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WebKit/Shared/AuxiliaryProcessMain.h:77
#27 WebKit::AuxiliaryProcessMain&lt;WebKit::WebProcessMainGtk&gt; (argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WebKit/Shared/AuxiliaryProcessMain.h:103
#28 WebKit::WebProcessMain (argc=4, argv=&lt;optimized out&gt;) at /usr/src/debug/webkitgtk-6.0-devel/webkitgtk-2.47.90/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp:114
#29 0x00007d5da8035488 in __libc_start_call_main (main=main@entry=0x649913b98710 &lt;main(int, char**)&gt;, argc=argc@entry=4, argv=argv@entry=0x7ffdb6b53038) at ../sysdeps/nptl/libc_start_call_main.h:58
#30 0x00007d5da803554c in __libc_start_main_impl (main=0x649913b98710 &lt;main(int, char**)&gt;, argc=4, argv=0x7ffdb6b53038, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7ffdb6b53028)
    at ../csu/libc-start.c:360
#31 0x0000649913b98635 in _start ()
(gdb)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2100048</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2025-03-03 14:59:57 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/41808</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2100216</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-03-04 00:24:07 -0800</bug_when>
    <thetext>Committed 291555@main (09ad2dad9a7a): &lt;https://commits.webkit.org/291555@main&gt;

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

    </bug>

</bugzilla>