<?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>286356</bug_id>
          
          <creation_ts>2025-01-22 06:35:56 -0800</creation_ts>
          <short_desc>REGRESSION (iPadOS 18): RemoteScrollingCoordinatorProxyIOS Invalid message dispatched virtual void WebKit::RemoteScrollingCoordinatorProxyIOS::establishLayerTreeScrollingRelations</short_desc>
          <delta_ts>2025-02-12 03:49:59 -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>Compositing</component>
          <version>Safari 18</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 18</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam">adam</reporter>
          <assigned_to name="Matt Woodrow">mattwoodrow</assigned_to>
          <cc>mattwoodrow</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2088968</commentid>
    <comment_count>0</comment_count>
    <who name="Adam">adam</who>
    <bug_when>2025-01-22 06:35:56 -0800</bug_when>
    <thetext>After upgrade to iPAD OS 18 and all subsequent versions (18.1 - 18.3) there seems to be a quite specific bug that crashes the Safari browser (does not happen within Chrome on same device) and in-app webkit instance, seems to be only affecting iPAD OS devices.

Bug reproduced on devices:

M1 iPad Air 5th GEN (MM9E3FD/A) - iOS 18.3 (22D5040d) / iOS 18.3 (22D60) [Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15]

The error message printed in the Xcode console:

```
Library/Caches/com.apple.xbs/Sources/WebKit_Sim/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm 272: Invalid message dispatched virtual void WebKit::RemoteScrollingCoordinatorProxyIOS::establishLayerTreeScrollingRelations(const RemoteLayerTreeHost &amp;)  Received an invalid message &apos;RemoteLayerTreeDrawingAreaProxy_CommitLayerTree&apos; from the WebContent process with PID 22404
```

HTML that reproduces the crash:
```
&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
    &lt;title&gt;Crash iOS&lt;/title&gt;
    &lt;style&gt;
        .element {
            position: relative;
        }

        .container {
            width: 0;
        }

        .container-2 {
                overflow-y: auto;
                transition: 0.3s;
        }

        .container-3 {
            overflow-y: auto;
        }

        .container-4 {
            position: relative;
        }

    &lt;/style&gt;

&lt;/head&gt;

&lt;body&gt;

&lt;button id=&quot;aa_click&quot; style=&quot;margin-top: 200px;&quot;&gt;click123&lt;/button&gt;

&lt;div id=&quot;test&quot; class=&quot;container&quot;&gt;
    &lt;div class=&quot;container-4&quot;&gt;
        &lt;div class=&quot;container-3&quot;&gt;
            &lt;div class=&quot;container-2&quot;&gt;
                &lt;div class=&quot;element&quot;&gt;
                    test
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
    document.getElementById(&quot;aa_click&quot;).onclick = function () {
        let a = document.getElementById(&quot;test&quot;);
        let b = a.style.visibility
        if (b == &apos;hidden&apos;) {
            a.style.visibility = &quot;visible&quot;;
        } else {
            a.style.visibility = &quot;hidden&quot;;
        }
    };

&lt;/script&gt;
&lt;/body&gt;
```

How to reproduce:
1. Create webpage with HTML posted above and visit it via Safari.
2. Click the button 2-3 times.
3. Safari / Webkit should crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2089121</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-01-22 16:37:16 -0800</bug_when>
    <thetext>&lt;rdar://problem/143435840&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2089439</commentid>
    <comment_count>2</comment_count>
      <attachid>473996</attachid>
    <who name="Matt Woodrow">mattwoodrow</who>
    <bug_when>2025-01-23 22:18:38 -0800</bug_when>
    <thetext>Created attachment 473996
Testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2089453</commentid>
    <comment_count>3</comment_count>
    <who name="Matt Woodrow">mattwoodrow</who>
    <bug_when>2025-01-23 23:12:03 -0800</bug_when>
    <thetext>Just to clarify, is this crashing Safari itself, or crashing the contents of the tab?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2089458</commentid>
    <comment_count>4</comment_count>
    <who name="Adam">adam</who>
    <bug_when>2025-01-23 23:39:26 -0800</bug_when>
    <thetext>It crashes the tab only.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2089787</commentid>
    <comment_count>5</comment_count>
    <who name="Matt Woodrow">mattwoodrow</who>
    <bug_when>2025-01-25 16:28:35 -0800</bug_when>
    <thetext>Great, thanks for confirming, I can reproduce. Thanks for the reduced test case!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2089788</commentid>
    <comment_count>6</comment_count>
    <who name="Matt Woodrow">mattwoodrow</who>
    <bug_when>2025-01-25 16:35:04 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/39563</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2090575</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-01-29 15:46:20 -0800</bug_when>
    <thetext>Committed 289527@main (79c73a5e0996): &lt;https://commits.webkit.org/289527@main&gt;

