抛出“NSException”实例后调用终止错误

发布于 2024-10-03 19:48:00 字数 2654 浏览 0 评论 0原文

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

[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”实例后终止调用

,请帮助我!

Can you please help me, my application worked well, but when i did a modification on it, (i don't remember what kind of modification) i got this message in the console:

[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

)
terminate called after throwing an instance of 'NSException'

please, HELP ME!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

忘羡 2024-10-10 19:48:00

从崩溃报告中,我猜测您所做的更改是对界面生成器中的 nib / xib 文件进行的,特别是将值绑定到按钮/控件。检查所有 UI 控件的检查器,以确保绑定到共享用户默认控制器的任何按钮绑定都具有控制器键,而不是其他内容。

From the crash report, I would guess that the change you made was to the nib / xib file in Interface builder, specifically in binding a value to a button / control. Check the Inspector for all of your UI controls to make sure that any Button Bindings that are bound to Shared User Defaults Controller have controller key values, and not something else.

蓝色星空 2024-10-10 19:48:00

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

@synthesize window;

在我的视图控制器中。

This happened to me because I forgot @synthesize.

@synthesize window;

In my view controller.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文