App crash after modification on the XIB files - iphone

After adding a new searchbar on the RootViewController.xib, and connecting it with the FileOwner, the App will crash. It reports the stack when crash:
2011-07-17 17:12:43.756 TableView[1397:207] *** Terminating app due to uncaught
exception 'NSInternalInconsistencyException', reason: '-[UIViewController
_loadViewFromNibNamed:bundle:] loaded the "RootViewController" nib but the view outlet
was not set.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00dc85a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f1c313 objc_exception_throw + 44
2 CoreFoundation 0x00d80ef8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x00d80e6a +[NSException raise:format:] + 58
4 UIKit 0x0036a709 -[UIViewController _loadViewFromNibNamed:bundle:] + 295
5 UIKit 0x00368134 -[UIViewController loadView] + 120
6 UIKit 0x004c1dd8 -[UITableViewController loadView] + 80
7 UIKit 0x0036800e -[UIViewController view] + 56
8 UIKit 0x003667f5 -[UIViewController nextResponder] + 34
9 UIKit 0x003874a6 -[UIResponder _containsResponder:] + 41
10 UIKit 0x00371c4e -[UINavigationController defaultFirstResponder] + 80
11 UIKit 0x00386647 -[UIResponder(Internal) _deepestDefaultFirstResponder] + 42
12 UIKit 0x00386663 -[UIResponder(Internal) _deepestDefaultFirstResponder] + 70
13 UIKit 0x00386406 -[UIResponder(Internal) _promoteDeepestDefaultFirstResponder] + 42
14 TableView 0x00002a0a -[TableViewAppDelegate application:didFinishLaunchingWithOptions:] + 135
15 UIKit 0x002b8c89 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
16 UIKit 0x002bad88 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
17 UIKit 0x002c5617 -[UIApplication handleEvent:withNewEvent:] + 1533
18 UIKit 0x002bdabf -[UIApplication sendEvent:] + 71
19 UIKit 0x002c2f2e _UIApplicationHandleEvent + 7576
20 GraphicsServices 0x01720992 PurpleEventCallback + 1550
21 CoreFoundation 0x00da9944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
22 CoreFoundation 0x00d09cf7 __CFRunLoopDoSource1 + 215
23 CoreFoundation 0x00d06f83 __CFRunLoopRun + 979
24 CoreFoundation 0x00d06840 CFRunLoopRunSpecific + 208
25 CoreFoundation 0x00d06761 CFRunLoopRunInMode + 97
26 UIKit 0x002ba7d2 -[UIApplication _run] + 623
27 UIKit 0x002c6c93 UIApplicationMain + 1160
28 TableView 0x00002960 main + 102
29 TableView 0x000028f1 start + 53
30 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'

Well I don't know what you want us to tell you more then your error is already telling you.
Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: '-[UIViewController
_loadViewFromNibNamed:bundle:] loaded the "RootViewController" nib but
the view outlet was not set.'
That is that you forgot to connect your view outlet of your RootViewController so it does not know what to load. The RootViewController of your MainWindow is the first thing that's going to be loaded, if it does not know what view it should display it will give you the above error.

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.

Whenever i run my application, the application crashes and it shows " signal1:Program recieved signal SIGABRT"

