2014-07-10 64 views
1

從今天起,我的斷點在Xcode 5.1中停止工作。我有一個無法識別的選擇器發送到NSArray,但調試器不顯示錯誤發生的地方。它始終指向main.mXcode 5.1斷點不起作用

2014-07-10 20:12:33.827 App[2936:60b] -[__NSArrayI length]: unrecognized selector sent to instance 0xb766da0 
2014-07-10 20:12:35.489 App[2936:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI length]: unrecognized selector sent to instance 0xb766da0' 
*** First throw call stack: 
(
0 CoreFoundation      0x035b61e4 __exceptionPreprocess + 180 
1 libobjc.A.dylib      0x018a28e5 objc_exception_throw + 44 
2 CoreFoundation      0x03653243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275 
3 CoreFoundation      0x035a650b ___forwarding___ + 1019 
4 CoreFoundation      0x035a60ee _CF_forwarding_prep_0 + 14 
5 UIKit        0x00512463 -[UILabel _shadow] + 45 
6 UIKit        0x005138c2 -[UILabel drawTextInRect:] + 70 
7 UIKit        0x00515dfc -[UILabel drawRect:] + 98 
8 UIKit        0x003c4453 -[UIView(CALayerDelegate) drawLayer:inContext:] + 504 
9 QuartzCore       0x02a8af39 -[CALayer drawInContext:] + 123 
10 QuartzCore       0x02a8ae6a _ZL16backing_callbackP9CGContextPv + 96 
11 QuartzCore       0x029794fc CABackingStoreUpdate_ + 2656 
12 QuartzCore       0x02a8ae02 ___ZN2CA5Layer8display_Ev_block_invoke + 93 
13 QuartzCore       0x02abf2d7 x_blame_allocations + 15 
14 QuartzCore       0x02a8ac6d _ZN2CA5Layer8display_Ev + 1519 
15 QuartzCore       0x02a8aeb9 -[CALayer _display] + 33 
16 QuartzCore       0x02a8a676 _ZN2CA5Layer7displayEv + 144 
17 QuartzCore       0x02a8ae93 -[CALayer display] + 33 
18 QuartzCore       0x02a7f043 _ZN2CA5Layer17display_if_neededEPNS_11TransactionE + 323 
19 QuartzCore       0x02a7f0bc _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 38 
20 QuartzCore       0x029e57fa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294 
21 QuartzCore       0x029e6b85 _ZN2CA11Transaction6commitEv + 393 
22 QuartzCore       0x029e7258 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92 
23 CoreFoundation      0x0357e36e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30 
24 CoreFoundation      0x0357e2bf __CFRunLoopDoObservers + 399 
25 CoreFoundation      0x0355c254 __CFRunLoopRun + 1076 
26 CoreFoundation      0x0355b9d3 CFRunLoopRunSpecific + 467 
27 CoreFoundation      0x0355b7eb CFRunLoopRunInMode + 123 
28 GraphicsServices     0x038135ee GSEventRunModal + 192 
29 GraphicsServices     0x0381342b GSEventRun + 104 
30 UIKit        0x00355f9b UIApplicationMain + 1225 
31 App      0x00002548 main + 94 
32 libdyld.dylib      0x01fe8701 start + 1 
) 
libc++abi.dylib: terminating with uncaught exception of type NSException 

我已經嘗試重新創建斷點,並在默認情況下保留所有選項。藍色箭頭被激活。

'調試時顯示反彙編'未選中。

這裏有什麼問題?

+1

似乎你正在使用發佈版本。 –

回答

1

檢查您的編譯設置模式,如果它處於釋放模式,則將其更改爲調試模式。

+0

它被設置爲調試。 – Drew

+0

你能否粘貼你的代碼 –

+0

你是什麼意思?日誌?因爲我不知道錯誤在哪裏,因爲調試器沒有指向我。 – Drew

0

如果callstack沒有告訴你任何東西,請嘗試打開殭屍對象以獲得更詳細的內存調試信息。 YOUT可以在菜單「 - >方案 - 產品>編輯計劃...」打開它比在左側面板切換到「運行$爲yourprojectname」,並在頂部面板開關來診斷選項卡。 'Menory管理'部分''啓用殭屍對象'只有打開它。但要小心,當你發現你的錯誤再次關閉它,因爲這些選項會導致內存分配和釋放內存中的對象的不同行爲,並可能導致您的應用程序的意外行爲。