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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:19:18+00:00 2026-05-27T18:19:18+00:00

I have a function on a background thread that looks like this: NSMutableArray *descriptions

  • 0

I have a function on a background thread that looks like this:

NSMutableArray *descriptions = [[NSMutableArray alloc] init];
NSString *description = [flickrFetcher descriptionForPhotoID:[[photos objectAtIndex:i] objectForKey:@"id"]];
    if ([description length] == 0) {
        description = @"No description available.";
    }
[descriptions addObject:description];
NSLOg(@"descriptions:%@.", descriptions);
[target performSelectorOnMainThread:action withObject:descriptions];

In action:

NSLog(@"description now is:%@.", descriptions");

Logs:

    Descriptions:2011-12-22 15:13:29.265 Paparazzi[3683:11903] (
    "No description available.",
    "No description available.",
    "No description available.",
    "No description available.",
     "No description available.",
     "No description available.",
    "No description available.",
    "No description available.",
    "This is a photo of just the eyes of an image I created by editing Apple's snow leopard image. I call the whole image \"Thermal Leopard\"."
).

descriptions:(null).

In that function, descriptions (the array) always ends up as nil. Why is this happening?

EDIT 1:

The second time I call this function, the array is not nil and every thing works as expected. It is just the first time this code is called. Also, it is only nil in the main thread action method, not in the code shown above.

EDIT 2:

Is this a bug? Should I submit it to Apple?
I think this might not be my fault, if I could get suggestions on wether this is a bug or not that would be great.

  • 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-27T18:19:19+00:00Added an answer on May 27, 2026 at 6:19 pm

    I figured out the problem. Somewhere in the action method, I found that I was setting description to nil. Thank you all soooo much for your help. I am upvoting all of your answers and comments to thank you.

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

Sidebar

Related Questions

I have a form that looks like this: <form id=addClassesToDoc action=> <table id=classesTable style=border-collapse:
I have a Javascript object that (very simplified) looks like this if('undefined' !== typeof(listCtrls)){
The thing is like this. I have a zip file with images that uncompressing
In my iPhone app, I have to perform function constantly in background. For that
I'm trying to have a class that when created, starts a background thread, similar
I have written an HttpModule that spawns a background thread. I'm using the thread
I have function getCartItems in cart.js and I want to call that function in
let say i have function like below function doSomethingNow(){ callSomethingInFutureNotExistNow(); } at the moment
So I have function that formats a date to coerce to given enum DateType{CURRENT,
In my Java code I have function that gets file from the client in

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.