Analyze crash files with Symbolicatecrash

Source: Internet
Author: User

For our iOS developers, the most heartbreaking thing about Apple is that it's been on the app store for one weeks and is reporting a flash-back bug the next day. A week ago I just experienced, and the most pit is due to the first time to do personal development, lack of experience, there is no integration of the league of Analysis SDK, fortunately a few good colleagues downloaded, and then sure enough there are two machines on the flash back. Really despair, the most important crash file has. Here I will describe in detail the specific mental process and analysis methods.

All crash records for iOS apps are recorded on the device, so for iOS developers like me who don't have integration to send crash reports, to get a crash file, you must first connect the crashed machine, then open Xcode, select window Devices (if it's Xcode6 below, it's window, organizer, Devices), select your own machine and click View Device Logs, which opens a small window, This is the crash message for all the apps you've saved so far on your machine. If you have not seen this information for a long time, open it to read long enough to fully read, in short, find your app last crash record, right-click Export. (Do not care about the information, I just find a casual)

Let's take a look at the lead-in. crash file, the upper part is some basic information (basically useless), focus on the crash section of the record, such as (yes, no!). )

Look at the red box, faint kind of feeling not Xiang, very much like an array of cross-border problems ah, can be a few lines to write what, this how to locate the problem ah. First of all, build a folder on the desktop, call crash, and then throw this exported. crash file in. I need a few more details about the record.

Find your last published IPA (if it is not, then export one from archives, but make sure it is the one you used last), right-click Open with the Archive utility (just unzip), Then the. app file under the payload folder is also thrown into the crash folder.

Next you need to dSYM file, or in archives, find the release of that, right-click Show in Finder,

Then to the folder of the. xcarchive file right-click, display the package content, you can see a folder named Dsyms, the inside of the. dsym file, or put in the desktop Crash folder. All right, there's one more thing left, that's the Symbolicatecrash tool on the headline.

Symbolicatecrash is a hidden tool that has the exact path in my Mac as follows (Xcode6.1.app please change to your Xcode name)

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

You can also enter a command search in the terminal:

Find/applications/xcode6.1.app-name Symbolicatecrash-type F

Copy this path, then stick to the finder's "Go to Folder" and go to see the Symbolicatecrash tool, and now copy it to the crash folder on the desktop. At this point, the crash folder now has 4 files, respectively. App,. Crash,. DSYM, Symbolicatecrash. The next step is to use the terminal to knock commands to generate crash that are easier to analyze.

First, use the CD command to go to the crash folder and 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" should be replaced by their respective names. Run, this time the terminal may error Error: "Developer_dir" is not defined At/usr/local/bin/symbolicatecrash line 53. At this time, 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"

And then run the just that command, this time to look at the Desktop Crash folder will be more than a file called "Control_symbol.crash", which is the crash file to locate the problem, we open to look at.

Now the red box of the original mess of things have been "translated" into a breakdown in the specific which of the. m file. Here is the reasonable speculation and debugging, such as my crash is because the third-party time selection control using the form of the intercept string to obtain time, like 09:23 pm is fixed split into the time, minutes, the last afternoon to identify 3 segments, the results of users using 24-hour system, the time is 21 : 23, without the mark of the afternoon, array[2] beyond the subscript of the proper flash back. Think of my brain hole is quite big, this problem causes have been guessed ...

Transferred from: Http://www.cnblogs.com/ningxu-ios/p/4141783.html?utm_source=tuicool

Analyze crash files with Symbolicatecrash

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.