在抛出'NSException'错误的实例后终止调用

时间:2010-11-21 22:24:04

标签: objective-c terminate nsexception

你能帮助我吗,我的应用程序运行良好,但当我对它进行修改时,(我不记得是什么样的修改)我在控制台中收到了这条消息:

[Session started at 2010-11-21 17:15:36 -0500.]
2010-11-21 17:15:37.472 ITMFR[3942:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UICustomObject 0x6a50d90> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key window.'
*** Call stack at first throw:
(
 0   CoreFoundation                      0x021f2b99 __exceptionPreprocess + 185
 1   libobjc.A.dylib                     0x0234240e objc_exception_throw + 47
 2   CoreFoundation                      0x021f2ad1 -[NSException raise] + 17
 3   Foundation                          0x000320f3 _NSSetUsingKeyValueSetter + 135
 4   Foundation                          0x00032061 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
 5   UIKit                               0x004b070a -[UIRuntimeOutletConnection connect] + 112
 6   CoreFoundation                      0x02168d0f -[NSArray makeObjectsPerformSelector:] + 239
 7   UIKit                               0x004af121 -[UINib instantiateWithOwner:options:] + 1041
 8   UIKit                               0x004b0eb5 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
 9   UIKit                               0x002bc402 -[UIApplication _loadMainNibFile] + 172
 10  UIKit                               0x002bd31c -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 198
 11  UIKit                               0x002c73ec -[UIApplication handleEvent:withNewEvent:] + 1958
 12  UIKit                               0x002bfb3c -[UIApplication sendEvent:] + 71
 13  UIKit                               0x002c49bf _UIApplicationHandleEvent + 7672
 14  GraphicsServices                    0x02ad2822 PurpleEventCallback + 1550
 15  CoreFoundation                      0x021d3ff4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
 16  CoreFoundation                      0x02134807 __CFRunLoopDoSource1 + 215
 17  CoreFoundation                      0x02131a93 __CFRunLoopRun + 979
 18  CoreFoundation                      0x02131350 CFRunLoopRunSpecific + 208
 19  CoreFoundation                      0x02131271 CFRunLoopRunInMode + 97
 20  UIKit                               0x002bcc6d -[UIApplication _run] + 625
 21  UIKit                               0x002c8af2 UIApplicationMain + 1160
 22  ITMFR                               0x00003eb8 main + 102
 23  ITMFR                               0x000028e9 start + 53
 24  ???                                 0x00000001 0x0 + 1

) 抛出'NSException'实例后调用终止

请帮助我!!

2 个答案:

答案 0 :(得分:1)

从崩溃报告中,我猜你所做的更改是“接口”构建器中的nib / xib文件,特别是将值绑定到按钮/控件。检查Inspector中的所有UI控件,以确保绑定到共享用户默认值控制器的任何按钮绑定都具有控制器键values,而不是其他。

答案 1 :(得分:0)

这件事发生在我身上,因为我忘记了@synthesize。

@synthesize window;

在我的视图控制器中。