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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:33:18+00:00 2026-05-28T14:33:18+00:00

I have a signup method that hits an API to sign up a user

  • 0

I have a signup method that hits an API to sign up a user and return the account information. Everything works fine, but in my signup viewcontroller, when signup is successful, I pop the signup view. Once I pop the signup view, I get EXC_BAD_ACCESS on the line below. NOTE – this only happens on the phone. In the simulator this does not happen. It seems to be a timing issue somehow, but I cant figure it out. For example, if I put a breakpointer on [_completionHandlerSignUp release]; then it works every time.

Here is my createAccount method in my DataAccessor class:

_completionHandlerSignUp = [handler copy];

the normal request code would be here

[request setCompletionBlock:^
 {
     int statusCode = request.responseStatusCode;

     NSDictionary *json = [request.responseString JSONValue];
     NSString *status = [json valueForKeyPath:@"status"];
     NSLog(@"API JSON %@", request.responseString);

     myAccount.statusCode = statusCode;

     if(statusCode == 200)
     {
         myAccount.status = status;
         myAccount.error = @"";
         myAccount.firstName = firstName;
         myAccount.lastName = lastName;
         Credentials *myCredentials = [[Credentials alloc] init];
         myCredentials.emailAddress = userName;
         myCredentials.passWord = passWord;
         myAccount.credentials = myCredentials;

         [myCredentials release];
     }
     else if(statusCode == 403)
     {
         NSString *error = [json valueForKeyPath:@"error"];
         myAccount.status = status;
         myAccount.error = error;
         NSLog(@"API Error %@",error);
     }

     NSLog(@"TEST - Sending Account Response ");
     _completionHandlerSignUp(myAccount);

     NSLog(@"TEST - DEALLOCATING OBJECTS ");

    [_completionHandlerSignUp release];  <--**EXC_BAD_ACCESS HAPPENS HERE**
    _completionHandlerSignUp = nil;

     }];

And here is the viewcontroller method:

DataAccessor *dataAccessor = [[DataAccessor alloc] init];

        [dataAccessor createAccount:[Utilities getDeviceUDID] user:txtEmail.text password:txtPassword.text firstname:txtFirstName.text lastname:txtLastName.text  completion:^(Account *myAccount)
        {
            [dataAccessor release]; 

            if(myAccount != NULL)
            {
                NSLog(@"Status: %@", myAccount.status);
                NSLog(@"Error: %@", myAccount.error);

                if(myAccount.statusCode == 200)  //handle successful transaction
                {

                    [Preferences signInUser:myAccount.credentials.emailAddress password:myAccount.credentials.passWord];

                    [self popViewController];  **<<<<If I remove this, THERE IS NO CRASH******
                }
                else if(myAccount.statusCode == 403)
                {
                    //todo - handle error
                }
            }


            [self finalUpdate];
        }];

- (void) popViewController
{
    NSLog(@"TEST - Popping View Controller ");

    CATransition* transition = [CATransition animation];
    transition.duration = 0.5;
    transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
    transition.type = kCATransitionPush; //kCATransitionMoveIn; //, kCATransitionPush, kCATransitionReveal, kCATransitionFade
    transition.subtype = kCATransitionFromBottom; //kCATransitionFromLeft, kCATransitionFromRight, kCATransitionFromTop, kCATransitionFromBottom
    //  MainSelectionMenu *myViewController = [[MainSelectionMenu alloc] initWithNibName:@"MainSelectionMenu" bundle:nil];
    [self.navigationController.view.layer addAnimation:transition forKey:nil];
    [[self navigationController] popViewControllerAnimated:NO];
}

Something else that is very odd is that my SIGN IN functionality works almost exactly the same way. Sign in calls the SignIN API in the DataAccessor and when it returns in the view controller, it pops the view. However, the SIGN IN functionality works fine and NEVER crashes.

EDIT – Zombies Log:

