facing exception after removing tab bar from app - iphone

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.

Related

SIGABRT Error swift

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.

Objective C: uncaught exception 'NSUnknownKeyException' [duplicate]

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.

NSUnknownKeyException Causing Crash on Button Click [duplicate]

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.
So I'm not sure what is going on. I haven't really changed much. Nothing having to do with this class anyways. It was working fine just a bit before and now I'm getting this crash.
-(IBAction)mphButton:(id)sender{
if(self.mphVC == nil){
MphViewController *mph = [[MphViewController alloc] initWithNibName:#"MphView" bundle:[NSBundle mainBundle]];
self.mphVC = mph;
[mph release];
}
[self.navigationController pushViewController:self.mphVC animated:YES];
}
The thread is stopping saying "Thread 1: Program received signal "SIGABRT" on the [self.navigationController pushViewController:self.mphVC animated:YES];
This is what the message:
2011-09-29 10:59:03.557 SpeedClock[2973:b303] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<MphViewController 0x4b42ad0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key count.'
*** 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 UIKit 0x000c2482 -[UIViewController contentScrollView] + 42
13 UIKit 0x000d2f25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
14 UIKit 0x000d1555 -[UINavigationController _layoutViewController:] + 43
15 UIKit 0x000d2870 -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
16 UIKit 0x000cd32a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
17 UIKit 0x000d4562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
18 UIKit 0x000cd1c4 -[UINavigationController pushViewController:animated:] + 62
19 SpeedClock 0x00002621 -[RootViewController mphButton:] + 353
20 UIKit 0x000144fd -[UIApplication sendAction:to:from:forEvent:] + 119
21 UIKit 0x000a4799 -[UIControl sendAction:to:forEvent:] + 67
22 UIKit 0x000a6c2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
23 UIKit 0x000a57d8 -[UIControl touchesEnded:withEvent:] + 458
24 UIKit 0x00038ded -[UIWindow _sendTouchesForEvent:] + 567
25 UIKit 0x00019c37 -[UIApplication sendEvent:] + 447
26 UIKit 0x0001ef2e _UIApplicationHandleEvent + 7576
27 GraphicsServices 0x00ffb992 PurpleEventCallback + 1550
28 CoreFoundation 0x00da3944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
29 CoreFoundation 0x00d03cf7 __CFRunLoopDoSource1 + 215
30 CoreFoundation 0x00d00f83 __CFRunLoopRun + 979
31 CoreFoundation 0x00d00840 CFRunLoopRunSpecific + 208
32 CoreFoundation 0x00d00761 CFRunLoopRunInMode + 97
33 GraphicsServices 0x00ffa1c4 GSEventRunModal + 217
34 GraphicsServices 0x00ffa289 GSEventRun + 115
35 UIKit 0x00022c93 UIApplicationMain + 1160
36 SpeedClock 0x00001f59 main + 121
37 SpeedClock 0x00001ed5 start + 53
38 ??? 0x00000001 0x0 + 1
)
terminate called throwing an exceptionCurrent language: auto; currently objective-c
(gdb)
I can read these pretty well on Logcat on android. Just not use to reading this one. I saw another post saying that their class might not have been connected to their view. Mine is. It was working just fine prior to me putting in some stuff (which I recommented out and it still isnt working) on the MPHViewController.m
Any and all help is appreciated... Thanks :)
You most likely have something in your "MphView" XIB file called "count" that you no longer have in MphViewController. Maybe a delegate set for an object that's no longer there, or an action, or something like that. Check all your connections in Interface Builder and remove any broken ones.

Using the Tab bar results in an iPhone crash

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.

terminate called after thrwing an instance of 'NSException'

plz help me to resolve this
i m a learner
[Session started at 2011-01-10 14:32:07 +0530.]
2011-01-10 14:32:10.595 balls[963:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ballsViewController" nib but the view outlet was not set.'
*** Call stack at first throw:
(
0 CoreFoundation 0x025a5b99 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0239a40e objc_exception_throw + 47
2 CoreFoundation 0x0255e238 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x0255e1aa +[NSException raise:format:] + 58
4 UIKit 0x00363a40 -[UIViewController _loadViewFromNibNamed:bundle:] + 295
5 UIKit 0x00361675 -[UIViewController loadView] + 120
6 UIKit 0x0036154f -[UIViewController view] + 56
7 balls 0x00001fc1 -[ballsAppDelegate application:didFinishLaunchingWithOptions:] + 74
8 UIKit 0x002b7f27 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
9 UIKit 0x002ba3b0 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 346
10 UIKit 0x002c43ec -[UIApplication handleEvent:withNewEvent:] + 1958
11 UIKit 0x002bcb3c -[UIApplication sendEvent:] + 71
12 UIKit 0x002c19bf _UIApplicationHandleEvent + 7672
13 GraphicsServices 0x030f0822 PurpleEventCallback + 1550
14 CoreFoundation 0x02586ff4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
15 CoreFoundation 0x024e7807 __CFRunLoopDoSource1 + 215
16 CoreFoundation 0x024e4a93 __CFRunLoopRun + 979
17 CoreFoundation 0x024e4350 CFRunLoopRunSpecific + 208
18 CoreFoundation 0x024e4271 CFRunLoopRunInMode + 97
19 UIKit 0x002b9c6d -[UIApplication _run] + 625
20 UIKit 0x002c5af2 UIApplicationMain + 1160
21 balls 0x00001f54 main + 102
22 balls 0x00001ee5 start + 53
)
terminate called after throwing an instance of 'NSException'
Go to ballsViewController's xib and check whether the View is connected to Files Owner or not.
If not than control click on the View and drag the mouse to the files owner