线程1信号sigabrt运行应用程序时出错?
问题描述:
我的应用程序显示没有错误,但是当我运行我的应用程序时,它冻结并显示THREAD 1 SIGNAL SIGABRT,以'return'开头。我正在使用Xcode 5.另外,如果我更新Xcode到Xcode 6,这将修复错误?线程1信号sigabrt运行应用程序时出错?
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
调试器显示:
2014-10-18 09:43:14.726 2 Player Pong[448:60b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Game 0x8d24a50> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key ButtonMove.'
*** First throw call stack:
(
0 CoreFoundation 0x017ef1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x0156e8e5 objc_exception_throw + 44
2 CoreFoundation 0x0187efe1 -[NSException raise] + 17
3 Foundation 0x0122ed9e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x0119b1d7 _NSSetUsingKeyValueSetter + 88
5 Foundation 0x0119a731 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x011fcb0a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x004e51f4 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x015807de -[NSObject performSelector:] + 62
9 CoreFoundation 0x017ea76a -[NSArray makeObjectsPerformSelector:] + 314
10 UIKit 0x004e3d4d -[UINib instantiateWithOwner:options:] + 1417
11 UIKit 0x0034c6f5 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
12 UIKit 0x0034ce9d -[UIViewController loadView] + 302
13 UIKit 0x0034d0d3 -[UIViewController loadViewIfRequired] + 78
14 UIKit 0x0034d5d9 -[UIViewController view] + 35
15 UIKit 0x0035cf89 -[UIViewController shouldAutorotate] + 36
16 UIKit 0x0035d2d1 -[UIViewController _preferredInterfaceOrientationForPresentationInWindow:fromInterfaceOrientation:] + 297
17 UIKit 0x005fb3d5 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:animation:] + 2330
18 UIKit 0x003595d5 -[UIViewController presentViewController:withTransition:completion:] + 6538
19 UIKit 0x00359aef -[UIViewController presentViewController:animated:completion:] + 130
20 UIKit 0x00359b2f -[UIViewController presentModalViewController:animated:] + 56
21 UIKit 0x007a3e00 -[UIStoryboardModalSegue perform] + 271
22 UIKit 0x00792f0c -[UIStoryboardSegueTemplate _perform:] + 174
23 UIKit 0x00792f87 -[UIStoryboardSegueTemplate perform:] + 115
24 libobjc.A.dylib 0x01580880 -[NSObject performSelector:withObject:withObject:] + 77
25 UIKit 0x002303b9 -[UIApplication sendAction:to:from:forEvent:] + 108
26 UIKit 0x00230345 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
27 UIKit 0x00331bd1 -[UIControl sendAction:to:forEvent:] + 66
28 UIKit 0x00331fc6 -[UIControl _sendActionsForEvents:withEvent:] + 577
29 UIKit 0x00331243 -[UIControl touchesEnded:withEvent:] + 641
30 UIKit 0x0026fddd -[UIWindow _sendTouchesForEvent:] + 852
31 UIKit 0x002709d1 -[UIWindow sendEvent:] + 1117
32 UIKit 0x002425f2 -[UIApplication sendEvent:] + 242
33 UIKit 0x0022c353 _UIApplicationHandleEventQueue + 11455
34 CoreFoundation 0x0177877f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
35 CoreFoundation 0x0177810b __CFRunLoopDoSources0 + 235
36 CoreFoundation 0x017951ae __CFRunLoopRun + 910
37 CoreFoundation 0x017949d3 CFRunLoopRunSpecific + 467
38 CoreFoundation 0x017947eb CFRunLoopRunInMode + 123
39 GraphicsServices 0x037e35ee GSEventRunModal + 192
40 GraphicsServices 0x037e342b GSEventRun + 104
41 UIKit 0x0022ef9b UIApplicationMain + 1225
42 2 Player Pong 0x0000317d main + 141
43 libdyld.dylib 0x01e36701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
答
ü没有指定在你的VC关键中的关键名字是ButtonMove,去你的属性检查器中删除无效的关键ButtonMove终于干净运行该项目
答
可能首先,一个插座引用了一个已被删除的控件,其次检查属性检查器中的任何错误键/值
祝你愉快的一天兄弟 – 2014-10-18 09:13:56
在你的xib或storyboard中创建了ButtonMove(作为标签,buton,textfiled ..),但是你的未使用意味着被删除不正确,只是按照我的回答,它会解决你的问题 – 2014-10-19 11:26:55
确定我的兄弟我的电子邮件ID是[email protected] – 2014-10-21 15:12:16