Reasons for iOS crash and how to crawl crash logs

Source: Internet
Author: User

First of all, what are the anomalies that we often fall back on? The crash comes from two types of problems: the violation of iOS policy and the killing of its own code bugs.

1.IOS Strategy

1.1 low memory Flash back

As mentioned earlier, most of the crash logs contain stack call information for thread execution, except for low memory flash logs, here's a look at the low memory flash log.
We used the Xcode 5 and iOS 7 devices to simulate a low memory flash, and then view the resulting crash log through organizer, and you can see that both process and type are unknown:

1.2Watchdog timed out
The watchdog mechanism, including effective scenarios and performance, is described in theQA1693 documentation on Apple's Iosdeveloper library website. If our application does not respond to certain UI events (such as Start, suspend, resume, end), watchdog will kill our application and generate a response crash report.

1.3 User forced Exit

Once you see "User forced Exit", you might first think of double-clicking the Home key and then closing the application. However, this scenario does not produce a crash log, because when you double-click the Home key, all applications are in the background, and iOS may close the background process at any time, so this scenario does not have a crash log.

Another scenario is when the user presses the Power key and the home key simultaneously to restart the iphone. This scenario generates a log (verified once only), but is not specific to the application.

This refers to the "user forced exit" scenario, which is a slightly more complex operation: Press and hold the Power key until the "swipe off" interface appears, then press and hold the home button, and the current application is terminated and a crash log of the corresponding event is generated.

Typically, a user should encounter an application that is stuck and affect the iOS response before doing so--but it feels like it's advanced, so the crash log should be rare.

2. code Bugs
In addition, the most common crashes are rooted in code bugs such as array out-of- bounds, intervening spaces, null references, references to undefined methods, multithreading security, access to wild pointers, sending of selector , and so on.

Let's talk about how to get the crash log on iOS devices (Crash log)

The first method: XCode menu Window->organizer Select Devices, click the arrow to the left of the phone name to wait for the

In the right vertical blue rectangle, there are two types in the type: Unknown and crash, respectively, where memory is not enough to reclaim memory kill applications causing crash and program exception crash logs.

The second method opens the phone-> Settings-General-> About the Machine-> Diagnostics and Usage-> Diagnostic and usage data this is the crash log for all applications. (I didn't find this)

Third method using third-party software:itools , etc.

If you don't normally use itunes, it's no problem using third-party software like Itools to manage your iphone devices.

Open itools, under your device, find "Advanced Features", click on "Crash Log", and then export the required logs to the computer!

Fourth method get user's Reports log via iTunes Connect (Manage Your applications-view details-crash Crash)

Most users may use the itunes software to manage iphone or ipad devices, and when synced crash logs are synced to the computer, we just need to find them in a specific path.

Mac OS X:~/library/logs/crashreporter/mobiledevice

Windows Xp:c:\documents and Settings\Application Data\applecomputer\logs\crashreporter

Windows 7/vista: C:\Users\ computer logon name \appdata\roaming\applecomputer\logs\crashreporter\ MobileDevice

Reasons for iOS crash and how to crawl crash logs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.