Xcode中的奇怪内存错误

时间:2011-03-08 09:10:38

标签: xcode

我在Xcode中遇到了一些奇怪的内存错误;它从其他应用程序访问代码非常奇怪。

以下是代码:

[Session started at 2011-03-08 17:04:33 +0800.]
2011-03-08 17:04:59.438 Movie[5309:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "MovieViewController" nib but the view outlet was not set.'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x00daebe9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x00f035c2 objc_exception_throw + 47
    2   CoreFoundation                      0x00d67628 +[NSException raise:format:arguments:] + 136
    3   CoreFoundation                      0x00d6759a +[NSException raise:format:] + 58
    4   UIKit                               0x00367b75 -[UIViewController _loadViewFromNibNamed:bundle:] + 295
    5   UIKit                               0x00365709 -[UIViewController loadView] + 120
    6   UIKit                               0x003655e3 -[UIViewController view] + 56
    7   Movie                               0x00002466 -[MovieAppDelegate application:didFinishLaunchingWithOptions:] + 79
    8   UIKit                               0x002b81fa -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
    9   UIKit                               0x002ba55e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
    10  UIKit                               0x002c4db2 -[UIApplication handleEvent:withNewEvent:] + 1533
    11  UIKit                               0x002bd202 -[UIApplication sendEvent:] + 71
    12  UIKit                               0x002c2732 _UIApplicationHandleEvent + 7576
    13  GraphicsServices                    0x016e4a36 PurpleEventCallback + 1550
    14  CoreFoundation                      0x00d90064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    15  CoreFoundation                      0x00cf06f7 __CFRunLoopDoSource1 + 215
    16  CoreFoundation                      0x00ced983 __CFRunLoopRun + 979
    17  CoreFoundation                      0x00ced240 CFRunLoopRunSpecific + 208
    18  CoreFoundation                      0x00ced161 CFRunLoopRunInMode + 97
    19  UIKit                               0x002b9fa8 -[UIApplication _run] + 636
    20  UIKit                               0x002c642e UIApplicationMain + 1160
    21  Movie                               0x000023f4 main + 102
    22  Movie                               0x00002385 start + 53
)
terminate called after throwing an instance of 'NSException'

你能告诉我这意味着什么吗?

提前致谢!

1 个答案:

答案 0 :(得分:2)

用简单的英语说明问题是什么:“[UIViewController _loadViewFromNibNamed:bundle:]加载了”MovieViewController“笔尖,但未设置视图插座”。在Interface Builder中设置视图插座即可。