NEW 232122
REGRESSION (iOS 15): Canvas resizing causes webpage to jetsam
https://bugs.webkit.org/show_bug.cgi?id=232122
Summary REGRESSION (iOS 15): Canvas resizing causes webpage to jetsam
akul
Reported 2021-10-21 17:43:54 PDT
Repro app: https://jsfiddle.net/5an01w6d/ Works on ios14.3 Failed on ios 15 Repro steps: Click both buttons (which call their respective canvas resize methods). On ios14 this does not cause a page reload. On ios15 the webpage crashes and reloads with both. No logs from console were outputted.
Attachments
reduced testacy (1.33 KB, text/html)
2021-12-07 04:34 PST, Kimmo Kinnunen
no flags
Alexey Proskuryakov
Comment 1 2021-10-22 10:10:17 PDT
I can reproduce with iOS 15.1 beta. This is a jetsam, i.e. running out of memory.
Radar WebKit Bug Importer
Comment 2 2021-10-22 10:10:29 PDT
Declan Johnson
Comment 3 2021-10-22 11:59:52 PDT
This bug is causing an experience ContinuumXR made for the Immersive Van Gogh Art Gallery in New York, Denver, and Las Vegas to no longer work. Users with ios 15 are no longer able to experience the pocket gallery exhibit.
Kimmo Kinnunen
Comment 4 2021-12-07 04:34:16 PST
Created attachment 446159 [details] reduced testacy
Kimmo Kinnunen
Comment 5 2021-12-07 04:40:00 PST
So the test jetsams because depth or stencil buffers are being allocated and they consume too much memory. The buffers are freed eventually, but not during the test resize iteration. The logic is: for (int i=0;i<10000;++i) resize() The buffers do not seem to leak permanently, temporarily. Maybe the buffers are retained in the command buffer, and we are clearing too many buffers without waiting for the previous buffer clears to complete.
Kimmo Kinnunen
Comment 6 2021-12-07 04:41:18 PST
To workaround, the reporters can check if they need stencil and depth buffers for the default Framebuffer. If not, switching those off should work around this crash.
Jon Lee
Comment 7 2022-01-10 16:30:07 PST
Is this sample code a reduction of something that's out there in public? Is this the pattern being used by the Van Gogh art gallery, for example?
Kenneth Russell
Comment 8 2022-01-10 18:35:02 PST
Not sure whether the patch was intended for this bug, but this upstream patch to ANGLE seems to be addressing a similar concern: Metal: Canvas resizing causes webpage to run out of memory https://chromium-review.googlesource.com/c/angle/angle/+/3369922
Note You need to log in before you can comment on or make changes to this bug.