应用程序在加载时崩溃,并以NSException类型的未捕获异常终止

时间:2014-04-01 00:26:58

标签: ios objective-c xcode

我今晚一直在玩我的一个项目,现在我无法加载它。奇怪的是我有一个较旧的版本,甚至试图复制所有数据,但仍然没有加载。

我在NSLog进入的错误如下:

2014-04-01 01:24:53.513 Adult Game[47180:a0b] CUICatalog: Invalid asset name supplied: , or invalid scale factor: 2.000000
2014-04-01 01:24:53.515 Adult Game[47180:a0b] Could not load the "" image referenced from a nib in the bundle with identifier "DannyLinton.Adult-Game"
2014-04-01 01:24:53.519 Adult Game[47180:a0b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x8e35860> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key animate.'
*** First throw call stack:
(
    0   CoreFoundation                      0x0196f5e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x016f28b6 objc_exception_throw + 44
    2   CoreFoundation                      0x019ff6a1 -[NSException raise] + 17
    3   Foundation                          0x013b39ee -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
    4   Foundation                          0x0131fcfb _NSSetUsingKeyValueSetter + 88
    5   Foundation                          0x0131f253 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
    6   Foundation                          0x0138170a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
    7   UIKit                               0x00702a15 -[UIRuntimeOutletConnection connect] + 106
    8   libobjc.A.dylib                     0x017047d2 -[NSObject performSelector:] + 62
    9   CoreFoundation                      0x0196ab6a -[NSArray makeObjectsPerformSelector:] + 314
    10  UIKit                               0x0070156e -[UINib instantiateWithOwner:options:] + 1417
    11  UIKit                               0x00573605 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
    12  UIKit                               0x00573dad -[UIViewController loadView] + 302
    13  UIKit                               0x005740ae -[UIViewController loadViewIfRequired] + 78
    14  UIKit                               0x005745b4 -[UIViewController view] + 35
    15  UIKit                               0x0049c9fd -[UIWindow addRootViewControllerViewIfPossible] + 66
    16  UIKit                               0x0049cd97 -[UIWindow _setHidden:forced:] + 312
    17  UIKit                               0x0049d02d -[UIWindow _orderFrontWithoutMakingKey] + 49
    18  UIKit                               0x004a789a -[UIWindow makeKeyAndVisible] + 65
    19  UIKit                               0x0045acd0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1851
    20  UIKit                               0x0045f3a8 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
    21  UIKit                               0x0047387c -[UIApplication handleEvent:withNewEvent:] + 3447
    22  UIKit                               0x00473de9 -[UIApplication sendEvent:] + 85
    23  UIKit                               0x00461025 _UIApplicationHandleEvent + 736
    24  GraphicsServices                    0x031042f6 _PurpleEventCallback + 776
    25  GraphicsServices                    0x03103e01 PurpleEventCallback + 46
    26  CoreFoundation                      0x018ead65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
    27  CoreFoundation                      0x018eaa9b __CFRunLoopDoSource1 + 523
    28  CoreFoundation                      0x0191577c __CFRunLoopRun + 2156
    29  CoreFoundation                      0x01914ac3 CFRunLoopRunSpecific + 467
    30  CoreFoundation                      0x019148db CFRunLoopRunInMode + 123
    31  UIKit                               0x0045eadd -[UIApplication _run] + 840
    32  UIKit                               0x00460d3b UIApplicationMain + 1225
    33  Adult Game                          0x00007dad main + 141
    34  libdyld.dylib                       0x02df2725 start + 0
    35  ???                                 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:11)

你的StoryBoard或XIB文件中有一个名为&#34; animate&#34;的幻像连接。

  1. 打开StoryBoard / XIB文件
  2. 如果您使用的是StoryBoard,请选择AdultGame视图控制器
  3. 点击&#34;文件所有者&#34;沿着左边
  4. 选择&#34;查看&gt;公用事业&gt;显示Connections Inspector&#34;
  5. 您将看到&#34;奥特莱斯&#34;的列表。其中一个将被称为&#34; animate&#34;旁边有一个感叹号。点击小&#34; x&#34;删除它。