如何确定 Mobile Safari 崩溃的原因? [英] How can I determine what crashed Mobile Safari?

查看:14
本文介绍了如何确定 Mobile Safari 崩溃的原因?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站在 Mobile Safari 上崩溃,但在桌面上运行良好.

My website crashes on Mobile Safari, but works fine on desktop.

如何确定崩溃的原因?

推荐答案

当 Safari 意外退出显示你的网站时你可以做什么:

What you can do when Safari quits unexpectedly showing your website:

1.Safari 调试控制台

使用 Safari 的调试控制台.在 iPhone 中打开:设置->Safari->高级->调试控制台=on.

Use Safari's debug console. Switch on in your iPhone: Settings->Safari->Advanced->Debug console=on.

对我来说它说

  • 第 6 行出现 2 个 HTML 错误(键width"的视口参数值device-width"无法识别,键user-scalable"的视口参数值no"无法识别.)
  • 第 6 行还有 2 个 HTML 提示.

下次您使用 Safari 检查网页时,将显示调试控制台.

Debug console will be shown next time you check your web page using Safari.

<强>2.网页检查器(来自 iOS 6.0)

如果在您的网页中找出问题变得越来越复杂,请使用 Web Inspector 来调试 Mobile Safari.这很棒教程.

If it is getting more complicated to find out the problem in your webpage use Web Inspector to Debug Mobile Safari. It is a great tutorial for this.

使用 IOS 模拟器,我发现对于这个特定的网站,我拥有的所有 iOS 版本(5.0、5.1 和 6.1)都可以正确运行页面并导致页面崩溃,但在设备(iOS 5.0.1)上仍然崩溃.

Using IOS Simulator I found that for this particular website all iOS version I have, 5.0, 5.1 and also 6.1, runs the page correctly with crashing the page but on device (iOS 5.0.1) still crashes.

我的设备在 iOS 5 上运行,因此我无法访问 Web Inspector,但下一步肯定是在设备上检查您的站点并在您的机器上检查 Web Inspector.

My device runs on iOS 5, so I cannot access Web Inspector, but it is certainly the next step for you to check your site on device and check Web Inspector on your machine.

3.使用 iPhone 配置实用程序的控制台

您可以下载 Apple 的 iPhone 配置实用程序,然后您可以访问手机的控制台在 Safari 测试期间.

You can downlod Apple's iPhone Configuration Utility, then you can access your mobile's Console during Safari test.

检查您的网站,我看到了一些内存警告,最终导致 Safari 崩溃.

Checking your site I see couple of memory warnings which eventually lead to Safari crash.

4a.使用 Xcode 的调试工具

使用 Xcode,您还可以访问设备的控制台(Window->Organizer->Devices tab->Console).

Using Xcode you can also access the device's Console (Window->Organizer->Devices tab->Console).

您的案例在控制台上报告了以下内容:

Your case reported the following on console:

Apr 30 10:15:18 unknown kernel[0] <Debug>: launchd[2489] Builtin profile: MobileSafari (sandbox)   
Apr 30 10:15:38 unknown MobileSafari[2489] <Warning>: Received memory warning. 
Apr 30 10:15:39 unknown SpringBoard[15] <Warning>: Received memory warning. 
Apr 30 10:15:50 unknown UserEventAgent[12] <Notice>: jetsam: kernel termination snapshot being created 
Apr 30 10:15:50 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilephone[0xb2a4]) Exited: Killed: 9
Apr 30 10:15:50 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilesafari[0xf755]) Exited: Killed: 9
Apr 30 10:15:50 unknown SpringBoard[15] <Warning>: Application 'Phone' exited abnormally with signal 9: Killed: 9
Apr 30 10:15:50 unknown SpringBoard[15] <Warning>: Application 'Safari' exited abnormally with signal 9: Killed: 9
Apr 30 10:15:52 unknown ReportCrash[2491] <Error>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2013-04-30-101552.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0

4b.使用 Xcode 的调试工具 Instruments

检查正在发生的事情的另一种复杂方法是​​使用 Instruments.

Another sophisticated way to check what's happening is to use Instruments.

再次检查您的网站,我看到 Safari 在退出之前报告了许多低内存警告.遗憾的是,它并不能直接帮助您发现网站问题,但可能有助于查找 Safari 打开的错误报告.

Checking again your site I see many-many low memory warning reported by Safari before it quits. Sadly it doesn't directy help you discovering the web site problem but maybe helps to find Safari open bug reports.

这篇关于如何确定 Mobile Safari 崩溃的原因?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