NSURLConnection crash on POST

Mark Christian mchristian at v1labs.com
Wed Sep 5 05:33:52 PDT 2007


The NSURLConnection is implicit -- I send my NSURLRequest to a  
WebFrame, and some time later, the NSURLConnection error pops up. I  
never set the delegate myself.

Right now, the NSURLRequest is an autoreleased object. However, if I  
change it to an alloc/init retained object, I still get the crash.

Also, and frustratingly, this exact code used to work. The only  
difference is that the WebFrame is now pointing to a page with a  
frameset, whereas it wasn't before.

Where else can I look for release bugs?

Mark



On 4-Sep-07, at 5:26 PM, Fritz Anderson wrote:

> When you "get" your NSURLConnection (you don't show this), do you  
> set the delegate? Do you take care that the delegate does not get  
> released/autoreleased while the connection is still pending?
>
> The -[NSURLConnection(NSURLConnectionInternal) _sendCallbacks]  
> method, followed immediately by a crasher in objc_msgSend (which is  
> a strong indicator of a message sent to a released object) is very  
> suggestive.
>
> 	— F
>
>
> On Sep 4, 2007, at 1:48 PM, Mark Christian wrote:
>
>> In the case where it's not nil, I get an NSURLConnection.
> ...
>> Here's the crash log:
>> #0  0x90a594c7 in objc_msgSend ()
>> #1  0xbfffe9e8 in ?? ()
>> #2  0x92859ee4 in -[NSURLConnection(NSURLConnectionInternal)  
>> _sendCallbacks] ()
>


More information about the MacOSX-dev mailing list