BackTrace of IOS crash log

Source: Internet
Author: User

The crash log of iOS with the dSYM file can find the backtrace when it crashes, which is the most important information to resolve the crash.

If you are packaging on the same Mac, importing crash log will automatically symbolize BackTrace, and you can see the method name, file name, and line number

However, sometimes the package is not packaged on your Mac, Xcode can not find the corresponding symbol table, BackTrace is not able to symbolize as follows:

Last Exception BackTrace:
0 corefoundation 0x2cb535f2 __exceptionpreprocess + 122
1 LIBOBJC. A.dylib 0x3a3c5c72 Objc_exception_throw + 34
2 corefoundation 0x2ca67152-[__nsarraym objectatindex:] + 226
3 MyApp 0x004fe736 0x9b000 + 4601654
4 MyApp 0x00507ed4 0x9b000 + 4640468
5 MyApp 0x004fd112 0x9b000 + 4595986
6 MyApp 0x003275c6 0x9b000 + 2672070

The second line here can be seen as an array objectatindex throws an exception, but 3-6 rows from the application's own code MyApp, which is the most important information.

In fact, as long as there is the original app file, it is possible to find this information.

Method:

Put the corresponding version of the Myapp.app file and the crash file in the same folder, note that it is necessary to apply the correct version of the app, because each time the packaging, the mapping of the symbol table may be different, if the wrong should not be symbolized.

And then run

Atos-arch armv7-o myapp.app/myapp-l 0x9b000 0x004fe736

The method behind this-arch refers to the hardware architecture:
iphone is ARMv6
Iphone4,4s is armv7.
IPHONE5,5C is armv7s.
iphone 5s, 6, 6+, 6s, 6s+ is arm64

Depending on the device to which the crash occurred, the Myapp.app is the file name of your app, and the two 16 numbers after option L are key:
The first number, take backtrace the 4th column of the row to parse, the second number takes the 3rd column, you will get the corresponding method name, file name, line number.
In this way, you can resolve a row of the above 3-6 rows, you can see where the crash occurred, and then the analysis is simple.

BackTrace of IOS crash log

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.