我正在开展一个项目,我开始时我有一个导航控制器。我首先加载一个登录页面然后转到登录成功页面,我点击几个按钮,当我点击这里的任何按钮时,我收到此错误。当我尝试调试代码时,我在按钮单击方法中有一个断点,在它执行任何代码之前我得到了这个。这是日志。任何人都可以帮助我。提前致谢
2010-10-07 23:15:28.868 Cattle_try1[14417:207] -[__NSCFType onYardMapBtnClick]: unrecognized selector sent to instance 0x6149a40
2010-10-07 23:15:28.872 Cattle_try1[14417:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType onYardMapBtnClick]: unrecognized selector sent to instance 0x6149a40'
*** Call stack at first throw:
(
0 CoreFoundation 0x02655b99 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x027a540e objc_exception_throw + 47
2 CoreFoundation 0x026576ab -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x025c72b6 ___forwarding___ + 966
4 CoreFoundation 0x025c6e72 _CF_forwarding_prep_0 + 50
5 UIKit 0x002b47f8 -[UIApplication sendAction:to:from:forEvent:] + 119
6 UIKit 0x0033fde0 -[UIControl sendAction:to:forEvent:] + 67
7 UIKit 0x00342262 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
8 UIKit 0x00340e0f -[UIControl touchesEnded:withEvent:] + 458
9 UIKit 0x002d83d0 -[UIWindow _sendTouchesForEvent:] + 567
10 UIKit 0x002b9cb4 -[UIApplication sendEvent:] + 447
11 UIKit 0x002be9bf _UIApplicationHandleEvent + 7672
12 GraphicsServices 0x02f35822 PurpleEventCallback + 1550
13 CoreFoundation 0x02636ff4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
14 CoreFoundation 0x02597807 __CFRunLoopDoSource1 + 215
15 CoreFoundation 0x02594a93 __CFRunLoopRun + 979
16 CoreFoundation 0x02594350 CFRunLoopRunSpecific + 208
17 CoreFoundation 0x02594271 CFRunLoopRunInMode + 97
18 GraphicsServices 0x02f3400c GSEventRunModal + 217
19 GraphicsServices 0x02f340d1 GSEventRun + 115
20 UIKit 0x002c2af2 UIApplicationMain + 1160
21 Cattle_try1 0x00002338 main + 102
22 Cattle_try1 0x000022c9 start + 53
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
kill
quit
调试器已退出,状态为0。
答案 0 :(得分:2)
您很可能不会保留您尝试访问的对象。但是如果你不包含这些代码就很难说。
答案 1 :(得分:1)
这不是解决方案,但至少要做一个回溯,看看你是否能确切地看到它在哪里死亡。
构建并调试应用程序并运行应用程序,直到出现错误。然后在控制台中(出现SIGABRT错误)输入
bt
和Return键。如果你很幸运,它会告诉你失败的地方。您正在寻找最高(最早写入控制台)文件和行号,可能是您的一个视图控制器,一个.m文件。