Re: NSURLConnection crashes with EXC_BAD_ADDRESS -- can't find why...
Re: NSURLConnection crashes with EXC_BAD_ADDRESS -- can't find why...
- Subject: Re: NSURLConnection crashes with EXC_BAD_ADDRESS -- can't find why...
- From: david paeme <email@hidden>
- Date: Thu, 9 Apr 2009 13:59:49 +0200
This might be more interesting... looks like the thing some crash down
in the bowels of LocaleGetValue?
As you probably gather, I have absolutely no idea what's going on in
there... i've changed the code that launches this into the asymmetric
request version for httpurlconnection (= threaded version), but is as
basic as can be... just appends some data a webserver onto a
nsmutabledata object...
Thread 2 Crashed:
0 com.apple.CoreFoundation 0x90cd08c3
__CFDictionaryFindBuckets1a + 147
1 com.apple.CoreFoundation 0x90cd10c4
CFDictionaryGetValueIfPresent + 100
2 com.apple.CoreFoundation 0x90cd7bd3 CFLocaleGetValue + 275
3 com.apple.CoreFoundation 0x90d15bd8
_CFStrGetLanguageIdentifierForLocale + 88
4 com.apple.CoreFoundation 0x90d256dd CFStringLowercase + 189
5 com.apple.CFNetwork 0x90af38f7
CookieUtils::copyStringAndLowerCase(__CFString const*) + 57
6 com.apple.CFNetwork 0x90af3913
CookieUtils::web_domainMatches(__CFString const*, __CFString const*) +
19
7 com.apple.CFNetwork 0x90b4d34c
HTTPCookieStorage::copyCookiesForURL(__CFURL const*, unsigned char) +
552
8 com.apple.CFNetwork 0x90ad1734
_CFHTTPCookieStorageCopyRequestHeaderFieldsForURL + 118
9 com.apple.CFNetwork 0x90b33d2f
HTTPProtocol::addCookies(__CFHTTPMessage*, _CFURLRequest const*) + 203
10 com.apple.CFNetwork 0x90b383c0
HTTPProtocol::createStream() + 864
11 com.apple.CFNetwork 0x90b38b1d
HTTPProtocol::createAndOpenStream() + 729
12 com.apple.CFNetwork 0x90b4ad53
URLConnectionLoader::loaderScheduleOriginLoad(_CFURLRequest const*) +
377
13 com.apple.CFNetwork 0x90b4a4ef
URLConnectionLoader
::LoaderConnectionEventQueue
::processAllEventsAndConsumePayload(XConnectionEventInfo<XLoaderEvent,
XLoaderEventParams>*, long) + 193
14 com.apple.CFNetwork 0x90b4aa9e
URLConnectionLoader::processEvents() + 92
15 com.apple.CFNetwork 0x90af8b6b
MultiplexerSource::perform() + 189
16 com.apple.CoreFoundation 0x90cfe5f5 CFRunLoopRunSpecific +
3141
17 com.apple.CoreFoundation 0x90cfecd8 CFRunLoopRunInMode + 88
18 com.apple.Foundation 0x95704d40 +
[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] +
320
19 com.apple.Foundation 0x956a17ed -[NSThread main] + 45
20 com.apple.Foundation 0x956a1394 __NSThread__main__ + 308
21 libSystem.B.dylib 0x94eb0095 _pthread_start + 321
22 libSystem.B.dylib 0x94eaff52 thread_start + 34
Thread 2 crashed with X86 Thread State (32-bit):
eax: 0x00000001 ebx: 0x90cd106a ecx: 0x00000000 edx: 0x00000000
edi: 0x00000000 esi: 0x00000002 ebp: 0xb0145fe8 esp: 0xb0145fd0
ss: 0x0000001f efl: 0x00010246 eip: 0x90cd08c3 cs: 0x00000017
ds: 0x0000001f es: 0x0000001f fs: 0x0000001f gs: 0x00000037
cr2: 0x00000000
On 08 Apr 2009, at 23:45, Greg Parker wrote:
On Apr 8, 2009, at 5:55 AM, David Paeme wrote:
I'm writing an application that accesses a http server via
NSURLConnection's sendSynchronousRequest method, and it keeps
crashing on me with an EXC_BAD_ADDRESS signal, without ever
reaching the server.
This is the stack trace:
#0 0x94e7f1c6 in mach_msg_trap ()
#1 0x94e869bc in mach_msg ()
#2 0x90cfe0ae in CFRunLoopRunSpecific ()
#3 0x90cfecd8 in CFRunLoopRunInMode ()
#4 0x90ad5b1b in CFURLConnectionSendSynchronousRequest ()
#5 0x9575526b in +[NSURLConnection
sendSynchronousRequest:returningResponse:error:] ()
#6 0x00002c26 in -[EPBackEnd updateArticles] (self=0x12dc20,
_cmd=0x77b76) at /Users/david/Code/Mac/EP/v0.2/EPBackEnd.m:287
#7 0x0000219d in -[AppController refreshArticles:]
(self=0x12dbb0, _cmd=0x77223, sender=0x123110) at /Users/david/Code/
Mac/EP/v0.2/AppController.m:52
#8 0x96b9753b in -[NSApplication sendAction:to:from:] ()
#9 0x96b97478 in -[NSControl sendAction:to:] ()
#10 0x96b972fe in -[NSCell _sendActionFrom:] ()
#11 0x96b96957 in -[NSCell trackMouse:inRect:ofView:untilMouseUp:]
()
#12 0x96b961aa in -[NSButtonCell
trackMouse:inRect:ofView:untilMouseUp:] ()
#13 0x96b95a64 in -[NSControl mouseDown:] ()
#14 0x96b941a3 in -[NSWindow sendEvent:] ()
#15 0x96b60d49 in -[NSApplication sendEvent:] ()
#16 0x96abe69f in -[NSApplication run] ()
#17 0x96a8b8a4 in NSApplicationMain ()
#18 0x0000201c in main (argc=1, argv=0xbffff778) at /Users/david/
Code/Mac/EP/v0.2/main.m:13
That's not a crash. That's a run loop waiting patiently for
something to happen. Look through the other threads for the one that
actually crashed. (If you get a crash log, the crashed thread will
be specially marked.)
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden