iOS上的堆栈跟踪解释

时间:2012-10-16 18:16:49

标签: ios stack-trace

有人可以帮助我理解以下iOS堆栈跟踪吗?我很想知道问题来自哪个UIViewController,所以我可以找出问题所在:

0 libobjc.A.dylib 0x31576f78 objc_msgSend + 15
1 CoreFoundation 0x3168b3fd -[NSObject performSelector:withObject:withObject:] + 52
2 UIKit 0x31a9c6a1 -[UIApplication sendAction:fromSender:toTarget:forEvent:] + 64
3 UIKit 0x31a9c65b -[UIControl(Deprecated) sendAction:toTarget:forEvent:] + 46
4 UIKit 0x31a466a9 -[UIControl(Internal) _sendActionsForEventMask:withEvent:] + 488
5 UIKit 0x31a4516d -[UIFieldEditor becomeFieldEditorForView:] + 168
6 UIKit 0x31a44a9d -[UITextField _becomeFirstResponder] + 96
7 UIKit 0x3196291d -[UIResponder becomeFirstResponder] + 336
8 UIKit 0x31a614a7 -[UITextInteractionAssistant setFirstResponderIfNecessary] + 174
9 UIKit 0x31a60d71 -[UITextInteractionAssistant oneFingerTap:] + 1608
10 UIKit 0x31a60637 _UIGestureRecognizerSendActions + 106
11 UIKit 0x319f0d65 -[UIGestureRecognizer _updateGestureWithEvent:] + 304
12 UIKit 0x31c21479 ___UIGestureRecognizerUpdate_block_invoke_0541 + 48
13 UIKit 0x3196cf55 _UIGestureRecognizerApplyBlocksToArray + 176
14 UIKit 0x3196baa3 _UIGestureRecognizerUpdate + 898
15 UIKit 0x319787e9 _UIGestureRecognizerUpdateGesturesFromSendEvent + 28
16 UIKit 0x31978627 -[UIWindow _sendGesturesForEvent:] + 774
17 UIKit 0x319781f5 -[UIWindow sendEvent:] + 88
18 UIKit 0x3195e695 -[UIApplication sendEvent:] + 356
19 UIKit 0x3195df3b _UIApplicationHandleEvent + 5826
20 GraphicsServices 0x32b6122b PurpleEventCallback + 882
21 CoreFoundation 0x31705523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
22 CoreFoundation 0x317054c5 __CFRunLoopDoSource1 + 140
23 CoreFoundation 0x31704313 __CFRunLoopRun + 1370
24 CoreFoundation 0x316874a5 CFRunLoopRunSpecific + 300
25 CoreFoundation 0x3168736d CFRunLoopRunInMode + 104
26 GraphicsServices 0x32b60439 GSEventRunModal + 136
27 UIKit 0x3198ccd5 UIApplicationMain + 1080
28 MyApp 0x000aa96b _mh_execute_header + 14699

2 个答案:

答案 0 :(得分:1)

从该堆栈跟踪中我们可以推断出用户在文本字段上轻敲了他的手指。如果你的应用程序中只有一个文本字段,那么你现在知道涉及哪个UI元素,也许你可以从中推断出涉及哪个视图控制器。

我们还可以看到文本字段正在发送其成为第一响应者的操作。如果您的应用中只有一个文本字段具有“编辑已开始”(UIControlEventEditingDidBegin)事件的目标和操作,那么您现在知道涉及哪个UI元素,也许可以从中推断出哪个视图控制器是参与。

否则,您无法从该堆栈跟踪中了解涉及哪个视图控制器。

答案 1 :(得分:0)

“我很想知道哪个UIViewController问题起源于”< - 只能从堆栈跟踪中知道。在启用了调试符号的崩溃和/或构建的函数上设置断点。