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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:32:15+00:00 2026-06-02T07:32:15+00:00

I am making a NSURL and passing it to a selector, which then passes

  • 0

I am making a NSURL and passing it to a selector, which then passes it to another selector, etc. By the time it gets where it’s going it logs just fine, but gives a sigabort when it’s used. I suspect this means my object has been released by ARC. How can I make sure it stays around long enough to get used?

__strong NSURL *url = [[NSURL alloc] initWithString:str];

... passes to a selector
... passes to another
... and then to fetchVideoContent

- (void)fetchVideoContent:(NSURL *)url withGUID:(NSString *)guid;
{
    NSMutableURLRequest *req;
    req = [NSMutableURLRequest requestWithURL:url // <-- DIES ON THIS LINE (SIGABRT)
                                  cachePolicy:NSURLRequestUseProtocolCachePolicy
                              timeoutInterval:30.0];
    ...

That’s the “strongest” thing I could think of and that still doesn’t work. Any advice?

  • 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-02T07:32:16+00:00Added an answer on June 2, 2026 at 7:32 am

    You need to ensure the initial url variable (__strong NSURL *url) continues to exist when the url object ends up at the fetchVideoContent method, if not, you’ll get the error you’re describing. Sounds to me like you’re creating the url object in a method, using a local variable, and then passing that object through a few methods, that either cross to a new thread, or goes to the end of the runloop and back into the next run.

    For example, if through the steps you’ve omitted, the current run loop ends, and the initial url variable goes out of scope, the url object will be freed, since nothing is actually holding on to it anymore. Passing the object to another method isn’t enough to keep hold of it since no retain will be called on the parameter.

    Short version is, make sure something holds onto url, you could make it a property of your class, an instance variable or even static if you’ll only one instance of your class in use at a time.

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

Sidebar

Related Questions

Making an adobe flex ui in which data that is calculated must use proprietary
Im making a login/logout class that logs users in, sets cookies based on user's
I am making and app that you modify images and then you could upload
I just upgraded to the latest 4.3 Xcode. I have my plist.which is preprocessed
I'm making an app with which the user can record sound and send it
I am currently trying to have a time out of 20 second when making
I'm making an iPhone app for a band, which lists songs for the band.
I am making a program that loads videos from a server and then saves
I am making an iPhone app which includes tutorials on guitar scales. The goal
I am making an app which has a section for latest company news. Basically

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.