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 8414595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:12:24+00:00 2026-06-10T01:12:24+00:00

Okay, so I have just started iOS development. I’ll start by explaining the flow

  • 0

Okay, so I have just started iOS development. I’ll start by explaining the flow of my app :

1. A view called “appViewController” is loaded.

2. [self presentViewController: controller animated: YES completion:nil]; this loads a webview

3. After I am done with the webview, I dismiss it and load a new UINavigation this way :

[self dismissViewControllerAnimated:YES completion:^{
        formViewController *fv = [ [formViewController alloc] init ];
        UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:fv] autorelease];
        navController.navigationBar.hidden = YES;
        [presentingViewController presentModalViewController:navController animated:YES];

    }];

5.The formViewController has a button, which has the event attached to it for that display an alert this way

UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"Oops!"
                                           message:@"test"
                                          delegate:nil
                                 cancelButtonTitle:@"OK"
                                 otherButtonTitles:nil];
[av show];

Everything works as intended up till here. Now when I click the “Ok”(Cancel) button, the app crashes with NSZombieEnabled saying
-[appViewController _deepestDefaultFirstResponder]: message sent to deallocated instance 0x6e6a570 lldb

What is happening here? Why is it trying to send message to appViewController again? There is no code after [av show]

NOTE : I am using ARC

  • 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-10T01:12:26+00:00Added an answer on June 10, 2026 at 1:12 am

    If you’re using arc, the autorelease in your code isn’t valid.

    This seems like your root view controller gets deallocated at some point and when the responder chain gets traversed the resulting dangling pointer gets accessed.

    To verify this, I would implement the dealloc method on appViewController and see if it gets called.

    dealloc {
      NSLog(@"Problems ahead.");
    }
    

    If this does get called before you’d expect that to happen (for a root view controller probably not at all), you need to find out why this happens. You’re probably missing a strong reference somewhere. Check you app delegate and verify that you have a strong reference to the window and that you are setting your controller as the root view controller (provided you’re not using storyboards).

    The Zombies instrument is very good for debugging such problems. It will list all retains and releases of your problematic object. Here’s a short introduction to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just started using Objective C and although I am doing okay with
Okay, I have just been through a massive amount of bull craparooonie with xcodes
Okay, so i have the following html added to a site using javascript/greasemonkey. (just
Okay I have a large CRUD app that uses tabs with Forms embedded in
I have just started PHP and MySQL and have created a login form and
i have just started learning linq because i like the sound of it. and
I've just implemented kanban on my team and have started tracking the states of
I have just started learning the concept of Object oriented programming and have put
I have just started learning PHP, and here's my first doubt... Both of these
Okay firstly I just started C# so I'm not exactly the most skilled programmer

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.