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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:56:43+00:00 2026-05-26T20:56:43+00:00

I have a project which downloads images in background using NSOperationQueue . It was

  • 0

I have a project which downloads images in background using NSOperationQueue. It was working until now on devices with IOS 4.3. However if I build the app with base sdk 4.3 or with 5 and run the app on device with IOS5, the app crashes. When app is launched, it adds NSOperation objects into queue for downloading the images. If in between I press back button, I cancel the NSOperation and it crashes and displays following trace on console:

#0  0x004727b7 in ____NSOQSchedule_block_invoke_0 ()
#1  0x026a5618 in _dispatch_call_block_and_release ()
#2  0x026a7a10 in _dispatch_worker_thread2 ()
#3  0x974bb781 in _pthread_wqthread ()
#4  0x974bb5c6 in start_wqthread ()

and prints “ResourceLoadOperation isFinished = YES without being started by the queue it is in”
If I comment the cancel method call, app doesnot crash.
Is there any updates on the NSOperation changes for IOS5?

  • 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-26T20:56:44+00:00Added an answer on May 26, 2026 at 8:56 pm

    I had this same problem when building against iOS 5. I ended up creating a flag named operationStarted that was NO by default and I toggled to YES when the start method was called. Then in my finish method (where I generate the KVO notifications), I checked the value of the flag before firing the notifications.

    The flag definition looks like this:

    @property (nonatomic, assign, getter=isOperationStarted) BOOL operationStarted;
    

    The start method:

    - (void)start {
        [self setOperationStarted:YES];
        ...
    }
    

    My finish method which is called when the operation is complete or cancelled:

    - (void)finish {    
        if (![self isOperationStarted]) return;
    
        [self willChangeValueForKey:@"isExecuting"];
        executing = NO;
        [self didChangeValueForKey:@"isExecuting"];
    
        [self willChangeValueForKey:@"isFinished"];
        finished = YES;
        [self didChangeValueForKey:@"isFinished"];
    }
    

    That ended up resolving the issue for me. Hope it helps someone else.

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

Sidebar

Related Questions

I have a project which is source controlled using Subversion and VisualSVN. Since the
I have a project which as part of the build process creates an XMLBeans
I have another project which contains static content (css, images, JS, etc.), and I
I have a possible project which involves accessing the /Apps/ subfolder in iOS. My
Is anyone working with Heroku for Java? I have one Java project which I
I am working on a struts project which I am new to. I have
I have a project which contains different components that everyone works on. We have
I have a project which it's domain contain following classes: Courier Customer Food Order
I have a project which exposes object model to use by different types of
I have a project which builds correctly from the command line. On one of

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.