如何解决这个问题"无法识别的选择器发送到实例0x8f6f400"?

时间:2014-07-08 10:33:53

标签: ios objective-c unrecognized-selector

您好,当我使用模拟器运行应用程序时,Xcode调试窗口会显示如下信息:

**

2014-07-08 17:52:35.726 Overdue[10937:60b] Cannot find executable for CFBundle 0x8ce0990 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded)
2014-07-08 17:52:35.764 Overdue[10937:60b] -[__NSCFDictionary title]: unrecognized selector sent to instance 0x955f040
2014-07-08 17:52:35.767 Overdue[10937:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary title]: unrecognized selector sent to instance 0x955f040'
*** First throw call stack:
(
0 CoreFoundation 0x017f41e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x015738e5 objc_exception_throw + 44
2 CoreFoundation 0x01891243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x017e450b ___forwarding___ + 1019
4 CoreFoundation 0x017e40ee _CF_forwarding_prep_0 + 14
5 Overdue 0x00004543 -[CCViewController taskObjectAsAPropertyList:] + 99
6 Overdue 0x00003d1b -[CCViewController viewDidLoad] + 667
7 UIKit 0x0035233d -[UIViewController loadViewIfRequired] + 696
8 UIKit 0x003525d9 -[UIViewController view] + 35
9 UIKit 0x0037d509 -[UINavigationController rotatingSnapshotViewForWindow:] + 52
10 UIKit 0x006c4e3c -[UIClientRotationContext initWithClient:toOrientation:duration:andWindow:] + 420
11 UIKit 0x00279c22 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 1495
12 UIKit 0x00279646 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 82
13 UIKit 0x00279518 -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 117
14 UIKit 0x002795a0 -[UIWindow _setRotatableViewOrientation:duration:force:] + 67
15 UIKit 0x0027863a __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 120
16 UIKit 0x0027859c -[UIWindow _updateToInterfaceOrientation:duration:force:] + 400
17 UIKit 0x002792f3 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 870
18 UIKit 0x0027c8e6 -[UIWindow setDelegate:] + 449
19 UIKit 0x00356b77 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 180
20 UIKit 0x00272474 -[UIWindow addRootViewControllerViewIfPossible] + 591
21 UIKit 0x002725ef -[UIWindow _setHidden:forced:] + 312
22 UIKit 0x0027286b -[UIWindow _orderFrontWithoutMakingKey] + 49
23 UIKit 0x0ef97587 -[UIWindowAccessibility(SafeCategory) _orderFrontWithoutMakingKey] + 77
24 UIKit 0x0027d3c8 -[UIWindow makeKeyAndVisible] + 65
25 UIKit 0x0022dbc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
26 UIKit 0x00232667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
27 UIKit 0x00246f92 -[UIApplication handleEvent:withNewEvent:] + 3517
28 UIKit 0x00247555 -[UIApplication sendEvent:] + 85
29 UIKit 0x00234250 _UIApplicationHandleEvent + 683
30 GraphicsServices 0x037e9f02 _PurpleEventCallback + 776
31 GraphicsServices 0x037e9a0d PurpleEventCallback + 46
32 CoreFoundation 0x0176fca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
33 CoreFoundation 0x0176f9db __CFRunLoopDoSource1 + 523
34 CoreFoundation 0x0179a68c __CFRunLoopRun + 2156
35 CoreFoundation 0x017999d3 CFRunLoopRunSpecific + 467
36 CoreFoundation 0x017997eb CFRunLoopRunInMode + 123
37 UIKit 0x00231d9c -[UIApplication _run] + 840
38 UIKit 0x00233f9b UIApplicationMain + 1225
39 Overdue 0x0000343d main + 141
40 libdyld.dylib 0x01e3b701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

**

那是怎么回事?我试图去模拟器并单击重置内容和设置...它工作,之后我在模拟器上将任务添加到我的tableView,然后我再次运行应用程序,再次出现信息。它实际上让我发疯。那么解决方案是什么?期待您的早日回复。 THX。

2 个答案:

答案 0 :(得分:0)

2014-07-08 17:52:35.764逾期[10937:60b] - [__ NSCFDictionary标题]:无法识别的选择器发送到实例0x955f040

这意味着你试图在NSDictionary类型的对象上调用一个名为title的方法或属性,你认为它是你创建的一些自定义类型,例如Book所以,如果您在本地存储数据或从Web服务获取数据并解析PLIST或JSON文件,那么检查您的解析器,它们可能会返回NSDictionary对象而不是Book或者它是您创建的类<​​/ p>

答案 1 :(得分:0)

您正在title课程上调用方法NSDictionary。由于你还没有发布代码,我想在你返回类的自定义类型的某个地方时,它会返回一个字典。

[myCustomClassObj title]; // myCustomClassObj is referring to a Dictionary instead of your CustomClass

要确定崩溃发生的位置,请添加异常断点。它将停在导致您的应用程序崩溃的确切行。