Bug 172206 - Pinch zoom crash: A problem occurred with this web page so it was reloaded
Summary: Pinch zoom crash: A problem occurred with this web page so it was reloaded
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 10
Hardware: iPhone / iPad iOS 10
: P2 Normal
Assignee: Simon Fraser (smfr)
Keywords: InRadar
Depends on:
Reported: 2017-05-16 18:53 PDT by zac spitzer
Modified: 2019-11-09 17:22 PST (History)
5 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description zac spitzer 2017-05-16 18:53:13 PDT
From https://discussions.apple.com/message/31241336#message31241336

Load this page on an iPad, pinch zoom in and out a few times, the page will reliably crash
and show the "A problem occurred with this web page so it was reloaded" message

Comment 1 Radar WebKit Bug Importer 2017-05-16 20:16:07 PDT
Comment 3 zac spitzer 2017-05-29 21:11:23 PDT
another example https://github.com/Leaflet/Leaflet/issues/5496
Comment 4 fetis 2017-12-15 08:37:04 PST
Hello all, I was able to reproduce this issue on apple.com

The steps are next:
1. Pinch zoom in
2. Wait a bit
3. Pinch zoom out.

Here are the videos of that process. I used iPad Air2 with iOS 11.1.2
Safari view

WebInspector view

See how Layers memory dramatically jumps after zoom out.

After that, I was able to reproduce this as standalone example https://codepen.io/fetis/full/VyvYMY 
the steps to reproduce are the same.

It's enough to have only 10 images pushed to compositing layer to crash Safari. It really depends on the screen size, the same amount of images is not enough for iPhone5s.

I also have the same results on the same iPad Air 2 with the latest iOS 11.2.1

In my opinion, this's a bad graphical memory management by Webkit engine. After pinch zoom out amount of memory required for Layers increases very significantly and it causes crash/page reload.
Comment 5 Simon Fraser (smfr) 2017-12-15 11:45:44 PST
http://eucomp.hu/ipad3/test.html triggers a lot of compositing because:
Frame "frame_alterlst" has position:fixed on  <div> id='bodyscroll'
Frame "frame_right_bottom" has position:fixed on  <div> id='bodyscroll'
Main frame has two frames with negative z-index
Comment 6 Simon Fraser (smfr) 2017-12-15 11:58:50 PST
https://wanaryd.com/bike-config/test.html?cc has a lot of layers too, as does http://leafletjs.com because of the maps tiles.
Comment 7 James Alley 2017-12-28 13:48:53 PST
At Yahoo! we see this issue frequently within a web app I'm working on. But I can crash Safari by pinch-zooming on many other websites. Something is not as robust as it should be. I'm disappointed no one has even been assigned to this ticket.
Comment 8 Simon Fraser (smfr) 2017-12-29 08:29:09 PST
James, please file a bug at bugreport.apple.com with your test page.
Comment 9 Damodhar 2019-10-25 04:47:27 PDT
this issue will occured when we add two iframe's side by side and pinch star scrolling.

<iframe src="https://otonomos.com/"></iframe>
<iframe src="https://otonomos.com/"></iframe>
Comment 10 zac spitzer 2019-10-25 05:01:54 PDT
which ios/safari version and device? 13.1.2 on an iPhone XR doesn't crash for me
Comment 11 Damodhar 2019-10-25 05:09:22 PDT
os: 10.3.4
Comment 12 zac spitzer 2019-10-25 05:14:34 PDT
which device? 10.3.4 was a bug fix for older phones which don't get updated anymore
Comment 13 Damodhar 2019-10-25 05:21:24 PDT
os: 10.3.4
device :iPad 4

I have this device
Comment 14 Damodhar 2019-11-09 17:22:51 PST
I got the problem where it is their problem with canvas clearRect function. I handle the canvas and it will work