Some stack information is often displayed during iOS app crash:
*** First throw call Stack:
(0x30cbcd6 0x2ee2a48 0x9cfd3 0x103ba29 0x2f05855 0x1011c 0x86d5d 0x2f3be99 0x67c0e6 0x722ade 0x86d5d 0x2f3be99 0x67c0e6 0x722ade 0x93da1a 0x2ea56
0x36d57d8 0x36d588a 0x679626 0x5a45 0x23f5)
Terminate called throwing an exception(Lldb)
I don't understand what it means: there is a way to display them. I can test it on xcode 4.3 and 5.1 simulators.
1. Add the following method to appdelegate. M:
Void uncaughtexceptionhandler (nsexception * exception ){
Nslog (@ "crash: % @", exception );
Nslog (@ "stack trace: % @", [Exception
Callstacksymbols]);
// Internal Error Reporting
}
2. In the following method of appdelegate. m, the first sentence of calling the following method is OK.
-(Bool) Application :( uiapplication *) Application didfinishlaunchingwitexceptions :( nsdictionary *) launchoptions
{
Nssetuncaughtexceptionhandler (& uncaughtexceptionhandler );
// Other normal operations
The following logs can be output when crash is tested:
Stack trace :(
0 corefoundation 0x02f3a03e _ predictionpreprocess + 206
1 libobjc. A. dylib 0x030cbcd6 objc_exception_throw + 44
2 corefoundation 0x02ee2a48 + [nsexception raise: Format: arguments:] + 136
3 corefoundation 0x02ee29b9 + [nsexception raise: Format:] + 57
4 corefoundation 0x02f392da-[_ nscfdictionary setobject: forkey:] + 250
5 myappname 0x0009cfd3-[xxxdetailview initwithdata: frame: Type:] + 4051