How to find the correct line of failure in xcode during crash

Any help to figure out the correct line of failure in xcode during the failure. It is very difficult to debug .so help me as soon as possible. Thanks in advance.

Hi,

Arunkumar.P

+4
source share
2 answers

You will need the .dSYM file created during the build and crash report. Inside the crash report, find the memory addresses in your application where the crash occurred. There should be a string like

13 YourApp 0x0001910a 0x1000 + 98570 

Where 0x0001910a is the memory failure address.

Then use the atos command on the command line to symbolize the address. The syntax is similar to:

 atos -arch arm -o [PATH]/YourApp.app.dSYM/Contents/Resources/DWARF/YourApp 0x0001910a 

This will return the file, method, and failure line. Something like that:

 -[YourView doSomething] (in YourApp) (YourView.m:474) 

The atos command is part of Xcode.

+7
source

Use a breakpoint in your code and NSLog, Build and debug you will see where the emergency line is

-1
source

All Articles