-   Address Category    Event Type  RefCt   Timestamp   Size    Responsible Library Responsible Caller
0   0x11035a00  ASIFormDataRequest  Malloc  1   00:16.125.952   1024    Saveology   +[ASIFormDataRequest requestWithURL:]
1   0x11035a00  ASIFormDataRequest  Autorelease   00:16.126.025   0   Saveology   +[ASIFormDataRequest requestWithURL:]
2   0x11035a00  ASIFormDataRequest  Autorelease   00:16.126.026   0   Saveology   -[SaveologyDealsDataAccessor createDealsAccount:user:password:firstname:lastname:divisionid:completion:]
3   0x11035a00  ASIFormDataRequest  Retain  2   00:16.126.179   0   Foundation  NSRecordAllocationEvent
4   0x11035a00  ASIFormDataRequest  Retain  3   00:16.126.196   0   Foundation  NSRecordAllocationEvent
5   0x11035a00  ASIFormDataRequest  Release 2   00:16.126.266   0   Foundation  NSRecordAllocationEvent
6   0x11035a00  ASIFormDataRequest  Release 1   00:16.126.267   0   Foundation  NSRecordAllocationEvent
7   0x11035a00  ASIFormDataRequest  Retain  2   00:16.127.268   0   Foundation  NSRecordAllocationEvent
8   0x11035a00  ASIFormDataRequest  Retain  3   00:16.127.302   0   Foundation  NSRecordAllocationEvent
9   0x11035a00  ASIFormDataRequest  Release 2   00:16.127.332   0   Foundation  NSRecordAllocationEvent
10  0x11035a00  ASIFormDataRequest  Retain  3   00:16.128.711   0   Foundation  NSRecordAllocationEvent
11  0x11035a00  ASIFormDataRequest  Release 2   00:16.128.771   0   Foundation  NSRecordAllocationEvent
12  0x11035a00  ASIFormDataRequest  Retain  3   00:16.129.880   0   Foundation  NSRecordAllocationEvent
13  0x11035a00  ASIFormDataRequest  Retain  4   00:16.129.889   0   Foundation  NSRecordAllocationEvent
14  0x11035a00  ASIFormDataRequest  Release 3   00:16.129.893   0   Foundation  NSRecordAllocationEvent
15  0x11035a00  ASIFormDataRequest  Release 2   00:16.129.912   0   Foundation  NSRecordAllocationEvent
16  0x11035a00  ASIFormDataRequest  Retain  3   00:16.309.250   0   Foundation  NSRecordAllocationEvent
17  0x11035a00  ASIFormDataRequest  Retain  4   00:16.310.289   0   Foundation  NSRecordAllocationEvent
18  0x11035a00  ASIFormDataRequest  Release 3   00:16.310.396   0   Foundation  NSRecordAllocationEvent
19  0x11035a00  ASIFormDataRequest  Release 2   00:16.310.640   0   Foundation  NSRecordAllocationEvent
20  0x11035a00  ASIFormDataRequest  Retain  3   00:16.310.775   0   Foundation  NSRecordAllocationEvent
21  0x11035a00  ASIFormDataRequest  Retain  4   00:16.310.776   0   Foundation  NSRecordAllocationEvent
22  0x11035a00  ASIFormDataRequest  Release 3   00:16.310.789   0   Foundation  NSRecordAllocationEvent
23  0x11035a00  ASIFormDataRequest  Release 2   00:16.310.807   0   Foundation  NSRecordAllocationEvent
24  0x11035a00  ASIFormDataRequest  Retain  3   00:16.311.443   0   Foundation  NSRecordAllocationEvent
25  0x11035a00  ASIFormDataRequest  Retain  4   00:16.311.469   0   Foundation  NSRecordAllocationEvent
26  0x11035a00  ASIFormDataRequest  Retain  5   00:16.311.491   0   Foundation  NSRecordAllocationEvent
27  0x11035a00  ASIFormDataRequest  Retain  6   00:16.311.496   0   Foundation  NSRecordAllocationEvent
28  0x11035a00  ASIFormDataRequest  Release 5   00:16.311.501   0   Foundation  NSRecordAllocationEvent
29  0x11035a00  ASIFormDataRequest  Release 4   00:16.311.546   0   Foundation  NSRecordAllocationEvent
30  0x11035a00  ASIFormDataRequest  Release 3   00:16.311.557   0   Foundation  NSRecordAllocationEvent
31  0x11035a00  ASIFormDataRequest  Release 2   00:16.311.563   0   Foundation  NSRecordAllocationEvent
32  0x11035a00  ASIFormDataRequest  Release 1   00:16.313.736   0   Foundation  NSRecordAllocationEvent
33  0x11035a00  ASIFormDataRequest  Release 0   00:16.320.573   0   Foundation  NSRecordAllocationEvent
34  0x11035a00  ASIFormDataRequest  Zombie  -1  00:16.320.964   0   GraphicsServices    GSEventRunModal
  • 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-05-28T14:33:18+00:00Added an answer on May 28, 2026 at 2:33 pm

    Turn on Zombie Objects to get some more detail about that EXE_BAD_ACCESS error. Should tell you something about the object that it’s expecting to be there. This usually means you’ve dealloc’d the object pointer too early in the execution of the code.

    Turning on Zombies: How do I set up NSZombieEnabled in Xcode 4?

    What happens when you remove this [_completionHandlerSignUp release] line?

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

Sidebar

Related Questions

I have an ecommerce website that works in a classical way: people sign up,
I have a form (signup.php) that pops up in a nyroModal window when I
I have a form allowing a user to signup for a news letter which
I have code that sends emails to users from a signup webpage. Occasionally, users
I have a problem. The client is claiming that a prize signup form I
Several web service APIs have you sign up for an API key. For example,
I've built a full sign up system with user account activation, login, validation, captcha
I have a javascript function that is called onsubmit: function formCheck(){ return usernameCheck() &&
I am making a Rails 3.1 app and have a signup form that was
I have a basic signup form: <form action=adduser method=post onsubmit='passwordCheck()'> Email Address: <input type=email

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.