如何在Xcode5.0.2中解决此错误代码?线程1信号:SIGABRT错误

时间:2014-03-03 07:34:22

标签: ios objective-c xcode multithreading memory

我最近升级了一个我创建iOS 7的应用程序。然后我尝试运行该应用程序,并且构建说它成功了,但应用程序崩溃并指示我使用此代码并显示错误消息:

2014-03-03 14:40:24.686 BluetusRece[2112:a0b] 
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason:
'[<UIApplication 0xa06ad00> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key label_1.'
*** First throw call stack:
(
0   CoreFoundation                      0x01bdc5e4 __exceptionPreprocess + 180
1   libobjc.A.dylib                     0x014ef8b6 objc_exception_throw + 44
2   CoreFoundation                      0x01c6c6a1 -[NSException raise] + 17
3   Foundation                          0x000f49ee -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4   Foundation                          0x00060cfb _NSSetUsingKeyValueSetter + 88
5   Foundation                          0x00060253 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6   Foundation                          0x000c270a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7   UIKit                               0x00717a15 -[UIRuntimeOutletConnection connect] + 106
8   libobjc.A.dylib                     0x015017d2 -[NSObject performSelector:] + 62
9   CoreFoundation                      0x01bd7b6a -[NSArray makeObjectsPerformSelector:] + 314
10  UIKit                               0x0071656e -[UINib instantiateWithOwner:options:] + 1417
11  UIKit                               0x007182fb -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 165
12  UIKit                               0x004753bb -[UIApplication _loadMainNibFileNamed:bundle:] + 58
13  UIKit                               0x004756e9 -[UIApplication _loadMainInterfaceFile] + 245
14  UIKit                               0x0047428f -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 543
15  UIKit                               0x0048887c -[UIApplication handleEvent:withNewEvent:] + 3447
16  UIKit                               0x00488de9 -[UIApplication sendEvent:] + 85
17  UIKit                               0x00476025 _UIApplicationHandleEvent + 736
18  GraphicsServices                    0x02a242f6 _PurpleEventCallback + 776
19  GraphicsServices                    0x02a23e01 PurpleEventCallback + 46
20  CoreFoundation                      0x01b57d65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
21  CoreFoundation                      0x01b57a9b __CFRunLoopDoSource1 + 523
22  CoreFoundation                      0x01b8277c __CFRunLoopRun + 2156
23  CoreFoundation                      0x01b81ac3 CFRunLoopRunSpecific + 467
24  CoreFoundation                      0x01b818db CFRunLoopRunInMode + 123
25  UIKit                               0x00473add -[UIApplication _run] + 840
26  UIKit                               0x00475d3b UIApplicationMain + 1225
27  BluetusRece                         0x00003802 main + 130
28  libdyld.dylib                       0x02712725 start + 0
)
 libc++abi.dylib: terminating with uncaught exception of type NSException
 (lldb) 

2 个答案:

答案 0 :(得分:0)

如果您已连接的Interface Builder对象在其所有者来源

中被删除/重命名,则会发现此错误

查看此链接

What does this mean? "'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X"

答案 1 :(得分:0)

看起来你的启动视图控制器没有一个名为IBOutlet的{​​{1}}属性,某些label_1正试图从你的NIB或Storyboard文件连接到该属性。

请打开您的NIB或Storyboard,在启动视图控制器中查找与UILabel UILabel属性相关联的label_1,然后删除该连接或将以下属性添加到您的初始查看控制器的头文件:

IBOutlet

此行将添加缺失的@property (nonatomic, weak) IBOutlet UILabel *label_1; ,让您通过此次崩溃。