主题 1:信号 SIGABRT 有人可以帮助我吗? [英] Thread 1: signal SIGABRT Can someone help me?
问题描述
运行应用程序后,我在 AppDelegate.h 中收到此错误消息.线程 1:信号 SIGABRT" 我已经评论了我的代码一侧发生错误的地方.任何人都可以请帮忙.谢谢.
#import #import "AppDelegate.h"int main(int argc, char * argv[]){@autoreleasepool {返回 UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));//线程1:信号SIGABRT}}
这是我得到的堆栈跟踪:
2014-03-29 17:27:56.440 Game[3599:70b] *** 由于未捕获的异常NSUnknownKeyException"而终止应用程序,原因:[setValue:forUndefinedKey:]: 此类不是键视图的键值编码兼容.*** 首先抛出调用堆栈:(0 核心基金会 0x0000000101c1b795 __exceptionPreprocess + 1651 libobjc.A.dylib 0x0000000101725991 objc_exception_throw + 432 CoreFoundation 0x0000000101c9fe69 -[NSException raise] + 93 基础 0x000000010130703a -[NSObject(NSKeyValueCoding) setValue:forKey:] + 2594 CoreFoundation 0x0000000101c17700 -[NSArray makeObjectsPerformSelector:] + 2245 UIKit 0x00000001005d11b8 -[UINib instantiateWithOwner:options:] + 11316 UIKit 0x00000001005d2bb2 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 1387 UIKit 0x000000010038781d -[UIApplication _loadMainNibFileNamed:bundle:] + 428 UIKit 0x0000000100386b1a -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 4549 UIKit 0x0000000100397aab -[UIApplication handleEvent:withNewEvent:] + 309210 UIKit 0x0000000100397f1e -[UIApplication sendEvent:] + 7911 UIKit 0x00000001003882be _UIApplicationHandleEvent + 61812 图形服务 0x0000000104977bb6 _PurpleEventCallback + 76213 图形服务 0x000000010497767d PurpleEventCallback + 3514 核心基金会 0x0000000101b9d819 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 4115 核心基金会 0x0000000101b9d5ee __CFRunLoopDoSource1 + 47816 核心基金会 0x0000000101bc6ab3 __CFRunLoopRun + 193917 核心基金会 0x0000000101bc5f33 CFRunLoopRunSpecific + 46718 UIKit 0x00000001003864bd -[UIApplication _run] + 60919 UIKit 0x0000000100388043 UIApplicationMain + 101020 游戏 0x0000000100000f33 主 + 11521 libdyld.dylib 0x00000001032755fd 开始 + 1)libc++abi.dylib:以未捕获的 NSException 类型异常终止
Game[3599:70b] *** 由于未捕获的异常NSUnknownKeyException"而终止应用程序,原因:[<UIApplication 0x109c28520>setValue:forUndefinedKey:]: 此类不是键视图的键值编码兼容.
上面这行表示您正在尝试访问名为 view 的属性,但您的类没有该名称的属性.要么您在实际上没有视图的对象上调用视图属性(但这更有可能被编译器捕获),要么您没有在 Interface Builder 中为您的视图控制器设置视图出口.>
检查您在 App Delegate 中加载的视图控制器是否已在 IB 中连接了视图插座.
I am getting this error message in my AppDelegate.h after I run my application. "Thread 1: signal SIGABRT" I have commented where the error is occurring to the side of my code. Can anybody help please. Thanks.
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); //Thread 1: signal SIGABRT
}
}
Here is the stack trace I'm getting:
2014-03-29 17:27:56.440 Game[3599:70b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x109c28520> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000101c1b795 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000101725991 objc_exception_throw + 43
2 CoreFoundation 0x0000000101c9fe69 -[NSException raise] + 9
3 Foundation 0x000000010130703a -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x0000000101c17700 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x00000001005d11b8 -[UINib instantiateWithOwner:options:] + 1131
6 UIKit 0x00000001005d2bb2 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 138
7 UIKit 0x000000010038781d -[UIApplication _loadMainNibFileNamed:bundle:] + 42
8 UIKit 0x0000000100386b1a -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 454
9 UIKit 0x0000000100397aab -[UIApplication handleEvent:withNewEvent:] + 3092
10 UIKit 0x0000000100397f1e -[UIApplication sendEvent:] + 79
11 UIKit 0x00000001003882be _UIApplicationHandleEvent + 618
12 GraphicsServices 0x0000000104977bb6 _PurpleEventCallback + 762
13 GraphicsServices 0x000000010497767d PurpleEventCallback + 35
14 CoreFoundation 0x0000000101b9d819 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
15 CoreFoundation 0x0000000101b9d5ee __CFRunLoopDoSource1 + 478
16 CoreFoundation 0x0000000101bc6ab3 __CFRunLoopRun + 1939
17 CoreFoundation 0x0000000101bc5f33 CFRunLoopRunSpecific + 467
18 UIKit 0x00000001003864bd -[UIApplication _run] + 609
19 UIKit 0x0000000100388043 UIApplicationMain + 1010
20 Game 0x0000000100000f33 main + 115
21 libdyld.dylib 0x00000001032755fd start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Game[3599:70b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x109c28520> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
The above line means that you have are trying to access a property called view, but your class doesn't have a property of that name. Either you are calling view property on an object that doesn't actually have a view (but this is more likely to be caught by the compiler), or you haven't set the view outlet for your view controller in Interface Builder.
Check that the view controller you are loading in your App Delegate has the view outlet connected in IB.
这篇关于主题 1:信号 SIGABRT 有人可以帮助我吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!