Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I reproduce website crash on iOS 6.1

Tags:

ios

safari

ios6.1

I received a bug report that this website crashes when viewed on iOS 6.1, though I guess it's the browser version that comes with iOS 6.1 that's more relevant than the OS itself. I don't own any iOS devices, so I'm not sure how I can reproduce/investigate the issue.

Does anyone have a suggestion for how I might reproduce this issue on Windows/Ubunutu? I tried http://www.browserstack.com/ but the latest version they offer is iOS 6.0.

In the unlikely event that anyone has an idea why the crash is happening, please let me know. There is an embedded YouTube video on the homepage, and I've heard that flash and iOS are uneasy bedfellows, so I'm wondering if this could be the cause?

like image 696
Dónal Avatar asked Feb 05 '13 09:02

Dónal


People also ask

Why do web pages keep crashing on my iPhone?

Safari accumulates caches, browsing history, cookies, and other data in the iPhone or iPad. Sometimes that data can interfere with app functionality, so clearing it out can be a remedy to problems with the app crashing or stalling on some web sites.

Why do my websites keep crashing?

There are a few different ways of how a website can crash, including code error, plugin problems, and expired domain, among others. A website is the window of the business. It's how a company communicates with clients. So every second the site is not operational, the business is experiencing missed opportunities.


1 Answers

Update

I was able to reproduce the issue, and get this info from the console logs:

Feb 14 12:45:54 Aaron-Bragers-iPhone MobileSafari[45279] : CGAffineTransformInvert: singular matrix. Feb 14 12:45:56 Aaron-Bragers-iPhone MobileSafari[45279] : CGAffineTransformInvert: singular matrix. Feb 14 12:45:56 Aaron-Bragers-iPhone MobileSafari[45279] : CGAffineTransformInvert: singular matrix. Feb 14 12:45:57 Aaron-Bragers-iPhone MobileSafari[45279] : CGAffineTransformInvert: singular matrix. Feb 14 12:45:59 Aaron-Bragers-iPhone ReportCrash[46048] : Not saving Jetsam log because no data from the kernel. Feb 14 12:45:59 Aaron-Bragers-iPhone UserEventAgent[13] : jetsam: kernel termination snapshot being created Feb 14 12:45:59 Aaron-Bragers-iPhone MobileSafari[45279] : CGAffineTransformInvert: singular matrix. Feb 14 12:46:04 Aaron-Bragers-iPhone MobileSafari[45279] : CGAffineTransformInvert: singular matrix. Feb 14 12:46:04 Aaron-Bragers-iPhone MobileSafari[45279] : CGAffineTransformInvert: singular matrix. Feb 14 12:46:05 Aaron-Bragers-iPhone MobileSafari[45279] : CGAffineTransformInvert: singular matrix. Feb 14 12:46:06 Aaron-Bragers-iPhone MobileSafari[45279] : CGAffineTransformInvert: singular matrix.

... followed by lots of memory warnings.

Your website is causing a memory leak, so iOS is shutting Safari down. Looks like you'll have to follow these instructions to debug it.


Windows

There isn't much you can do to try to reproduce it in Windows. The only option is to download Safari 5 for Windows, which might produce similar errors.

However, this doesn't use the same build of WebKit as Mobile Safari (Safari for Windows is much older) so you'll probably need to borrow a friend's Mac and follow along:

Mac

1. Test your website in the iOS Simulator

Get Xcode

If you don't already have it, download Xcode from the Mac App Store.

Make a blank project

File -> New Project. Select Single View application (or any other iOS application, it doesn't matter). Press Next. Pick any project name (doesn't matter). Press next, then specify some location, and press Create.

Run the project

Press the play button in the upper left corner, or press Command-R, or select Run from the Product menu.

The app should launch in the simulator.

Switch to Safari

Press the home button (or command-shift-H). Then tap Safari, and navigate to your website.

2. Log output.

Open up Terminal, and run tail -f /var/log/system.log | egrep 'MobileSafari'. This will show you all of Mobile Safari's logs. (You can remove the egrep to see all logs, in case the crash is outside of Safari.)

2. Reproduce the issue

I was unable to make iOS or Safari crash on your site, but you'll need to do so to debug the issue.

3. Check the simulator's console logs for details

Switch back to Terminal and review the logs for info about what might have caused the crash.

like image 98
Aaron Brager Avatar answered Oct 02 '22 07:10

Aaron Brager