0

i want to look my mistake line of my app:

0   CoreFoundation                      0x36e008a7 __exceptionPreprocess + 186

1   libobjc.A.dylib                     0x33217259 objc_exception_throw + 32
2   CoreFoundation                      0x36e00789 +[NSException raise:format:] + 0
3   CoreFoundation                      0x36e007ab +[NSException raise:format:] + 34
4   Foundation                          0x32a8e5b3 +[NSJSONSerialization   JSONObjectWithData:options:error:] + 66
5   myshine                             0x001f68d1 _mh_execute_header + 1046737
6   myshine                             0x000fb27b _mh_execute_header + 17019
7   UIKit                               0x35009cab -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1182
8   UIKit                               0x350037dd -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 408
9   UIKit                               0x34fd1ac3 -[UIApplication handleEvent:withNewEvent:] + 1010
10  UIKit                               0x34fd1567 -[UIApplication sendEvent:] + 54
11  UIKit                               0x34fd0f3b _UIApplicationHandleEvent + 5826
12  GraphicsServices                    0x34f1e22b PurpleEventCallback + 882
13  CoreFoundation                      0x36dd4523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
14  CoreFoundation                      0x36dd44c5 __CFRunLoopDoSource1 + 140
15  CoreFoundation                      0x36dd3313 __CFRunLoopRun + 1370
16  CoreFoundation                      0x36d564a5 CFRunLoopRunSpecific + 300
17  CoreFoundation                      0x36d5636d CFRunLoopRunInMode + 104
18  UIKit                               0x3500286b -[UIApplication _run] + 550
19  UIKit                               0x34fffcd5 UIApplicationMain + 1080
20  myshine                             0x000faa33 _mh_execute_header + 14899
21  myshine                             0x000f9270 _mh_execute_header + 8816



mac04:skydrive pwang$ dwarfdump --uuid myshine.app.dSYM
UUID: DEB2D948-0339-31BF-B3A3-CE21B73171AC (armv7) myshine.app.dSYM/Contents/Resources/DWARF/myshine
UUID: 90212FF0-80ED-3083-9DFB-FC883F1EDBD0 (armv7s) myshine.app.dSYM/Contents/Resources/DWARF/myshine
mac04:skydrive pwang$ dwarfdump --uuid myshine.app/myshine
UUID: DEB2D948-0339-31BF-B3A3-CE21B73171AC (armv7) myshine.app/myshine
UUID: 90212FF0-80ED-3083-9DFB-FC883F1EDBD0 (armv7s) myshine.app/myshine
 mac04:skydrive pwang$ /Applications/Xcode.app/Contents/Developer/usr/bin/atos -arch armv7 -o myshine.app/myshine 0x001f68d1
0x001f68d1 (in myshine)

it give me the 0x001f68d1,not the mistake line. can you tell me what should i do can get the correct line

pengwang
  • 19,536
  • 34
  • 119
  • 168
  • Do you have an archive in Xcode for this app? You need to be able to decode the crash report and that requires giving Xcode information about the build... – Wain May 09 '13 at 08:49
  • i am not have the whole ios crash report – pengwang May 09 '13 at 09:45
  • You need the first line of the binary images section of the crash report, otherwise you won't be able to find out the correct address that atos needs. See http://stackoverflow.com/questions/13574933/ios-crash-reports-atos-not-working-as-expected/13576028#13576028 – Kerni May 09 '13 at 09:51

2 Answers2

3

Here are some links to how you can do attempt to read that crash report:

Symbolicating iPhone App Crash Reports

Ray Wenderlich tutorial HERE

That being said, sometimes you will not get the correct line for an error in your project. For example if you have instantiated a an unretained pointer for an object and something else tries to point to it after the retain count is zero, that will cause an error (bad access), but in reality the place where that bad access crash happens is not the place where the issue is (the declaration of the pointer). My first step (usually before trying to analyze the crash report, unless it is obvious), is to set a break point and then step through the code until the app crashes. You can also use break points and customize them to continue while sending output to the debugger or playing a sound, etc. See THIS tutorial for some info on debugging techniques.

Community
  • 1
  • 1
LJ Wilson
  • 14,445
  • 5
  • 38
  • 62
  • 1
    rename weak pointer to unretained pointer.. a weak pointer wont crash with arc and without arc there is no weak – Daij-Djan May 09 '13 at 09:09
0

Logs suggest that NSJSONSerialization is raising an exception. Write a try-catch block and put the exception causing code in it. Print the exception details, and you will come to know the issue.

You can also add a breakpoint for objc_exception_throw and +[NSException raise:format:] and debug the code. When the error condition occurs you will be able to trace the chain of events that caused this error. Refer to this link to see how to add these breakpoints.

Community
  • 1
  • 1
Amar
  • 13,202
  • 7
  • 53
  • 71
  • this is a old version,i want to know why give the 0x001f68d1 (in myshine) ? – pengwang May 09 '13 at 09:44
  • Try this [link](http://stackoverflow.com/a/14767076/1407017). This will make your program break at objc_exception_throw, then you can check the stack trace in "Debug navigator" tab. – Amar May 09 '13 at 09:49