Re: NSURLConnection
Re: NSURLConnection
- Subject: Re: NSURLConnection
- From: Paul Forgey <email@hidden>
- Date: Wed, 2 Mar 2005 01:55:17 -0800
Found it, and this time I don't think it's my bug. I was using
+connectionWithRequest:delegate: because outside of my delegate
callbacks I had no need to keep track of the object. In proper Cocoa
fashion that method returns an autorelease'd instance, but isn't it
supposed to also retain itself while the request is pending? The
NSURLConnection will properly retain itself if the request is
successful, but apparently not if there is an error with the request.
On Mar 2, 2005, at 1:06 AM, Paul Forgey wrote:
I've got a program which uses an NSURLConnection to gather a very
small amount of data from a web server. Works well enough if the file
exists on the web server. But if it doesn't, NSURLConnection's
internal processing crashes _before any of the delegate's methods are
called_. This seems extremely fishy because the problem seems to have
to do with the redirect response the server is sending back but my
delegate's connection:willSendRequest:redirectionResponse: is never
called.
Here's the calls stack in gdb. WTF is going on??
#0 0x9083be80 in _objc_trap ()
#1 0x9083bdb8 in _objc_error ()
#2 0x9083bd44 in __objc_error ()
#3 0x90a69d48 in -[NSURLConnection(NSURLConnectionInternal)
_wasRedirectedToRequest:redirectResponse:] ()
#4 0x90a10d18 in -[NSSimpleHTTPURLProtocol _handleLoadCallback] ()
#5 0x909f707c in -[NSArray makeObjectsPerformSelector:withObject:] ()
#6 0x90193ca8 in __CFRunLoopDoSources0 ()
#7 0x90191560 in __CFRunLoopRun ()
#8 0x90195e8c in CFRunLoopRunSpecific ()
#9 0x909fc850 in -[NSRunLoop runMode:beforeDate:] ()
#10 0x90a15454 in -[NSRunLoop run] ()
#11 0x90a6747c in +[NSURLConnection(NSURLConnectionInternal)
_resourceLoadLoop:] ()
#12 0x90a39b74 in forkThreadForFunction ()
#13 0x900246e8 in _pthread_body ()
_______________________________________________
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
_______________________________________________
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