<?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>298476</bug_id>
          
          <creation_ts>2025-09-05 14:40:18 -0700</creation_ts>
          <short_desc>REGRESSION(299621@main): [MacOS Debug] ASSERTION FAILED: m_gamepads[platformGamepad.index] in &apos;gamepad/gamepad-visibility-1.html&apos; is failing</short_desc>
          <delta_ts>2026-01-21 14:30:56 -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>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=305660</see_also>
          <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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marta Darbinyan">darbinyan</reporter>
          <assigned_to name="Kimmo Kinnunen">kkinnunen</assigned_to>
          <cc>aperez</cc>
    
    <cc>bburg</cc>
    
    <cc>beidson</cc>
    
    <cc>d_delatoba</cc>
    
    <cc>dpino</cc>
    
    <cc>webkit-bot-watchers-bugzilla</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2141323</commentid>
    <comment_count>0</comment_count>
    <who name="Marta Darbinyan">darbinyan</who>
    <bug_when>2025-09-05 14:40:18 -0700</bug_when>
    <thetext>The following test is crashing with assertion errors on different PRs in EWS after 299621@main.

http/tests/cache/disk-cache/disk-cache-302-status-code.html

ASSERTION FAILED: m_gamepads[platformGamepad.index()]
/Volumes/Data/worker/macOS-Sequoia-Debug-Build-EWS/build/Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp(190) : void WebCore::NavigatorGamepad::gamepadDisconnected(PlatformGamepad &amp;)
1   0x3007b1730 WebCore::NavigatorGamepad::gamepadDisconnected(WebCore::PlatformGamepad&amp;)
2   0x3005a71cc WebCore::GamepadManager::platformGamepadDisconnected(WebCore::PlatformGamepad&amp;)
3   0x11cb1d874 WebKit::WebGamepadProvider::gamepadDisconnected(unsigned int)
4   0x11c5bf190 WebKit::WebProcess::gamepadDisconnected(unsigned int)
5   0x11acd0070 auto void IPC::callMemberFunction&lt;WebKit::WebProcess, WebKit::WebProcess, void (unsigned int), std::__1::tuple&lt;unsigned int&gt;&gt;(WebKit::WebProcess*, void (WebKit::WebProcess::*)(unsigned int), std::__1::tuple&lt;unsigned int&gt;&amp;&amp;)::&apos;lambda&apos;(auto&amp;&amp;...)::operator()&lt;unsigned int&gt;(auto&amp;&amp;...) const
6   0x11accffdc decltype(std::declval&lt;WebKit::WebProcess&gt;()(std::declval&lt;unsigned int&gt;())) std::__1::__invoke[abi:sn190102]&lt;void IPC::callMemberFunction&lt;WebKit::WebProcess, WebKit::WebProcess, void (unsigned int), std::__1::tuple&lt;unsigned int&gt;&gt;(WebKit::WebProcess*, void (WebKit::WebProcess::*)(unsigned int), std::__1::tuple&lt;unsigned int&gt;&amp;&amp;)::&apos;lambda&apos;(auto&amp;&amp;...), unsigned int&gt;(WebKit::WebProcess&amp;&amp;, unsigned int&amp;&amp;)
7   0x11accffb0 decltype(auto) std::__1::__apply_tuple_impl[abi:sn190102]&lt;void IPC::callMemberFunction&lt;WebKit::WebProcess, WebKit::WebProcess, void (unsigned int), std::__1::tuple&lt;unsigned int&gt;&gt;(WebKit::WebProcess*, void (WebKit::WebProcess::*)(unsigned int), std::__1::tuple&lt;unsigned int&gt;&amp;&amp;)::&apos;lambda&apos;(auto&amp;&amp;...), std::__1::tuple&lt;unsigned int&gt;, 0ul&gt;(WebKit::WebProcess&amp;&amp;, WebKit::WebProcess&amp;&amp;, std::__1::__tuple_indices&lt;0ul&gt;)
8   0x11accff74 decltype(auto) std::__1::apply[abi:sn190102]&lt;void IPC::callMemberFunction&lt;WebKit::WebProcess, WebKit::WebProcess, void (unsigned int), std::__1::tuple&lt;unsigned int&gt;&gt;(WebKit::WebProcess*, void (WebKit::WebProcess::*)(unsigned int), std::__1::tuple&lt;unsigned int&gt;&amp;&amp;)::&apos;lambda&apos;(auto&amp;&amp;...), std::__1::tuple&lt;unsigned int&gt;&gt;(WebKit::WebProcess&amp;&amp;, WebKit::WebProcess&amp;&amp;)
9   0x11accff48 void IPC::callMemberFunction&lt;WebKit::WebProcess, WebKit::WebProcess, void (unsigned int), std::__1::tuple&lt;unsigned int&gt;&gt;(WebKit::WebProcess*, void (WebKit::WebProcess::*)(unsigned int), std::__1::tuple&lt;unsigned int&gt;&amp;&amp;)
10  0x11a96d8f0 void IPC::handleMessage&lt;Messages::WebProcess::GamepadDisconnected, IPC::Connection, WebKit::WebProcess, WebKit::WebProcess, void (unsigned int)&gt;(IPC::Connection&amp;, IPC::Decoder&amp;, WebKit::WebProcess*, void (WebKit::WebProcess::*)(unsigned int))
11  0x11a969114 WebKit::WebProcess::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;)
12  0x11d7153d8 IPC::Connection::dispatchMessage(IPC::Decoder&amp;)
13  0x11d715840 IPC::Connection::dispatchMessage(WTF::UniqueRef&lt;IPC::Decoder&gt;)
14  0x11d715b64 IPC::Connection::dispatchOneIncomingMessage()
15  0x11d73bcd4 IPC::Connection::enqueueIncomingMessage(WTF::UniqueRef&lt;IPC::Decoder&gt;)::$_2::operator()() const
16  0x11d73bc30 WTF::Detail::CallableWrapper&lt;IPC::Connection::enqueueIncomingMessage(WTF::UniqueRef&lt;IPC::Decoder&gt;)::$_2, void&gt;::call()
17  0x12ee0705c WTF::Function&lt;void ()&gt;::operator()() const
18  0x12eed55b0 WTF::RunLoop::performWork()
19  0x12eedd458 WTF::RunLoop::performWork(void*)
20  0x19a109cd4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
21  0x19a109c68 __CFRunLoopDoSource0
22  0x19a1099d4 __CFRunLoopDoSources0
23  0x19a108628 __CFRunLoopRun
24  0x19a107c58 CFRunLoopRunSpecific
25  0x19b6d6c78 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
26  0x19b74e79c -[NSRunLoop(NSRunLoop) run]
27  0x199d309c8 _xpc_objc_main
28  0x199d40fc8 _xpc_main
29  0x199d30568 _xpc_copy_xpcservice_dictionary
30  0x11a5311ac WebKit::XPCServiceMain(int, char const**)
31  0x11d5fb2ec WKXPCServiceMain
com.apple.WebKit.WebContent.Development terminated (pid 2380) for reason: crash
LEAK: 1 WebPageProxy

