2012-04-04 224 views
1

我試圖更好地理解堆棧跟蹤的含義。在這種情況下,我有兩個具體的問題。瞭解堆棧跟蹤

1 - 此堆棧跟蹤是否意味着方法setOutcome:無法被Task對象的實例識別?

2 - 如果傳入的參數與期望參數的類不匹配,方法可能無法識別嗎?

012-03-30 01:53:57.988 Arbonne[17625:15203] -[Task setOutcome:]: unrecognized selector sent to instance 0x81b6b60 
2012-03-30 01:53:58.151 Arbonne[17625:15203] ERROR main [Line 20] Uncaught exception: -[Task setOutcome:]: unrecognized selector sent to instance 0x81b6b60 
2012-03-30 01:53:58.154 Arbonne[17625:15203] ERROR main [Line 21] Stack trace: ( 
0 CoreFoundation 0x01d8903e __exceptionPreprocess + 206 
1 libobjc.A.dylib 0x01f1acd6 objc_exception_throw + 44 
2 CoreFoundation 0x01d8acbd -[NSObject doesNotRecognizeSelector:] + 253 
3 CoreFoundation 0x01cefed0 ___forwarding___ + 432 
4 CoreFoundation 0x01cefcb2 _CF_forwarding_prep_0 + 50 
5 Arbonne 0x00030d5d -[TaskViewController addTask:] + 237 
6 CoreFoundation 0x01d8ae99 -[NSObject performSelector:withObject:withObject:] + 73 
7 UIKit 0x0081a14e -[UIApplication sendAction:to:from:forEvent:] + 96 
8 UIKit 0x00a58a0e -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 145 
9 CoreFoundation 0x01d8ae99 -[NSObject performSelector:withObject:withObject:] + 73 
10 UIKit 0x0081a14e -[UIApplication sendAction:to:from:forEvent:] + 96 
11 UIKit 0x0081a0e6 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61 
12 UIKit 0x008c0ade -[UIControl sendAction:to:forEvent:] + 66 
13 UIKit 0x008c0fa7 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 503 
14 UIKit 0x008c0266 -[UIControl touchesEnded:withEvent:] + 549 
15 UIKit 0x0083f3c0 -[UIWindow _sendTouchesForEvent:] + 513 
16 UIKit 0x0083f5e6 -[UIWindow sendEvent:] + 273 
17 UIKit 0x00825dc4 -[UIApplication sendEvent:] + 464 
18 UIKit 0x00819634 _UIApplicationHandleEvent + 8196 
19 GraphicsServices 0x02653ef5 PurpleEventCallback + 1274 
20 CoreFoundation 0x01d5d195 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53 
21 CoreFoundation 0x01cc1ff2 __CFRunLoopDoSource1 + 146 
22 CoreFoundation 0x01cc08da __CFRunLoopRun + 2218 
23 CoreFoundation 0x01cbfd84 CFRunLoopRunSpecific + 212 
24 CoreFoundation 0x01cbfc9b CFRunLoopRunInMode + 123 
25 GraphicsServices 0x026527d8 GSEventRunModal + 190 
26 GraphicsServices 0x0265288a GSEventRun + 103 
27 UIKit 0x00817626 UIApplicationMain + 1163 
28 Arbonne 0x0000324f main + 127 
29 Arbonne 0x00002c55 start + 53 

回答

2
  1. 沒有,但你可能會得到一個無法識別的選擇誤差範圍內這種方法,一旦你嘗試用它做什麼 - 例如如果你期望一個數組並且你傳入一個字符串,然後嘗試從你的「數組」中獲得一個對象,那麼你會在那個時候出錯。
+0

好,太好了,謝謝。 – Darren 2012-04-04 13:31:34