I am getting an error while running app with following exception.
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<FavoriteViewController 0x158d30> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key customCell.'
*** Call stack at first throw:
(
0 CoreFoundation 0x314d0987 __exceptionPreprocess + 114
1 libobjc.A.dylib 0x319a149d objc_exception_throw + 24
2 CoreFoundation 0x314d0705 -[NSException dealloc] + 0
3 Foundation 0x31d28b4f -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 182
4 Foundation 0x31d2803b _NSSetUsingKeyValueSetter + 90
5 Foundation 0x31d29da3 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 194
6 Foundation 0x31cdbb17 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 130
7 UIKit 0x33a8860f -[UIRuntimeOutletConnection connect] + 66
8 CoreFoundation 0x31473fc7 -[NSObject(NSObject) performSelector:] + 18
9 CoreFoundation 0x3147cd51 -[NSArray makeObjectsPerformSelector:] + 388
10 UIKit 0x33a87577 -[UINib instantiateWithOwner:options:] + 586
11 UIKit 0x33a88b39 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 92
12 Fridge 0x0001ab11 -[FavoriteViewController tableView:cellForRowAtIndexPath:] + 192
13 UIKit 0x33907a21 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 516
14 UIKit 0x339077f3 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 34
15 UIKit 0x33905d2d -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 936
16 UIKit 0x33904edd -[UITableView layoutSubviews] + 140
17 UIKit 0x338b10cf -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 26
18 CoreFoundation 0x3146ebbf -[NSObject(NSObject) performSelector:withObject:] + 22
19 QuartzCore 0x30a6c685 -[CALayer layoutSublayers] + 120
20 QuartzCore 0x30a6c43d CALayerLayoutIfNeeded + 184
21 QuartzCore 0x30a6656d _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 212
22 QuartzCore 0x30a66383 _ZN2CA11Transaction6commitEv + 190
23 QuartzCore 0x30a89f9d _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 52
24 CoreFoundation 0x31460c59 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 16
25 CoreFoundation 0x31460acd __CFRunLoopDoObservers + 412
26 CoreFoundation 0x314580cb __CFRunLoopRun + 854
27 CoreFoundation 0x31457c87 CFRunLoopRunSpecific + 230
28 CoreFoundation 0x31457b8f CFRunLoopRunInMode + 58
29 GraphicsServices 0x35d664ab GSEventRunModal + 114
30 GraphicsServices 0x35d66557 GSEventRun + 62
31 UIKit 0x338d5329 -[UIApplication _run] + 412
32 UIKit 0x338d2e93 UIApplicationMain + 670
33 Fridge 0x00002d77 main + 70
34 Fridge 0x00002d2c start + 40
)
The error message: Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key customCell.'
... means that your xib is referencing an IBOutlet named "customCell" but your view controller doesn't have that IBOutlet anymore. You either need to remove the customCell reference from your xib or add an IBOutlet property to your view controller named "customCell".
Related
Could anyone help me understand why Im getting this error? It seems to be happening when I load one of my view controllers but I can't see why.
What usually causes an error like this?
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITextInputTraits length]: unrecognized selector sent to instance 0x7fbf924828a0'
*** First throw call stack:
(
0 CoreFoundation 0x000000010664ac65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000105f27bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001066520ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001065a813c ___forwarding___ + 988
4 CoreFoundation 0x00000001065a7cd8 _CF_forwarding_prep_0 + 120
5 libswiftCore.dylib 0x0000000107ddf728 _TTSf4g_d___TFSSCfMSSFT12_cocoaStringPSs9AnyObject__SS + 120
6 libswiftCore.dylib 0x0000000107dc01a3 _TFSSCfMSSFT12_cocoaStringPSs9AnyObject__SS + 19
7 Project1 0x00000001054ec3bd _TToFC8ASA_Rank22SettingsViewControllers9ASANumberSS + 61
8 Foundation 0x0000000105abdb53 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
9 CoreFoundation 0x0000000106592d50 -[NSArray makeObjectsPerformSelector:] + 224
10 UIKit 0x0000000106d1b4eb -[UINib instantiateWithOwner:options:] + 1506
11 UIKit 0x0000000106b736d8 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
12 UIKit 0x0000000106b73cc8 -[UIViewController loadView] + 109
13 UIKit 0x0000000106b73f39 -[UIViewController loadViewIfRequired] + 75
14 UIKit 0x0000000106b743ce -[UIViewController view] + 27
15 UIKit 0x000000010710132d -[_UIFullscreenPresentationController _setPresentedViewController:] + 65
16 UIKit 0x0000000106b4ed69 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 105
17 UIKit 0x0000000106b80248 -[UIViewController _presentViewController:withAnimationController:completion:] + 1761
18 UIKit 0x0000000106b826c1 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 132
19 UIKit 0x0000000106b825e5 -[UIViewController presentViewController:animated:completion:] + 229
20 UIKit 0x0000000106a44d62 -[UIApplication sendAction:to:from:forEvent:] + 75
21 UIKit 0x0000000106b5650a -[UIControl _sendActionsForEvents:withEvent:] + 467
22 UIKit 0x0000000106b558d9 -[UIControl touchesEnded:withEvent:] + 522
23 UIKit 0x0000000106a91958 -[UIWindow _sendTouchesForEvent:] + 735
24 UIKit 0x0000000106a92282 -[UIWindow sendEvent:] + 682
25 UIKit 0x0000000106a58541 -[UIApplication sendEvent:] + 246
26 UIKit 0x0000000106a65cdc _UIApplicationHandleEventFromQueueEvent + 18265
27 UIKit 0x0000000106a4059c _UIApplicationHandleEventQueue + 2066
28 CoreFoundation 0x000000010657e431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
29 CoreFoundation 0x00000001065742fd __CFRunLoopDoSources0 + 269
30 CoreFoundation 0x0000000106573934 __CFRunLoopRun + 868
31 CoreFoundation 0x0000000106573366 CFRunLoopRunSpecific + 470
32 GraphicsServices 0x000000010a1e0a3e GSEventRunModal + 161
33 UIKit 0x0000000106a438c0 UIApplicationMain + 1282
34 Project1 0x00000001054f70c7 main + 135
35 libdyld.dylib 0x0000000108530145 start + 1
36 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Please ask for any other informations that is helpful
Thanks
You most likely have an Outlet assigned to an element on the view controller you are transitioning to that is no longer connected to your code. This youtube video explains it in more detail.
To hunt down this issue, try right-clicking on all your elements (UILabels, UIViews, UIButton...) with the assistant editor open and cross check to see if the outlet name is referenced in the view controller.
I have tried to do various things to fix this SIGABRT error, I know it's very common but I can't seem to figure it out. Here is my error:
2013-10-09 22:16:41.277 Tap![4895:a0b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<gameViewController 0x9944780> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tapAction.'
*** First throw call stack:
(
0 CoreFoundation 0x017365e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014b98b6 objc_exception_throw + 44
2 CoreFoundation 0x017c66a1 -[NSException raise] + 17
3 Foundation 0x0117ac2e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x010e6f3b _NSSetUsingKeyValueSetter + 88
5 Foundation 0x010e6493 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x0114894a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x004cdcd5 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x014cb7d2 -[NSObject performSelector:] + 62
9 CoreFoundation 0x01731b6a -[NSArray makeObjectsPerformSelector:] + 314
10 UIKit 0x004cc82e -[UINib instantiateWithOwner:options:] + 1417
11 UIKit 0x0075f38f -[UIStoryboard instantiateViewControllerWithIdentifier:] + 220
12 UIKit 0x0075f988 -[UIStoryboardSegueTemplate _perform:] + 88
13 UIKit 0x0075fa59 -[UIStoryboardSegueTemplate perform:] + 115
14 libobjc.A.dylib 0x014cb874 -[NSObject performSelector:withObject:withObject:] + 77
15 UIKit 0x0022dc8c -[UIApplication sendAction:to:from:forEvent:] + 108
16 UIKit 0x0022dc18 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
17 UIKit 0x003256d9 -[UIControl sendAction:to:forEvent:] + 66
18 UIKit 0x00325a9c -[UIControl _sendActionsForEvents:withEvent:] + 577
19 UIKit 0x00324d4b -[UIControl touchesEnded:withEvent:] + 641
20 UIKit 0x0026b0cd -[UIWindow _sendTouchesForEvent:] + 852
21 UIKit 0x0026bd34 -[UIWindow sendEvent:] + 1232
22 UIKit 0x0023fa36 -[UIApplication sendEvent:] + 242
23 UIKit 0x00229d9f _UIApplicationHandleEventQueue + 11421
24 CoreFoundation 0x016bf8af __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
25 CoreFoundation 0x016bf23b __CFRunLoopDoSources0 + 235
26 CoreFoundation 0x016dc30e __CFRunLoopRun + 910
27 CoreFoundation 0x016dbb33 CFRunLoopRunSpecific + 467
28 CoreFoundation 0x016db94b CFRunLoopRunInMode + 123
29 GraphicsServices 0x036879d7 GSEventRunModal + 192
30 GraphicsServices 0x036877fe GSEventRun + 104
31 UIKit 0x0022c94b UIApplicationMain + 1225
32 Tap! 0x00003add main + 141
33 libdyld.dylib 0x01d72725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I have looked at the related classes and they do not have any problem. This problem occurs when I try to use a Segue.
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.
I have this error "Thread 1: Program received signal: 'SIGABRT'" on this line...
[window addSubview:viewController.view];
what does it mean??
and here are the error messages:
2011-11-10 10:01:08.334 Paint Brush[1624:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Paint_BrushViewController 0x4b1b1d0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key clear.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00dc25a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f16313 objc_exception_throw + 44
2 CoreFoundation 0x00dc24e1 -[NSException raise] + 17
3 Foundation 0x00794677 _NSSetUsingKeyValueSetter + 135
4 Foundation 0x007945e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x0021030c -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x00d388cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x0020ed23 -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x00210ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x000c6628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
10 UIKit 0x000c4134 -[UIViewController loadView] + 120
11 UIKit 0x000c400e -[UIViewController view] + 56
12 Paint Brush 0x000024ae -[Paint_BrushAppDelegate application:didFinishLaunchingWithOptions:] + 94
13 UIKit 0x00014c89 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
14 UIKit 0x00016d88 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
15 UIKit 0x00021617 -[UIApplication handleEvent:withNewEvent:] + 1533
16 UIKit 0x00019abf -[UIApplication sendEvent:] + 71
17 UIKit 0x0001ef2e _UIApplicationHandleEvent + 7576
18 GraphicsServices 0x00ffb992 PurpleEventCallback + 1550
19 CoreFoundation 0x00da3944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
20 CoreFoundation 0x00d03cf7 __CFRunLoopDoSource1 + 215
21 CoreFoundation 0x00d00f83 __CFRunLoopRun + 979
22 CoreFoundation 0x00d00840 CFRunLoopRunSpecific + 208
23 CoreFoundation 0x00d00761 CFRunLoopRunInMode + 97
24 UIKit 0x000167d2 -[UIApplication _run] + 623
25 UIKit 0x00022c93 UIApplicationMain + 1160
26 Paint Brush 0x00002419 main + 121
27 Paint Brush 0x00002395 start + 53
)
terminate called after throwing an instance of 'NSException'
In this class Paint_BrushAppDelegate, you might be setting a key where the key might not be a proper NSString. Please check the syntax or object you are passing as key. Please check if it is not nil.
I added UITabBarController in my app but removed after some time. App was working fine before adding UITabBarController but when I removed it from app, I started facing below exception.
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<XpensesAppDelegate 0x4daaa40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tabBarController.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00fa45a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x010f8313 objc_exception_throw + 44
2 CoreFoundation 0x00fa44e1 -[NSException raise] + 17
3 Foundation 0x00035677 _NSSetUsingKeyValueSetter + 135
4 Foundation 0x000355e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x004b930c -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x00f1a8cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x004b7d23 -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x004b9ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x002bf17a -[UIApplication _loadMainNibFile] + 172
10 UIKit 0x002bfcf4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291
11 UIKit 0x002ca617 -[UIApplication handleEvent:withNewEvent:] + 1533
12 UIKit 0x002c2abf -[UIApplication sendEvent:] + 71
13 UIKit 0x002c7f2e _UIApplicationHandleEvent + 7576
14 GraphicsServices 0x018fc992 PurpleEventCallback + 1550
15 CoreFoundation 0x00f85944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
16 CoreFoundation 0x00ee5cf7 __CFRunLoopDoSource1 + 215
17 CoreFoundation 0x00ee2f83 __CFRunLoopRun + 979
18 CoreFoundation 0x00ee2840 CFRunLoopRunSpecific + 208
19 CoreFoundation 0x00ee2761 CFRunLoopRunInMode + 97
20 UIKit 0x002bf7d2 -[UIApplication _run] + 623
21 UIKit 0x002cbc93 UIApplicationMain + 1160
22 Xpenses 0x00001ad9 main + 121
23 Xpenses 0x00001a55 start + 53
24 ??? 0x00000001 0x0 + 1
)
terminate called throwing an exceptionsharedlibrary apply-load-rules all
Any solution to get rid of this exception?
You have something connected to the tabBarController outlet of your app delegate in Interface Builder. However the outlet no longer exists, so you're getting this error. You should just find and remove that connection.
I seem to be having an issue with loading a game on a tab in a tab bar application. When I run the app and click on the tab that the game is supposed to go on, it crashes giving me this in console:
2011-03-20 08:36:29.311 ComputerClan[21592:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x6948f30> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key racquet_green.'
*** Call stack at first throw:
(
0 CoreFoundation 0x017ea5a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0193e313 objc_exception_throw + 44
2 CoreFoundation 0x017ea4e1 -[NSException raise] + 17
3 Foundation 0x001a7677 _NSSetUsingKeyValueSetter + 135
4 Foundation 0x001a75e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x0062b30c -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x017608cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x00629d23 -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x0062bab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x004e1628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
10 UIKit 0x004df134 -[UIViewController loadView] + 120
11 UIKit 0x004df00e -[UIViewController view] + 56
12 UIKit 0x004dd482 -[UIViewController contentScrollView] + 42
13 UIKit 0x004edf25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
14 UIKit 0x004ec555 -[UINavigationController _layoutViewController:] + 43
15 UIKit 0x004ed7aa -[UINavigationController _startTransition:fromViewController:toViewController:] + 326
16 UIKit 0x004e832a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
17 UIKit 0x004ef562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
18 UIKit 0x004e81c4 -[UINavigationController pushViewController:animated:] + 62
19 UIKit 0x004f469a -[UIMoreNavigationController pushViewController:animated:] + 105
20 UIKit 0x004a6b68 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1140
21 UIKit 0x0049cb05 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 219
22 Foundation 0x001ae79e __NSFireDelayedPerform + 441
23 CoreFoundation 0x017cb8c3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
24 CoreFoundation 0x017cce74 __CFRunLoopDoTimer + 1220
25 CoreFoundation 0x017292c9 __CFRunLoopRun + 1817
26 CoreFoundation 0x01728840 CFRunLoopRunSpecific + 208
27 CoreFoundation 0x01728761 CFRunLoopRunInMode + 97
28 GraphicsServices 0x01dda1c4 GSEventRunModal + 217
29 GraphicsServices 0x01dda289 GSEventRun + 115
30 UIKit 0x0043dc93 UIApplicationMain + 1160
31 ComputerClan 0x00002b02 main + 84
32 ComputerClan 0x00002aa5 start + 53
)
terminate called after throwing an instance of 'NSException'
It seems as if you have a problem in the XIB you are trying to load. Make sure there are no invalid connections, i.e. connections to non-existent IBOutlets or IBActions. Also make sure you haven't defined any objects to be non-existent classes.