WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
256876
Webkit crashes when pinch-to-zooming with 50MB allocated for compositing layers
https://bugs.webkit.org/show_bug.cgi?id=256876
Summary
Webkit crashes when pinch-to-zooming with 50MB allocated for compositing layers
Tomas Brambora
Reported
2023-05-16 22:35:45 PDT
Created
attachment 466376
[details]
crash video Pinch to zoom reliably crashes webkit process running the tiny react app available here:
https://prismatic-pudding-dceafa.netlify.app/
even when the memory allocated to compositing layers is ~50MB only. Each red rectangle is an absolutely positioned 1000px div with `will-change: transform` CSS rule, scaled down to 0.01 with a CSS scale transform. The app crashes quite reliably when pinching to zoom on my iPhone 13 running iOS 16.1 even with only 3 divs rendered (which according to WebInspector allocates roughly 50MB for compositing layers). When allocating 400+MB the app crashes immediately (i.e., just by adding the divs using the slider, without any zooming).
Attachments
crash video
(367.96 KB, video/mp4)
2023-05-16 22:35 PDT
,
Tomas Brambora
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-05-17 09:39:24 PDT
<
rdar://problem/109464112
>
Simon Fraser (smfr)
Comment 2
2023-05-17 09:40:55 PDT
"scaled down to 0.01 with a CSS scale transform" That's not ideal. It makes this related to 27684.
Ryan Reno
Comment 3
2026-10-08 18:04:19 PDT
I looked to see if 296891 improved this at all and it did not. I think the layer memory use estimate is quite a bit off. For instance, on iOS 27, the Web Inspector reports there are 6 layers on page load (the 5 'layer waster's and the root layer) with an estimated memory use of 237.25MB (up from the 80MB estimate the app is using). The layers tab in the Web Inspector is very close in terms of cost of each layer to what is actually used by the device. In fact, it slightly overestimates it by about 2% in this specific case on my iPhone Air. So the estimate the web app is using is off by nearly 300%. If you're using this to demonstrate an issue with a real-world app, I would recommend using the layers tab in Web Inspector to identify the costly layers in the app and adjust the estimates of cost accordingly. If you're willing to share the app and it is publicly accessible, I can take a look as well to see if 296891 improved the site at all. That bug is meant to help with pinch zooming and scrolling, but if baseline memory use is high then it won't be as effective.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug