Xcode未能编译";线程1:信号SIGABRT“;

Xcode未能编译";线程1:信号SIGABRT“;,xcode,macos,osx-lion,osx-snow-leopard,sigabrt,Xcode,Macos,Osx Lion,Osx Snow Leopard,Sigabrt,在第一次编译之后,Xcode从线程1发出了一个关于SIGABRT的错误。错误日志显示了以下内容: 2012-11-18 20:26:37.866 Test app[26222:8a03] Unknown class 'AppDelegate', using 'NSObject' instead. Encountered in Interface Builder file at path /Users/tommiller/Library/Developer/Xcode/DerivedData/Te

在第一次编译之后,Xcode从线程1发出了一个关于SIGABRT的错误。错误日志显示了以下内容:

2012-11-18 20:26:37.866 Test app[26222:8a03] Unknown class 'AppDelegate', using 'NSObject' instead. Encountered in Interface Builder file at path /Users/tommiller/Library/Developer/Xcode/DerivedData/Test_app-gvobsrwxsylgvkamecrxetkkkorf/Build/Products/Debug/Test app.app/Contents/Resources/en.lproj/MainMenu.nib.
2012-11-18 20:26:37.908 Test app[26222:8a03] -[_NSControllerObjectProxy copyWithZone:]: unrecognized selector sent to instance 0x7fcfb8659660
2012-11-18 20:26:37.909 Test app[26222:8a03] An uncaught exception was raised
2012-11-18 20:26:37.909 Test app[26222:8a03] -[_NSControllerObjectProxy copyWithZone:]: unrecognized selector sent to instance 0x7fcfb8659660
2012-11-18 20:26:37.913 Test app[26222:8a03] (
    0   CoreFoundation                      0x000000010e42dfc6 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x000000010e29bd5e objc_exception_throw + 43
    2   CoreFoundation                      0x000000010e4ba2ae -[NSObject doesNotRecognizeSelector:] + 190
    3   CoreFoundation                      0x000000010e41ae73 ___forwarding___ + 371
    4   CoreFoundation                      0x000000010e41ac88 _CF_forwarding_prep_0 + 232
    5   AppKit                              0x000000010eef3178 -[NSCell _setContents:] + 73
    6   AppKit                              0x000000010eef3055 -[NSCell setObjectValue:] + 160
    7   AppKit                              0x000000010f115adc -[_NSPlaceholderTextFieldPlugin showValue:inObject:] + 388
    8   AppKit                              0x000000010f0fdf31 -[NSValueBinder _adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState:] + 809
    9   AppKit                              0x000000010f0fdb74 -[NSValueBinder _observeValueForKeyPath:ofObject:context:] + 303
    10  AppKit                              0x000000010f1158cf -[NSTextValueBinder _observeValueForKeyPath:ofObject:context:] + 43
    11  AppKit                              0x000000010eeec777 -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] + 591
    12  AppKit                              0x000000010eee5a89 -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1079
    13  AppKit                              0x000000010eedc09f loadNib + 322
    14  AppKit                              0x000000010eedb59c +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217
    15  AppKit                              0x000000010eedb4b7 +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141
    16  AppKit                              0x000000010eedb3fa +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364
    17  AppKit                              0x000000010f14e9b3 NSApplicationMain + 398
    18  Test app                            0x000000010e22de12 main + 34
    19  Test app                            0x000000010e22dde4 start + 52
)
2012-11-18 20:26:37.972 Test app[26222:8a03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_NSControllerObjectProxy copyWithZone:]: unrecognized selector sent to instance 0x7fcfb8659660'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010e42dfc6 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x000000010e29bd5e objc_exception_throw + 43
    2   CoreFoundation                      0x000000010e4ba2ae -[NSObject doesNotRecognizeSelector:] + 190
    3   CoreFoundation                      0x000000010e41ae73 ___forwarding___ + 371
    4   CoreFoundation                      0x000000010e41ac88 _CF_forwarding_prep_0 + 232
    5   AppKit                              0x000000010eef3178 -[NSCell _setContents:] + 73
    6   AppKit                              0x000000010eef3055 -[NSCell setObjectValue:] + 160
    7   AppKit                              0x000000010f115adc -[_NSPlaceholderTextFieldPlugin showValue:inObject:] + 388
    8   AppKit                              0x000000010f0fdf31 -[NSValueBinder _adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState:] + 809
    9   AppKit                              0x000000010f0fdb74 -[NSValueBinder _observeValueForKeyPath:ofObject:context:] + 303
    10  AppKit                              0x000000010f1158cf -[NSTextValueBinder _observeValueForKeyPath:ofObject:context:] + 43
    11  AppKit                              0x000000010eeec777 -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] + 591
    12  AppKit                              0x000000010eee5a89 -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1079
    13  AppKit                              0x000000010eedc09f loadNib + 322
    14  AppKit                              0x000000010eedb59c +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217
    15  AppKit                              0x000000010eedb4b7 +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141
    16  AppKit                              0x000000010eedb3fa +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364
    17  AppKit                              0x000000010f14e9b3 NSApplicationMain + 398
    18  Test app                            0x000000010e22de12 main + 34
    19  Test app                            0x000000010e22dde4 start + 52
)
terminate called throwing an exception(lldb) 
信号来自
返回NSApplicationMain(argc,(const char**)argv)内部main.m

#import <Cocoa/Cocoa.h>

int main(int argc, char *argv[])
{
    return NSApplicationMain(argc, (const char **)argv);
}
#导入
int main(int argc,char*argv[])
{
返回NSApplicationMain(argc,(const char**)argv);
}

我很少记录这些错误,所以我不知道错误指向什么。我最好的猜测是
14 AppKit 0x000000010eedb59c+[NSBundle(NSNibLoading)\u loadNibFile:nameTable:withZone:ownerBundle:+217
没有加载XIB如何解决此问题?

如果查看初始错误:

Unknown class 'AppDelegate', using 'NSObject' instead. Encountered in Interface Builder file
它告诉您,在代码中的某个地方,您试图调用假定为AppDelegate的对象上的消息选择器,但事实并非如此。错误是在加载MainMenu.nib时发生的


因此,这可能不是您的代码,而是您的主菜单视图如何连接到项目中。您想打开MainMenu XIB文件,检查代理是否连接到应用程序。

如果查看初始错误:

Unknown class 'AppDelegate', using 'NSObject' instead. Encountered in Interface Builder file
它告诉您,在代码中的某个地方,您试图调用假定为AppDelegate的对象上的消息选择器,但事实并非如此。错误是在加载MainMenu.nib时发生的


因此,这可能不是您的代码,而是您的主菜单视图如何连接到项目中。您想打开MainMenu XIB文件,检查代理是否连接到应用程序。

一些调试建议:在Objective-C异常上设置一个断点,并在用于运行此操作的方案中启用僵尸。这些步骤可能会提供更好的错误消息。我认为您对xib文件的某些奇怪之处是正确的,但还不清楚是什么(可能是绑定到文本字段?)。我在main.m中的错误点上做了一个断点,得到了0x109deade4:movl%eax,%1两个调试建议:在Objective-C异常上设置断点,并在用于运行此异常的方案中启用僵尸。这些步骤可能会提供更好的错误消息。我认为您对xib文件的某些奇怪之处是正确的,但还不清楚是什么(可能是绑定到文本字段?)。我在main.m中的错误点上做了一个断点,得到了以下结果:0x109deade4:movl%eax,%edi在IB中,我在哪里可以查看它?右键单击文件所有者,然后查看代理的出口。它指向AppDelegate。我让它工作了。我所做的只是重新制作了XIB文件。奇怪!但我收到一条消息说“用于打开持久存储的托管对象模型版本与用于创建持久存储的版本不兼容。”编译完成后,应用程序似乎正常工作。我相信这是在我的代码中…在IB中我应该在哪里查看它?右键单击文件所有者,然后查看代理的出口。它指向AppDelegate。我让它工作了。我所做的只是重新制作了XIB文件。奇怪!但我收到一条消息说“用于打开持久存储的托管对象模型版本与用于创建持久存储的版本不兼容。”编译完成后,应用程序似乎正常工作。我相信在我的代码里。。。