Bug 275852

Summary: REGRESSION (iOS 17.6 beta): Hangs on realmahjongg.com and realcanasta.com (both Safari and WKWebView)
Product: WebKit Reporter: Matthew Windwer <mattwindwer>
Component: Web AudioAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, a_protyasha, ap, benwan876, cdumez, matthew.hutchinson, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Jetsam log none

Description Matthew Windwer 2024-06-25 08:09:49 PDT
Created attachment 471736 [details]
Jetsam log

We are getting reports from customers that our website is crashing in Safari and WKWebView after updating to the first iOS 17.6 beta, which is easily reproducible. Attached is a Jetsam log event from my iPad after updating to the beta.
Comment 1 Alexey Proskuryakov 2024-06-25 12:51:47 PDT
Thank you for the report! Could you please share what the website is, and the steps, so that we could reproduce too?

A jetsam log doesn't provide much to look into, and a jetsam could even be correct behavior if the webpage uses too much memory (but likely not correct if it started with an OS update).
Comment 2 Matthew Windwer 2024-06-25 13:05:23 PDT
Hi Alexey,

It is happening on both of our online games, https://realmahjongg.com and https://realcanasta.com, and in our iOS apps (Real Mah Jongg and Real Canasta) that use a WKWebView. In order to reproduce, one must sign up or login to play the game, and the app (or Safari) will freeze sooner or later. Sometimes it happens within a couple of minutes of playing or it could happen later on, but it happens consistently and is reproducible on multiple devices. Some of our subscribers already updated to iOS 17.6 beta and are no longer able to enjoy our games. The only way to continue the game at that point is to force close Safari or the app and start over.

I'm happy to provide additional information for you to debug by reproducing the crash on my end, if you let me know what to look for or what logs you need. Another option would be for you to sign up for a free trial on our website (no credit card required), and play either game by going through the motions, and usually within 1-2 rounds you will see the crash. Or I could create a version for you to debug that auto-plays by itself, if that's easier, but that will take me some time to put together. Let me know the best approach. Thank you.
Comment 3 Alexey Proskuryakov 2024-06-25 14:18:21 PDT
Thank you!
Comment 4 Radar WebKit Bug Importer 2024-06-25 14:18:32 PDT
<rdar://problem/130531570>
Comment 5 Ahmad Saleem 2024-06-26 08:57:32 PDT
@Matthew - can you share video of behavior of what is happening and also share whether you are playing with live players or computer?

I created test account and used my old beat-up iPhone XS Max (with Public Preview 17.6) and played / interacted with 'realcanasta.com' and didn't get any weird behavior where the website was not behaving correctly.

Appreciate if you can share more insight on above two queries. :-)
Comment 6 Matthew Windwer 2024-06-26 10:45:15 PDT
@Ahmad - I just reproduced on my iPad mini 5th gen, see this video:
https://photos.app.goo.gl/oRWcgoYvYUQDa9No7

Started a new game with just computers. First round was OK. Second round froze midway at 3:41. The screen becomes unresponsive at that point. Only fix it to force exit Safari. As previously stated this crash is occurring on both our games, only on 17.6 beta. Every day customers are writing in who updated to 17.6 beta and are unable to play due to the freezing.
Comment 7 Matthew Windwer 2024-06-26 11:10:01 PDT
@Ahmad, regarding your test device, I do not know if the issue is reproducible on an iPhone because the vast majority of our customers play on iPad, and all the reports so far have come from iPad. I do not have an iPhone with the 17.6 beta installed to test on.
Comment 8 Matthew Windwer 2024-06-27 10:57:34 PDT
I submitted a report for this via feedback assistant - FB14098629, and am asking customers who updated to the 17.6 beta to do the same.
Comment 9 Matthew Windwer 2024-06-30 13:08:32 PDT
Seems like this is related to webaudio (which we make heavy use of). It's reproducible on iOS 17.6 beta by visiting https://www.macguffinandshemp.com/iOS17test/ and pressing "audio sprite loop," which crashes Safari on my iPad Mini 5th gen sooner or later. See bug 275852, which was resolved in iOS 17.5.1 but appears to be back again.
Comment 10 Matthew Windwer 2024-06-30 13:09:54 PDT
Typo in my last comment - I was referring to bug 273041, which was resolved in iOS 17.5 but seems to be back.
Comment 11 Matthew Windwer 2024-06-30 21:20:37 PDT
Please see this video reproduction of jetsam by testing Web Audio on https://www.macguffinandshemp.com/iOS17test/.

Video link:
https://photos.app.goo.gl/LN5AiYaMgf3pk1Lk9

The iPad on the left is an iPad mini 5th gen with iOS 17.6 beta. The iPad on the right is an iPad Air 4th gen with iOS 17.5.1. As you can see, the iPad with 17.6 beta freezes four times, at 0:05, 0:29, 1:17, and 1:27.  The iPad with 17.5.1 continues without issue.
Comment 12 Ahmad Saleem 2024-07-01 02:49:48 PDT
@Matthew - I am able to reproduce it with following steps:

1) Open - https://www.macguffinandshemp.com/iOS17test/
2) Click on 'loop' multiple times

It gets stuck eventually while not on iOS 17.5.

Thanks for test case, it really helped. :-)
Comment 13 Chris Dumez 2024-07-01 19:59:50 PDT
Pull request: https://github.com/apple/WebKit/pull/1349
Comment 14 EWS 2024-07-01 22:22:44 PDT
Committed 272448.1101@safari-7618-branch (bb685c487850): <https://commits.webkit.org/272448.1101@safari-7618-branch>

Reviewed commits have been landed. Closing PR #1349 and removing active labels.
Comment 15 EWS 2024-07-02 18:05:14 PDT
Committed 280604@main (d10e8e1f3209): <https://commits.webkit.org/280604@main>

Reviewed commits have been landed. Closing PR #30400 and removing active labels.
Comment 16 WayneLin 2024-07-08 05:57:17 PDT
Hey everyone,
Could you please let me know if the issue fix is included in iOS 17.6 beta2, or if it’s planned for the next beta? I’ve encountered the same problem. Thanks for your help!
Comment 17 Matthew Windwer 2024-07-08 08:25:54 PDT
@WayneLin the fix is NOT in beta 2. Hopefully next beta?
Comment 18 WayneLin 2024-07-09 10:23:34 PDT
Hi, I seem to be encountering the same issue in iOS 18 beta. Will this be fixed in future updates as well?
Comment 19 Alexey Proskuryakov 2024-07-09 10:49:22 PDT
Yes, this fix is expected to land in iOS 18 too.

As for 17.6, it didn't make beta 3 either, but should be coming.
Comment 20 Matthew Windwer 2024-07-18 09:54:25 PDT
I can confirm this is fixed in iOS 17.6 beta 4. Thanks.
Comment 21 Matthew Windwer 2024-07-29 10:42:48 PDT
Hi,

While I have confirmed this is fixed in iOS 17.6, we are still getting reports of freezing from iOS 18 beta 4. Can Apple confirm this will be fixed in iOS 18? Thanks.
Comment 22 Alexey Proskuryakov 2024-07-29 10:52:06 PDT
This fix is included in iOS 18 beta build 22A5316j (or newer). If you are still seeing similar problems in new builds, please file a new bug.