On 13 Mar '08, at 10:31 AM, Rahul Shetty wrote:

We do quite a lot of downloads simultaneously ( in the range of 100-200). NSURLDownload is used for the purpose. We witness some random crashes while doing so. We use separate threads to carry out these downloads. One thread is made to handle up to 10 downloads at a time. And there are multiple threads running at the same time.

While this design ought to work, you really don't need to use multiple threads for this. You can start any number of asynchronous downloads/ connections from one thread. All the network-related code happens on a separate background thread run by CFNetwork; your thread is only invoked when a delegate method needs to be called.

0 com.apple.CoreFoundation 0x9690e5cd CFBundleCopyLocalizedString + 77 1 com.apple.CoreFoundation 0x9692e815 _CFErrorCreateLocalizedDescription + 277 2 com.apple.Foundation 0x936e88e8 -[NSError localizedDescription] + 136 3 com.myCompany.xyz 0x00047100 -[myObject didErrorOccured:request:] + 84

Looks like your code is on the stack at the time of the crash (I'm assuming 'myObject' is one of your classes.) I would double-check that code for thread-safety, since you're running it on multiple threads at once.

We were wondering what is the bundle that it is trying to refer which is resulting in the crash.

In both cases the caller is _CFErrorCreateLocalizedDescription, so it must be looking up error messages, probably from the CoreFoundation, CFNetwork or Foundation frameworks.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to