Reviewed commits have been landed. Closing PR #39563 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2094112</commentid>
    <comment_count>8</comment_count>
    <who name="Adam">adam</who>
    <bug_when>2025-02-12 03:49:59 -0800</bug_when>
    <thetext>Any updates when the fix will be released? It&apos;s still breaking in 18.3.1</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>473996</attachid>
            <date>2025-01-23 22:18:38 -0800</date>
            <delta_ts>2025-01-23 22:18:38 -0800</delta_ts>
            <desc>Testcase</desc>
            <filename>hi.html</filename>
            <type>text/html</type>
            <size>1231</size>
            <attacher name="Matt Woodrow">mattwoodrow</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CiAgICA8bWV0YSBjaGFyc2V0
PSJVVEYtOCI+CiAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNl
LXdpZHRoLCBpbml0aWFsLXNjYWxlPTEuMCI+CiAgICA8dGl0bGU+Q3Jhc2ggaU9TPC90aXRsZT4K
ICAgIDxzdHlsZT4KICAgICAgICAuZWxlbWVudCB7CiAgICAgICAgICAgIHBvc2l0aW9uOiByZWxh
dGl2ZTsKICAgICAgICB9CgogICAgICAgIC5jb250YWluZXIgewogICAgICAgICAgICB3aWR0aDog
MDsKICAgICAgICB9CgogICAgICAgIC5jb250YWluZXItMiB7CiAgICAgICAgICAgICAgICBvdmVy
Zmxvdy15OiBhdXRvOwogICAgICAgICAgICAgICAgdHJhbnNpdGlvbjogMC4zczsKICAgICAgICB9
CgogICAgICAgIC5jb250YWluZXItMyB7CiAgICAgICAgICAgIG92ZXJmbG93LXk6IGF1dG87CiAg
ICAgICAgfQoKICAgICAgICAuY29udGFpbmVyLTQgewogICAgICAgICAgICBwb3NpdGlvbjogcmVs
YXRpdmU7CiAgICAgICAgfQoKICAgIDwvc3R5bGU+Cgo8L2hlYWQ+Cgo8Ym9keT4KCjxidXR0b24g
aWQ9ImFhX2NsaWNrIiBzdHlsZT0ibWFyZ2luLXRvcDogMjAwcHg7Ij5jbGljazEyMzwvYnV0dG9u
PgoKPGRpdiBpZD0idGVzdCIgY2xhc3M9ImNvbnRhaW5lciI+CiAgICA8ZGl2IGNsYXNzPSJjb250
YWluZXItNCI+CiAgICAgICAgPGRpdiBjbGFzcz0iY29udGFpbmVyLTMiPgogICAgICAgICAgICA8
ZGl2IGNsYXNzPSJjb250YWluZXItMiI+CiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJlbGVt
ZW50Ij4KICAgICAgICAgICAgICAgICAgICB0ZXN0CiAgICAgICAgICAgICAgICA8L2Rpdj4KICAg
ICAgICAgICAgPC9kaXY+CiAgICAgICAgPC9kaXY+CiAgICA8L2Rpdj4KPC9kaXY+Cgo8c2NyaXB0
PgogICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoImFhX2NsaWNrIikub25jbGljayA9IGZ1bmN0
aW9uICgpIHsKICAgICAgICBsZXQgYSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJ0ZXN0Iik7
CiAgICAgICAgbGV0IGIgPSBhLnN0eWxlLnZpc2liaWxpdHkKICAgICAgICBpZiAoYiA9PSAnaGlk
ZGVuJykgewogICAgICAgICAgICBhLnN0eWxlLnZpc2liaWxpdHkgPSAidmlzaWJsZSI7CiAgICAg
ICAgfSBlbHNlIHsKICAgICAgICAgICAgYS5zdHlsZS52aXNpYmlsaXR5ID0gImhpZGRlbiI7CiAg
ICAgICAgfQogICAgfTsKCjwvc2NyaXB0Pgo8L2JvZHk+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>