• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
timeout on -[NSData dataWithContentsOfURL:] ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

timeout on -[NSData dataWithContentsOfURL:] ?


  • Subject: timeout on -[NSData dataWithContentsOfURL:] ?
  • From: email@hidden
  • Date: Wed, 11 Jan 2006 22:15:36 -0800

I'm working on an app that downloads various images from Flickr. Sometimes, I'll get back alist of hundreds of photos, and will build URLs and in a separate thread, try to download thumbnail images for all of them - using -[NSData dataWithContentsOfURL]. Once I get back the data, I save it out to disk and then use it later for displaying those images.

Sometimes - and I haven't been able to pin it down 100% - all that will eventually display is a pure white blank image. When this happens, it happens for many images at once. It seems to happen most often when my home network is congested or I am trying to load so many of these images that they take a long time.

Is there a timeout on -dataWithContentsOfURL? What gets returned at that point?

Regardless of what data gets returned, I write it out and move on. When I go back and read one of these "blank" images using - dataWithContentsOfFile, I get a valid object, but the data it contains is zero bytes.

Thanks,
Blake
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: timeout on -[NSData dataWithContentsOfURL:] ?
      • From: j o a r <email@hidden>
    • Re: timeout on -[NSData dataWithContentsOfURL:] ?
      • From: email@hidden
  • Prev by Date: Re: Saving an AppleScript that targets my own application
  • Next by Date: Re: timeout on -[NSData dataWithContentsOfURL:] ?
  • Previous by thread: Re: Help, How to resize a window on cocoa
  • Next by thread: Re: timeout on -[NSData dataWithContentsOfURL:] ?
  • Index(es):
    • Date
    • Thread