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

  • Home
  • SEARCH
  • 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 6345465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:49:42+00:00 2026-05-24T20:49:42+00:00

I have a custom navigation controller so i made my own back button that

  • 0

I have a custom navigation controller so i made my own back button that does

-(void)navigateBack{
    [self.navigationController popViewControllerAnimated:YES];
}

and on the view did load, I request for many images using the ASINetworkQueue

-(void)sendRequest:(NSURL *)url withParams:(NSDictionary *)params andSelector:(NSString *)selector{
NSString *jsonString = [params yajl_JSONString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setPostValue:jsonString forKey:@"json"];
[request setTimeOutSeconds:15];
[[self networkQueue] setDelegate:self];
[[self networkQueue] setRequestDidFinishSelector:NSSelectorFromString(selector)];
[[self networkQueue] setRequestDidFailSelector:@selector(asiRequestFailed:)];
[[self networkQueue] addOperation:request];
[[self networkQueue] go];
}

Essentially, anytime I send an HTTP request, i just do [self sendRequest:].
When I go to this viewcontroller, then press back before all the images are downloading, I get an EXC_BAD_ACCESS that points to the line where ASIHTTPFormRequest tries to perform the selector. I tried putting

[networkQueue cancelAllOperations];[self setNetworkQueue:nil];

in my dealloc method, and i put breakpoints before and after this, and I can see from the GDB that there are no more requests in the queue, but the error keeps showing. Am i missing something?

thanks

  • 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-24T20:49:43+00:00Added an answer on May 24, 2026 at 8:49 pm

    Your delegates will likely get called to notify you of the cancellation. You need to remove all the delegates in your dealloc method, eg:

    for (ASIHTTPRequest *req in [queue operations])
    {
        [req setDelegate:nil];
        [req cancel];
    }
    [queue setDelegate:nil];
    

    (and also progress delegates etc if you’re using them)

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

Sidebar

Related Questions

I have a custom button on a view controller in the navigation controller's heirarchy,
I have a root view controller with just a simple navigation button that loads
We have a custom navigation webpart that uses the PortalSiteMapProvider of MOSS to build
I have created a flexible navigation bar in my app that will show custom
I have a custom UITableViewCell which is part of a navigation controller. The cell
I have a navigation controller. One of the views adds custom subviews in its
I'm trying to have a custom UIViewController class get popped to the navigation controller,
I have a complicated structure where I have a custom tab-bar controller that houses
I have a custom UINavigationBar on a screen, i.e., no navigation controller, as defined
I have a UITableView with a Navigation Controller . The table view is made

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.