Help with NSURLDownload crash
Help with NSURLDownload crash
- Subject: Help with NSURLDownload crash
- From: John Schilling <email@hidden>
- Date: Wed, 17 Nov 2004 09:45:54 -0600
I'm kind of a newbie at Cocoa, so please bear with me. I'm using
NSURLDownload to fetch some images for my application. For each image
my app fetches, there is a "Node" object associated with it. Each
"Node" has it's own NSURLDownload object. There are about 40 such
objects in my app. So basically, when the app fires up, 40 "Node"
objects are allocated, and then each one creates an NSURLDownload
object, and grabs the image. Each "Node" uses the AppController as it's
delegate for sending back messages about the download status. Now, at
first, all "Nodes" tried to grab their image at the same time, but I've
since put them into a queuing system so that they go one at a time.
Maybe that's too much info, but hey...
Anyway, things work so-so most of the time. But eventually, the app
*always* crashes. Sometimes right away, sometimes after a few minutes.
Here's the output from the debugger:
#0 0x90831204 in objc_msgSend
#1 0x90a10cc8 in -[NSSimpleHTTPURLProtocol _handleLoadCallback]
#2 0x909f707c in -[NSArray makeObjectsPerformSelector:withObject:]
#3 0x90193cb0 in __CFRunLoopDoSources0
#4 0x90191568 in __CFRunLoopRun
#5 0x90195e94 in CFRunLoopRunSpecific
#6 0x909fc850 in -[NSRunLoop runMode:beforeDate:]
#7 0x90a15454 in -[NSRunLoop run]
#8 0x90a6747c in +[NSURLConnection(NSURLConnectionInternal)
_resourceLoadLoop:]
#9 0x90a39b74 in forkThreadForFunction
#10 0x900246e8 in _pthread_body
I'm at a total loss here. I have *no* idea what is causing this crash,
as I'm not experienced enough to understand the crash logs.
NSURLDownload is by far the simplest way to get images off the internet
(that I know of), and I'm not really keen on using something else. But
as it stands right now, the app is useless. Anyone else have any
experience with NSURLDownloads crashing like this? Is it the
NSURLDownload that is crashing? The methods I use for NSURLdownload are
exactly like many examples I've seen, and I'm fairly certain I'm using
it right. I've searched and searched on Google, but to no avail. Any
help is *greatly* appreciated.
PS: source code available for anyone who would like to look at it.
John Schilling
OS X Developer
Minneapolis, MN
http://www.jschilling.net
_______________________________________________
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