Skip navigation.
 
mlRe: NSURLRequest : Unable to Quit App after Syn call to Server.
FROM : fclee
DATE : Fri May 16 15:32:14 2008

On 05/15/2008 17:56 Jens Alfke wrote ..

"...You should call [NSApp terminate: self] instead. "

I did that; and repeated it.

I'm running in debug mode.  The program "works" till I QUIT via [NSApp terminate:self].

Now I'm getting (via gdb console {Running as a Cocoa App on my MacBookPro):

Running…
2008-05-16 09:18:52.868 iPhoneSOAP (Cocoa version)[553:817]
startSOAP start
2008-05-16 09:18:53.079 iPhoneSOAP (Cocoa version)[553:817]
end.
Program received signal:  “EXC_BAD_ACCESS”.
(gdb)

Here's a piece of the Error Report:
..
Date/Time:      2008-05-16 09:33:54.449 -0400
OS Version:      Mac OS X 10.5.2 (9C7010)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000010
Crashed Thread:  0
..

I don't know why this is happening; of course I'm suspecting the SYNCHRONOUS connection
to the server is the source...

Does NSURLRequest need to be CLOSED before exit?
I don't remember seeing NSURLRequest closer in the doc.

Any ideas/remedies for the EXC_BAD_ACCESS (SIGBUS)?

Ric.



On 05/15/2008 17:56 Jens Alfke wrote ..
>
> On 15 May '08, at 2:21 PM, <email_removed> wrote:
>
> >    The Cocoa code below "works".  I get data back from the server. 
> > However, I'm unable to QUIT this application after this particular 
> > routine passes through.  I checked the Activity Monitor and can see 
> > a bunch of threads still in session:
>
> That's expected, and not a problem. CFNetwork uses a background thread 
> to perform its I/O.
>
> >    [NSApp stop:self];    // <-------- Does not work when above 
> > routine was performed.
>
> That's your problem. You should call [NSApp terminate: self] instead. 
> Although you shouldn't even need that — the standard Quit menu command 
> is already bound to that action.
>
> —Jens

Related mailsAuthorDate
mlNSURLRequest : Unable to Quit App after Syn call to Server. fclee May 15, 23:21
mlRe: NSURLRequest : Unable to Quit App after Syn call to Server. Jens Alfke May 16, 02:56
mlRe: NSURLRequest : Unable to Quit App after Syn call to Server. fclee May 16, 15:32
mlRe: NSURLRequest : Unable to Quit App after Syn call to Server. stephen joseph but… May 16, 16:53
mlRe: NSURLRequest : Unable to Quit App after Syn call to Server. Frederick C. Lee May 17, 20:58
mlRe: NSURLRequest : Unable to Quit App after Syn call to Server. Dominik Pich May 17, 21:23