On the console it shows....
2011-09-29 17:06:39.564 Project AddressBook[925:207] * Terminating
app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'Could not load NIB in bundle: 'NSBundle
(loaded)' with name 'eve''
* Call stack at first throw: ( 0 CoreFoundation
0x00e655a9 exceptionPreprocess + 185 1 libobjc.A.dylib
0x00fb9313 objc_exception_throw + 44 2 CoreFoundation
0x00e1def8 +[NSException raise:format:arguments:] + 136 3
CoreFoundation 0x00e1de6a +[NSException
raise:format:] + 58 4 UIKit
0x005500fa -[UINib instantiateWithOwner:options:] + 2024 5 UIKit
0x00551ab7 -[NSBundle(UINSBundleAdditions)
loadNibNamed:owner:options:] + 168 6 UIKit
0x00407628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70 7
UIKit 0x00405134 -[UIViewController
loadView] + 120 8 UIKit 0x0040500e
-[UIViewController view] + 56 9 UIKit
0x00406a3d -[UIViewController viewControllerForRotation] + 63 10
UIKit 0x00402988 -[UIViewController
_visibleView] + 90 11 UIKit 0x006a493c
-[UIClientRotationContext
initWithClient:toOrientation:duration:andWindow:] + 354 12 UIKit
0x0037c81e -[UIWindow
_setRotatableClient:toOrientation:updateStatusBar:duration:force:] +
954 13 UIKit 0x00604619
-[UIWindowController
transition:fromViewController:toViewController:target:didEndSelector:]
+ 1381 14 UIKit 0x0040965d
-[UIViewController presentModalViewController:withTransition:] + 3478
15 Project AddressBook 0x000032cb -[Home Events:] +
155 16 UIKit 0x003554fd
-[UIApplication sendAction:to:from:forEvent:] + 119 17 UIKit
0x003e5799 -[UIControl sendAction:to:forEvent:] + 67 18 UIKit
0x003e7c2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] +
527 19 UIKit 0x003e67d8 -[UIControl
touchesEnded:withEvent:] + 458 20 UIKit
0x00379ded -[UIWindow _sendTouchesForEvent:] + 567 21 UIKit
0x0035ac37 -[UIApplication sendEvent:] + 447 22 UIKit
0x0035ff2e _UIApplicationHandleEvent + 7576 23 GraphicsServices
0x01723992 PurpleEventCallback + 1550 24 CoreFoundation
0x00e46944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION
+ 52 25 CoreFoundation 0x00da6cf7
__CFRunLoopDoSource1 + 215 26 CoreFoundation
0x00da3f83 __CFRunLoopRun + 979 27 CoreFoundation
0x00da3840 CFRunLoopRunSpecific + 208 28 CoreFoundation
0x00da3761 CFRunLoopRunInMode + 97 29 GraphicsServices
0x017221c4 GSEventRunModal + 217 30 GraphicsServices
0x01722289 GSEventRun + 115 31 UIKit
0x00363c93 UIApplicationMain + 1160 32 Project AddressBook
0x00002828 main + 102 33 Project AddressBook
0x000027b9 start + 53 ) terminate called after throwing an instance of
'NSException' sharedlibrary apply-load-rules all Current language:
auto; currently objective
HELP ME PLEASE!!
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'eve''
Your problem is exactly this. You try to load a nib file named 'eve'.
Somewhere you call something like this:
VC *aVC = [[[VC alloc] initWithNibName:#"eve" bundle:nil] autorelease];
Xcode 4 should show you the call stack when it hits that exception. And in the source window it should show you the code where it happened. Three or four lines above that line is your problem.

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

app crashes after xib edit

I have a navigation controller app. I created a RootViewController class with Xib file. In that xib file I had table view and nothing more else. Toolbar and buttons on the toolbar I created in program way. Table view had datasourse and delegate File Owner.
I deleted this xib file, and created a new one with previous name. Created it like viewBased xib file and then I dropped down to it table view, toolbar, two buttons on toolbar. Add outlets on them. Saved it all. Clear all targets. Build all. And Run. Application crashes on start! Anyone know where may be the problem? Thanx!
Stack:
[Session started at 2010-11-16 15:00:52 +0200.]
2010-11-16 15:00:53.729 PhoneBook[16210:207] ******* Accessibility Status Changed: On
2010-11-16 15:00:53.755 PhoneBook[16210:207] ********** Loading AX for: com.yourcompany.PhoneBook ************
2010-11-16 15:00:53.798 PhoneBook[16210:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "RootViewController" nib but the view outlet was not set.'
*** Call stack at first throw:
(
0 CoreFoundation 0x02510b99 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0266040e objc_exception_throw + 47
2 CoreFoundation 0x024c9238 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x024c91aa +[NSException raise:format:] + 58
4 UIKit 0x0036aa40 -[UIViewController _loadViewFromNibNamed:bundle:] + 295
5 UIKit 0x00368675 -[UIViewController loadView] + 120
6 UIKit 0x004c1c8c -[UITableViewController loadView] + 80
7 UIKit 0x0036854f -[UIViewController view] + 56
8 UIKit 0x003669f4 -[UIViewController contentScrollView] + 42
9 UIKit 0x003767e2 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
10 UIKit 0x00374ea3 -[UINavigationController _layoutViewController:] + 43
11 UIKit 0x0037612d -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
12 UIKit 0x00370ccd -[UINavigationController _startDeferredTransitionIfNeeded] + 266
13 UIKit 0x0048db55 -[UILayoutContainerView layoutSubviews] + 226
14 QuartzCore 0x0456a481 -[CALayer layoutSublayers] + 177
15 QuartzCore 0x0456a1b1 CALayerLayoutIfNeeded + 220
16 QuartzCore 0x045632e0 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 302
17 QuartzCore 0x04563040 _ZN2CA11Transaction6commitEv + 292
18 UIKit 0x002c104e -[UIApplication _reportAppLaunchFinished] + 39
19 UIKit 0x002c1477 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 545
20 UIKit 0x002cb3ec -[UIApplication handleEvent:withNewEvent:] + 1958
21 UIKit 0x002c3b3c -[UIApplication sendEvent:] + 71
22 UIKit 0x002c89bf _UIApplicationHandleEvent + 7672
23 GraphicsServices 0x02d6c822 PurpleEventCallback + 1550
24 CoreFoundation 0x024f1ff4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
25 CoreFoundation 0x02452807 __CFRunLoopDoSource1 + 215
26 CoreFoundation 0x0244fa93 __CFRunLoopRun + 979
27 CoreFoundation 0x0244f350 CFRunLoopRunSpecific + 208
28 CoreFoundation 0x0244f271 CFRunLoopRunInMode + 97
29 UIKit 0x002c0c6d -[UIApplication _run] + 625
30 UIKit 0x002ccaf2 UIApplicationMain + 1160
31 PhoneBook 0x00002494 main + 102
32 PhoneBook 0x00002425 start + 53
)
terminate called after throwing an instance of 'NSException'
* Terminating app due to uncaught exception
'NSInternalInconsistencyException',
reason: '-[UIViewController
_loadViewFromNibNamed:bundle:] loaded the "RootViewController" nib but the
view outlet was not set.'
Your view controller lost connection for view outlet, you need to restore it in IB (as you do with all outlets)

App terminates after viewcontroller calls the delegate to close the view

here the situation: i have a viewcontroller which calls in the function "viewDidLoad" a function in the AppDelegateIphone to terminate this view.
The problem is that this exception comes if i make this:
splashScreen.view = nil;
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "SplashScreenController_iPhone" nib but the view outlet was not set.'
*** Call stack at first throw:
(
0 CoreFoundation 0x029dc919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x02b2a5de objc_exception_throw + 47
2 CoreFoundation 0x02995078 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x02994fea +[NSException raise:format:] + 58
4 UIKit 0x0062a09c -[UIViewController _loadViewFromNibNamed:bundle:] + 295
5 UIKit 0x00627cd1 -[UIViewController loadView] + 120
6 UIKit 0x00627bab -[UIViewController view] + 56
7 regioappv2 0x00003085 -[AppDelegate_iPhone application:didFinishLaunchingWithOptions:] + 97
8 UIKit 0x00580543 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
9 UIKit 0x005829a1 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 346
10 UIKit 0x0058c452 -[UIApplication handleEvent:withNewEvent:] + 1958
11 UIKit 0x00585074 -[UIApplication sendEvent:] + 71
12 UIKit 0x00589ac4 _UIApplicationHandleEvent + 7495
13 GraphicsServices 0x030bfafa PurpleEventCallback + 1578
14 CoreFoundation 0x029bddc4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
15 CoreFoundation 0x0291e737 __CFRunLoopDoSource1 + 215
16 CoreFoundation 0x0291b9c3 __CFRunLoopRun + 979
17 CoreFoundation 0x0291b280 CFRunLoopRunSpecific + 208
18 CoreFoundation 0x0291b1a1 CFRunLoopRunInMode + 97
19 UIKit 0x00582226 -[UIApplication _run] + 625
20 UIKit 0x0058db58 UIApplicationMain + 1160
21 regioappv2 0x000028b4 main + 102
22 regioappv2 0x00002845 start + 53
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
if I call the function with the splashScreen.view = nil; in the appDelegate itself, then everything is working just fine.
Please tell me where is my fault, or wheather I should post more code.
regards
loaded the "SplashScreenController_iPhone" nib but the view outlet was not set.
Have you made the view outlet in interface builder? Seems that you have not set it up correctly. And also from the stack trace, it's clear that viewDidLoad haven't been called, as the view is yet to be successfully loaded.