Test results:
https://ews-build.webkit.org/#/builders/122/builds/35271

Test history:
https://results.webkit.org/?suite=layout-tests&amp;test=http%2Ftests%2Fcache%2Fdisk-cache%2Fdisk-cache-302-status-code.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2141324</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-09-05 14:40:44 -0700</bug_when>
    <thetext>&lt;rdar://problem/159970513&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2141325</commentid>
    <comment_count>2</comment_count>
    <who name="Marta Darbinyan">darbinyan</who>
    <bug_when>2025-09-05 14:42:45 -0700</bug_when>
    <thetext>The test runs right before newly added `gamepad/gamepad-visibility-1.html` test in 299621@main

gamepad/gamepad-vibrationActuator-playEffect-validation.html
gamepad/gamepad-vibrationActuator-type.html
gamepad/gamepad-visibility-1.html
http/tests/cache/disk-cache/disk-cache-302-status-code.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2141330</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-09-05 14:58:17 -0700</bug_when>
    <thetext>Test gardening commit 299646@main (d8fd4d263989): &lt;https://commits.webkit.org/299646@main&gt;

Reviewed commits have been landed. Closing PR #50389 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2141565</commentid>
    <comment_count>4</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2025-09-07 20:22:18 -0700</bug_when>
    <thetext>Thanks for the reporting.

I think the subject should refer to test &apos;gamepad/gamepad-visibility-1.html&apos; since that&apos;s test failing. I will change the subject to reflect that.

When I landed , 
The MacOS Debug EWS bot also reported a test was failing (https://ews-build.webkit.org/#/builders/122/builds/34735/), but in this case it was &apos;http/tests/cache/disk-cache/speculative-validation/cacheable-redirect.html&apos;. The test didn&apos;t seem to be related to gamepads, so I dismissed as a false positive. I understood now what happened. The &apos;http/tests/cache/disk-cache/&apos; tests run after the &apos;gamepad/&apos; test. What it was reported was the test that run right after &apos;gamepad/gamepad-visibility-1.html&apos;.


I will take a look and try to come up with a fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2162911</commentid>
    <comment_count>5</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2025-12-03 05:46:15 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/54771</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2173865</commentid>
    <comment_count>6</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2026-01-21 14:30:56 -0800</bug_when>
    <thetext>*** Bug 305660 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>