I can't seem to figure out this Thread 1: signal SIGABRT error. My app stops at the launch screen with only the title displayed. I've checked to see if there are any rogue outlets as mentioned in other solutions but it seems fine. Here is the log:
2016-06-14 12:50:22.760 Flight4[92201:6597548] Unknown class MainViewController in Interface Builder file.
2016-06-14 12:50:22.777 Flight4[92201:6597548] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7f91c0694330> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tableView.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ccb2c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010e81dbb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010ccb28a9 -[NSException raise] + 9
3 Foundation 0x000000010d0d0b53 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x000000010cbfad50 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x000000010d8294eb -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x000000010d6816d8 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
7 UIKit 0x000000010d681cc8 -[UIViewController loadView] + 109
8 UIKit 0x000000010d681f39 -[UIViewController loadViewIfRequired] + 75
9 UIKit 0x000000010d6823ce -[UIViewController view] + 27
10 UIKit 0x000000010d59d289 -[UIWindow addRootViewControllerViewIfPossible] + 58
11 UIKit 0x000000010d59d64f -[UIWindow _setHidden:forced:] + 247
12 UIKit 0x000000010d5a9de1 -[UIWindow makeKeyAndVisible] + 42
13 UIKit 0x000000010d54d417 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2732
14 UIKit 0x000000010d55019e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1349
15 UIKit 0x000000010d54f095 -[UIApplication workspaceDidEndTransaction:] + 179
16 FrontBoardServices 0x0000000112ef65e5 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 21
17 CoreFoundation 0x000000010cbe641c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
18 CoreFoundation 0x000000010cbdc165 __CFRunLoopDoBlocks + 341
19 CoreFoundation 0x000000010cbdbf25 __CFRunLoopRun + 2389
20 CoreFoundation 0x000000010cbdb366 CFRunLoopRunSpecific + 470
21 UIKit 0x000000010d54eb02 -[UIApplication _run] + 413
22 UIKit 0x000000010d5518c0 UIApplicationMain + 1282
23 Flight4 0x000000010ca2bc87 main + 135
24 libdyld.dylib 0x000000010f51d145 start + 1
25 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
The first line says "Unknown class MainViewController in Interface Builder file." but the class is linked to a view controller on the main storyboard and does not contain any errors. Could the error be related to this file? If so, I'm not sure how else to proceed. Thanks!
So I found a solution for this problem. I went to the Identity Inspector for MainViewController and under Custom Class, I set the Module which was previously undefined (see photo).
However, now I have a new error:
*** Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'Must translate autoresizing mask into constraints to have _setHostsLayoutEngine:YES.'
in regards to my cell. I have attached a picture of the view hierarchy.
Related
This question already has answers here:
Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?
(79 answers)
Closed 7 years ago.
Everytime I create an outlet for a UITextField it breaks my app. No build errors just termination at boot.
"2015-11-27 17:34:19.005 ticTacToe[3540:71629] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x7fbb82682450> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key wins.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010d8b0c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010c003bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010d8b08a9 -[NSException raise] + 9
3 Foundation 0x000000010bb99b53 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x000000010d7f8d50 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x000000010c51d4eb -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x000000010c3756d8 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
7 UIKit 0x000000010c375cc8 -[UIViewController loadView] + 109
8 UIKit 0x000000010c375f39 -[UIViewController loadViewIfRequired] + 75
9 UIKit 0x000000010c3763ce -[UIViewController view] + 27
10 UIKit 0x000000010c291289 -[UIWindow addRootViewControllerViewIfPossible] + 58
11 UIKit 0x000000010c29164f -[UIWindow _setHidden:forced:] + 247
12 UIKit 0x000000010c29dde1 -[UIWindow makeKeyAndVisible] + 42
13 UIKit 0x000000010c241417 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2732
14 UIKit 0x000000010c24419e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1349
15 UIKit 0x000000010c243095 -[UIApplication workspaceDidEndTransaction:] + 179
16 FrontBoardServices 0x0000000111bc95e5 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 21
17 CoreFoundation 0x000000010d7e441c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
18 CoreFoundation 0x000000010d7da165 __CFRunLoopDoBlocks + 341
19 CoreFoundation 0x000000010d7d9f25 __CFRunLoopRun + 2389
20 CoreFoundation 0x000000010d7d9366 CFRunLoopRunSpecific + 470
21 UIKit 0x000000010c242b02 -[UIApplication _run] + 413
22 UIKit 0x000000010c2458c0 UIApplicationMain + 1282
23 ticTacToe 0x000000010b6f386f main + 111
24 libdyld.dylib 0x000000010eaac145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException"
If possible please explain fix visually as I am programming retarded :-)
Further to Hayden's answer - you can easily check to see if any IBOutlets which you think should be connected to your View Controller are actually not connected by looking at the margin in Xcode (as below). Each IBOutlet will display a filled in circle showing you that it's connected to an element on the storyboard.
If the circle is empty it's not connected which can cause a crash...
Hi I am making an app and want to use a button to switch from one view controller to another view controller. I used a modal segue and made a UIbutton action calling performSegueWithIdentifier. However, I got
Terminating with uncaught exception of type NSException
error in AppleDelegate file. I have no idea what's going on here. PLease help me! THanks a lot.
Here is what the program explains:
2015-11-20 01:22:21.575 Photo book[17126:547637] Unknown class ViewController1 in Interface Builder file.
2015-11-20 01:22:21.581 Photo book[17126:547637] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7f9698e1d2b0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Open.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000103d7fc65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000103a18bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000103d7f8a9 -[NSException raise] + 9
3 Foundation 0x00000001035aeb53 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x0000000103cc7d50 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x000000010469252b -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x00000001048f4aba -[UIStoryboard instantiateViewControllerWithIdentifier:] + 181
7 UIKit 0x00000001048f80bf -[UIStoryboardSegueTemplate _perform:] + 71
8 UIKit 0x0000000111251638 -[UIViewControllerAccessibility performSegueWithIdentifier:sender:] + 39
9 Photo book 0x0000000103479c66 _TFC10Photo_book14ViewController5LoginfS0_FCSo8UIButtonT_ + 278
10 Photo book 0x0000000103479cea _TToFC10Photo_book14ViewController5LoginfS0_FCSo8UIButtonT_ + 58
11 UIKit 0x00000001043bbda2 -[UIApplication sendAction:to:from:forEvent:] + 75
12 UIKit 0x00000001044cd54a -[UIControl _sendActionsForEvents:withEvent:] + 467
13 UIKit 0x00000001044cc919 -[UIControl touchesEnded:withEvent:] + 522
14 UIKit 0x0000000104408998 -[UIWindow _sendTouchesForEvent:] + 735
15 UIKit 0x00000001044092c2 -[UIWindow sendEvent:] + 682
16 UIKit 0x00000001043cf581 -[UIApplication sendEvent:] + 246
17 UIKit 0x00000001043dcd1c _UIApplicationHandleEventFromQueueEvent + 18265
18 UIKit 0x00000001043b75dc _UIApplicationHandleEventQueue + 2066
19 CoreFoundation 0x0000000103cb3431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
20 CoreFoundation 0x0000000103ca92fd __CFRunLoopDoSources0 + 269
21 CoreFoundation 0x0000000103ca8934 __CFRunLoopRun + 868
22 CoreFoundation 0x0000000103ca8366 CFRunLoopRunSpecific + 470
23 GraphicsServices 0x00000001085cda3e GSEventRunModal + 161
24 UIKit 0x00000001043ba900 UIApplicationMain + 1282
25 Photo book 0x000000010348b1c7 main + 135
26 libdyld.dylib 0x0000000106965145 start + 1
27 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
this error occurs when you accidently delete iboutlet from your .h file but they are still connected in your xib or storyboard.. make sure that all your iboutlets are connected properly in your second view.
First set you class name as following
Then set segue identifier
And check weather if you have deleted any IBOutlet accidentally or you have change name of controls programatically then respective outlet not found.
I am new to coding and Xcode. The problem I am facing with is stated in the title. I hope anyone can help me out of it.
The error message will be pasted at below
2015-07-13 01:11:36.443 Main_Iphone 6[2570:94488] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Main_Iphone_6.ViewController 0x7fccc8432560> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Button.'
First throw call stack:
(
0 CoreFoundation 0x0000000100c02c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010276dbb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000100c028a9 -[NSException raise] + 9
3 Foundation 0x0000000101020b53 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x0000000100b4ad50 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x00000001017794eb -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x00000001015d16d8 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
7 UIKit 0x00000001015d1cc8 -[UIViewController loadView] + 109
8 UIKit 0x00000001015d1f39 -[UIViewController loadViewIfRequired] + 75
9 UIKit 0x00000001015d23ce -[UIViewController view] + 27
10 UIKit 0x00000001014ed289 -[UIWindow addRootViewControllerViewIfPossible] + 58
11 UIKit 0x00000001014ed64f -[UIWindow _setHidden:forced:] + 247
12 UIKit 0x00000001014f9de1 -[UIWindow makeKeyAndVisible] + 42
13 UIKit 0x000000010149d417 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2732
14 UIKit 0x00000001014a019e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1349
15 UIKit 0x000000010149f095 -[UIApplication workspaceDidEndTransaction:] + 179
16 FrontBoardServices 0x000000010426a5e5 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 21
17 CoreFoundation 0x0000000100b3641c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
18 CoreFoundation 0x0000000100b2c165 __CFRunLoopDoBlocks + 341
19 CoreFoundation 0x0000000100b2bf25 __CFRunLoopRun + 2389
20 CoreFoundation 0x0000000100b2b366 CFRunLoopRunSpecific + 470
21 UIKit 0x000000010149eb02 -[UIApplication _run] + 413
22 UIKit 0x00000001014a18c0 UIApplicationMain + 1282
23 Main_Iphone 6 0x0000000100a101d7 main + 135
24 libdyld.dylib 0x0000000102ea3145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
You've got an outlet called Button defined in a storyboard or xib file, but the thing you're connecting it to doesn't have a property of the same name. Either you've deleted an IBOutlet from code or you've not set the correct view controller class in the identity inspector in interface builder.
The most important information is this class is not key value coding-compliant for the key Button.
From the backtrace you can see, that after an UINib is instantiated
[UINib instantiateWithOwner:options:]
there is a method sent to all objects of an array
[NSArray makeObjectsPerformSelector:]
to set the value of a property Button
[NSObject(NSKeyValueCoding) setValue:forKey:]
This property must be synthesized or have explicit setter and getter to be key value coding-compliant.
Set an Exception Breakpoint to find the exact location of the crash and look into your model classes for a missing property Button
downloaded here this parser launched, it works, but when I want to change main interface (the default setting is MainWindow.xib, and I want to put my xib), shows the following error. I wish that I was a structure MyNewXib.xib - MainWindow.xib - RootViewController.xib, but when I add in MainInterface MyNewXib.xib get this error, how do I fix it.
2015-03-23 11:27:02.686 TetraVer 1.1[411:5899] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x7fa352c30c10> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000110e1ba75 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010fad9bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000110e1b6b9 -[NSException raise] + 9
3 Foundation 0x000000010f42fd43 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x0000000110d655e0 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x000000010e3f54ed -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x000000010e3f6f92 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 160
7 UIKit 0x000000010e12dc71 -[UIApplication _loadMainNibFileNamed:bundle:] + 46
8 UIKit 0x000000010e12cd2b -[UIApplication _runWithMainScene:transitionContext:completion:] + 1074
9 UIKit 0x000000010e12bd35 -[UIApplication workspaceDidEndTransaction:] + 179
10 FrontBoardServices 0x000000010fe84243 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
11 CoreFoundation 0x0000000110d50c7c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
12 CoreFoundation 0x0000000110d469c5 __CFRunLoopDoBlocks + 341
13 CoreFoundation 0x0000000110d46785 __CFRunLoopRun + 2389
14 CoreFoundation 0x0000000110d45bc6 CFRunLoopRunSpecific + 470
15 UIKit 0x000000010e12b7a2 -[UIApplication _run] + 413
16 UIKit 0x000000010e12e580 UIApplicationMain + 1282
17 TetraVer 1.1 0x000000010e06c6f4 main + 68
18 libdyld.dylib 0x0000000114c7d145 start + 1
19 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Make sure you have the elements linked correctly with interface and definition (check the outlet for you xib elements). This error comes usually when you have one ore more element in xib witch definition (#property) was deleted.
Does anyone have any ideas, this is killing me. Create an app from a Single View Application template, delete the storyboard and ViewController.swift file and then add a new view controller called MainViewController with a Xib.
Change the project settings for Main Interface from Main to MainViewController and run.
In previous versions of Xcode this would have worked fine. Now no matter what I try I cannot get this to work. Tried initialising the View Controller in the App Delegate but no joy, it just crashes with this exception:
2014-11-22 11:14:48.084 TestApp[9781:422842] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x7fd510611320> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001025c9f35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010410dbb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001025c9b79 -[NSException raise] + 9
3 Foundation 0x00000001029e17b3 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x0000000102513e80 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x000000010311ac7d -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x000000010311c722 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 160
7 UIKit 0x0000000102e54b11 -[UIApplication _loadMainNibFileNamed:bundle:] + 46
8 UIKit 0x0000000102e53c19 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1075
9 UIKit 0x0000000102e52bf2 -[UIApplication workspaceDidEndTransaction:] + 179
10 FrontBoardServices 0x0000000105cad2a3 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
11 CoreFoundation 0x00000001024ff53c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
12 CoreFoundation 0x00000001024f5285 __CFRunLoopDoBlocks + 341
13 CoreFoundation 0x00000001024f5045 __CFRunLoopRun + 2389
14 CoreFoundation 0x00000001024f4486 CFRunLoopRunSpecific + 470
15 UIKit 0x0000000102e52669 -[UIApplication _run] + 413
16 UIKit 0x0000000102e55420 UIApplicationMain + 1282
17 TestApp 0x00000001023e9cae top_level_code + 78
18 TestApp 0x00000001023e9cea main + 42
19 libdyld.dylib 0x00000001048e7145 start + 1
20 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
You need to provide a xib or storyboard file for the Main Interface. Not a ViewController.
Also make sure you don't have any dangling outlets. Make sure that the objects in the xib don't have an outlet set which does not exist in your ViewController.h or ViewController.m