Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9043413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:43:41+00:00 2026-06-16T10:43:41+00:00

When I run this following code it gives above error – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary

  • 0

When I run this following code it gives above error

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{


   self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];

    [self.window makeKeyAndVisible];

    self.viewController = [[ViewController alloc] initWithNibName:nil bundle:nil];
    self.firstViewController=[[FirstViewController alloc]initWithNibName:nil bundle:nil];
    UINavigationController *localNavigationController=[[UINavigationController alloc]initWithRootViewController:self.viewController];
    self.navigationController=localNavigationController;
    [localNavigationController release];
    UINavigationController *localFistNavigationController=[[UINavigationController alloc]initWithRootViewController:self.firstViewController];
    self.firstNavigationController=localFistNavigationController;
    [localNavigationController release];
   NSArray *twoBars=[[NSArray alloc]initWithObjects:self.navigationController,self.firstNavigationController, nil];
    UITabBarController *localTAbBarController =[[UITabBarController alloc]init];
    [localTAbBarController setViewControllers:twoBars];
    self.tabBarController=localTAbBarController;
    [localTAbBarController release];
    [self.window addSubview:self.tabBarController.view];

        return YES;
}

if i run following code it runs well

self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
         [self.window makeKeyAndVisible];

    self.viewController = [[ViewController alloc] initWithNibName:nil bundle:nil];
    self.firstViewController = [[FirstViewController alloc] initWithNibName:nil bundle:nil];

    self.navigationController = [[UINavigationController alloc]
                                 initWithRootViewController:self.viewController];

    self.firstNavigationController=[[UINavigationController alloc]initWithRootViewController:self.firstViewController];
    NSArray *twoBars=[[NSArray alloc]initWithObjects:self.navigationController,self.firstNavigationController, nil];

    self.tabBarController=[[UITabBarController alloc]init];
    [self.tabBarController setViewControllers:twoBars];

       [self.window addSubview:self.tabBarController.view];



    return YES;

i not understood what is the difference between these. in first one i just created local variables & assigned those to properties. in later one directly used the properties.
why it is giving the error- program recieved signal “EXC_BAD_ACCESS”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:43:42+00:00Added an answer on June 16, 2026 at 10:43 am

    i got my answer. because of releasing same objects more than one time, it happens.
    i have released [localNavigationController release]; two times. later it must be

    [localFirstNavigationController release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code in my Mojolicious application module. When I run this
I am getting this error when I run the following code: #!/usr/bin/env ruby -rubygems
I'm creating an application that will run code in a sandboxed environment. This environment
I have the following query, now the strange thing is if I run this
I am following this tutorial and I've run the command ruby script\server and successfully
I run the following codes separately as my prompt unsuccessfully in .zshrc. This suggests
I'm trying to run the following PowerShell script to create a local user. This
I've run the following script: PS C:\> Send-MailMessage -To <EmailAddress1> -From <EmailAddress2> -Body This
This problem follows on from a previous question . When I run the following
I run this code here <html> <script type=text/javascript src=lib/jquery-ui-1.8.21.custom.min.js></script> <script src=http://127.0.0.1:5984/_utils/script/jquery.couch.js></script> <!--<script type=text/javascript src=lib/jquery-1.7.2.js></script>-->

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.