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.
I can reproduce with iOS 15.1 beta. This is a jetsam, i.e. running out of memory.
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.
Created attachment 446159 [details]
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)
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.
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.
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?
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