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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:41:00+00:00 2026-06-11T09:41:00+00:00

Just converted a project to ARC and am now getting a EXEC_BAD_ACCESS after I

  • 0

Just converted a project to ARC and am now getting a EXEC_BAD_ACCESS after I dismiss a UIActionsheet, it was previously working and I am unsure if this is even ARC related. Zombies is enabled but showing me nothing and I tried instuments and it also gave me nothing.

This is presented in a modal view controller, case 0, the quit button works fine but the other two give me the bad access error.

This is my first conversion to ARC, am I missing something here?

Action sheet Creation:

-(IBAction)quitPressed:(id)sender {
    UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"Quit This Game?"    delegate:self cancelButtonTitle:@"Keep Playing" destructiveButtonTitle:@"Quit" otherButtonTitles:@"Quit and Reveal Answers",nil];
    [sheet showInView:self.view];

}

Action sheet delegate:

-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{

    switch (buttonIndex) {
        case 0:  //quit
            [self dismissViewControllerAnimated:NO completion:^{
            [self.delegate quitGame];
        }];
        break;
        case 1:  //quit and reveal
            NSLog(@"reveal");
            break;
        case 2: //cancel
            NSLog(@"cancel"); 
            break;
        default:
        break;
    }

}

  • 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-11T09:41:01+00:00Added an answer on June 11, 2026 at 9:41 am

    Thanks everyone for the help. I found the problem when I ran the project under xcode 4.5. It gave a compile error: switch case is protected in scope

    I wasn’t getting that error in xcode 4.3

    It was solved in this thread When converting a project to use ARC what does "switch case is in protected scope" mean?

    I wrapped each case in curly brackets and the problem has been fixed.

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

Sidebar

Related Questions

I just converted an old project to ARC using Xcode's automatic refactoring. @property (nonatomic,
I have just converted my project to ARC using the automatic conversation tool but
I just converted a website to a web application project and I am getting
I just converted a WPF project from .NET 3.5 to .NET 4.0. I'm now
I have just converted a project to VS2010 and I now starting to see
We've just recently converted our project to using Maven for builds and dependency management,
I've recently converted my iOS project to ARC. I have two targets in my
For my project i use storyboard and arc and now i want to implement
I've just converted a project from .net 1.1 to 3.5, and I'm being given
I have just converted a project from Visual Studio 2003 to 2005 and although

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.