App crashes after upgrading xCode

Discussion in 'iOS Programming' started by Toreddo, Oct 15, 2010.

  1. Toreddo macrumors member

    Jul 18, 2009
    Hey everyone,

    I was programming an iphone app when i realized my xcode version was kinda old. I upgraded to the iOS4 version now my application bugs immediately when it tries to start, without an error. I found the line in my application delegate where the crash may happen.

    [window addSubview:navigationController.view];

    If i comment the line, the app starts, without the navigationcontroller of course.

    If i try to catch the exception it still crashes without a line in my log. :S
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 
    	@try {
    	[window addSubview:navigationController.view];
    @catch(id exception) {
    		NSLog(@"D%@", exception);
        [window makeKeyAndVisible];
    	return YES;
    I really can't see why it still crashes even if it is within a try, so i hope someone can help me out here.

    Thanks Chris :)
  2. kainjow Moderator emeritus


    Jun 15, 2000
    Look at navigationController.view and see if it's been initialized or not. What does the debugger show? What does the crash report indicate?

Share This Page