[IOS] Use Symbolicatecrash to analyze crash files

Source: Internet
Author: User

Time 2014-12-0323:39:00 Blog Park-Original essence Area

Original http://www.cnblogs.com/ningxu-ios/p/4141783.html

Theme iOS APP iOS development

The saddest thing for our iOS developers is that Apple audited the App store one weeks later and reported a flash-back bug the next day. A week ago I just experienced, and the most pit is because of the first time to do personal development, inexperience, no integration of the analysis of the League of the SDK, fortunately there are a few well-meaning colleagues to download, and then indeed there are two of machines appear on the flash-back. It's despair, the most important crash document. Below I will elaborate on the specific mental process and analysis methods.

All the crash records of the iOS app are recorded on the device, so for iOS developers who don't integrate with me to send crash reports, they must first connect to a crashed machine, then open Xcode and choose Window->. crash Devices (if it is Xcode6 below, window-> organizer-> Devices), select your own machine and click View Device Logs, which opens a small window This is the crash information of all the apps you've kept on your machine so far. If it is a long time no read this information, open and read for a long time to complete reading, in short, find your app last crash record, right key export. (Don't care about the picture below, I'm just looking for one)

Let's take a look at the crash file, the top half is basic information (basically useless), focus on the crash section of the record, the following figure (is the following figure, not the figure above.) )

Look at the red box, faint kind of not Xiang premonition, very much like the array of cross-border problems Ah, can be a few lines below write what, this how to locate the problem ah. First of all, to build a folder on the desktop, called Crash Bar, and then the export of the. crash file. There are still a few things missing from the detailed records ...

Find your last IPA (if you don't have it and then export it from archives, but make sure it's the one you used last time), right-click-> Open-> Archiving utility (that is, unzip), Then throw the. app file under the payload folder into just the crash folder.

Next you need to dSYM file, or in the archives, find the release of the one, right button show in Finder, as shown

Then to the folder of this. xcarchive file right button, display package content, you can see a folder named Dsyms, the inside of the. dsym file, or put it on the desktop Crash folder. Well, there's one more to start with, and that's the Symbolicatecrash tool on the title.

Symbolicatecrash is a hidden tool, it is in my Mac the specific path below (Xcode6.1.app please change your Xcode name)

/applications/xcode6.1.app/contents/sharedframeworks/dtdevicekitbase.framework/versions/a/resources/ Symbolicatecrash

You can also enter the command search in the terminal:

Find/applications/xcode6.1.app-name Symbolicatecrash-typef

Copy this path and then stick to the finder's "Go to Folder" and go to the Symbolicatecrash tool, and now copy it to the crash folder on the desktop. Now there are 4 files in the crash folder, respectively. App, Crash,.dsym, Symbolicatecrash. The next step is to use the terminal to knock commands to generate more easily analyzed crash.

First use the CD command to enter the crash folder, and then enter the following command

./symbolicatecrash/users/xxxx/desktop/crash/inorder.crash/users/xxxx/desktop/crash/inorder.app.dsym >Control _symbol.crash

In the above command, "xxxx" and "inorder" are replaced by their respective names. Run, the terminal may error Error: "Developer_dir" is not defined At/usr/local/bin/symbolicatecrashline 53. Then enter the following in the terminal (Xcode6.1.app is still to replace the actual name)

Export Developer_dir= "/applications/xcode6.1.app/contents/developer"

Then run again just that command, this time to look at the desktop of the crash folder will be called "Control_symbol.crash" file, which is the crash file positioning problem, we open a look. Now the original mess in the red box has been translated into which one of the specific. m files is broken down. The following is a reasonable conjecture and debugging, like my collapse because of this third party time select control uses the form of intercepting strings to obtain time, such as 09:23 PM is fixed to split into the time, minutes, on the afternoon logo 3, the results of the user using 24-hour system, Time became 21:23, There was no sign on the afternoon, array[2] exceeded the next sign of a complete flash. Think of my brain hole is also quite big, this kind of question reason all guessed ...

Related Article

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.