I can find in the list archives for 2005-2007 quite a few mentions of crashes 
when using asynchronous NSURLConnection, and in 2005 I myself reported Problem 
ID 4347324.  The crashes seemed to stop without a definitive resolution, 
possibly with Mac OS 10.5, but have reappeared in my apps recently.  A crash is 
likeliest when the app is rapidly creating, reading the first packet, 
cancelling, and releasing NSURLConnections at a rate of 20 per second, has 
10-20 such connections open simultaneously, and may be more likely on 
multi-processor/multi-core Mac Pro systems with high-speed network access.

So on Wednesday I've scheduled time at an ADC lab to beat on this.  Below, I've 
pasted in call stacks for the three crash reports I've collected; one from my 
testing and two from users.  The first two are somewhat similar, involving 
+[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] on a 
secondary thread.  I suppose this is a callback when data arrives.  But the 
third one is quite different, and is on the main thread.

I'd appreciate any suggestions of what to look for, or any better explanation 
of what's going on in those call stacks.  I know memory management is a 
possible issue, although I've been there many times, I'm looking again.

Thank you,

Jerry Krinock

*** Jerry's Crash ***
Thread 7 crashed:
#0      0x92b37120 in CFReadStreamCopyError
#1      0x913af407 in FTPProtocol::ftpReadStreamEvent
#2      0x92afedd3 in _signalEventSync
#3      0x92aff7be in _cfstream_solo_signalEventSync
#4      0x92afea88 in _CFStreamSignalEvent
#5      0x92aff707 in CFReadStreamSignalEvent
#6      0x9136ffcd in _DataStreamCallBack
#7      0x92afedd3 in _signalEventSync
#8      0x92afed58 in _cfstream_shared_signalEventSync
#9      0x92a7515b in __CFRunLoopDoSources0
#10     0x92a72c1f in __CFRunLoopRun
#11     0x92a720f4 in CFRunLoopRunSpecific
#12     0x92a71f21 in CFRunLoopRunInMode
#13     0x93dc6434 in +[NSURLConnection(NSURLConnectionReallyInternal) 
_resourceLoadLoop:]
#14     0x93d8d8dc in -[NSThread main]
#15     0x93d8d88c in __NSThread__main__
#16     0x914c2a19 in _pthread_start
#17     0x914c289e in thread_start


*** Jon's Crash ***
Thread 3 Crashed:
0   com.apple.CoreFoundation          0x91a2926e CFHash + 174
1   com.apple.CoreFoundation          0x91a2906c ___CFBasicHashFindBucket1 + 444
2   com.apple.CoreFoundation          0x91a3125c CFBasicHashFindBucket + 252
3   com.apple.CoreFoundation          0x91a31123 CFDictionaryGetValue + 131
4   com.apple.CoreFoundation          0x91b17a95 _CFStreamDetachSource + 405
5   com.apple.CoreFoundation          0x91a4edeb _CFStreamClose + 75
6   com.apple.CFNetwork               0x97fec8e1 
HTTPProtocol::destroyReadStream() + 173
7   com.apple.CFNetwork               0x97fec7b1 HTTPProtocol::cleanupStreams() 
+ 93
8   com.apple.CFNetwork               0x97feb221 
HTTPProtocol::httpReadStreamEvent(unsigned long) + 365
9   com.apple.CoreFoundation          0x91adfdd3 _signalEventSync + 99
10  com.apple.CoreFoundation          0x91adfd58 
_cfstream_shared_signalEventSync + 664
11  com.apple.CoreFoundation          0x91a5615b __CFRunLoopDoSources0 + 1563
12  com.apple.CoreFoundation          0x91a53c1f __CFRunLoopRun + 1071
13  com.apple.CoreFoundation          0x91a530f4 CFRunLoopRunSpecific + 452
14  com.apple.CoreFoundation          0x91a52f21 CFRunLoopRunInMode + 97
15  com.apple.Foundation              0x9689d434 
+[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 329
16  com.apple.Foundation              0x968648dc -[NSThread main] + 45
17  com.apple.Foundation              0x9686488c __NSThread__main__ + 1499
18  libSystem.B.dylib                 0x90567a19 _pthread_start + 345
19  libSystem.B.dylib                 0x9056789e thread_start + 34

*** Tony's Crash ***
Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   com.apple.CoreFoundation            0x99138d04 CFRelease + 196
1   com.apple.CFNetwork                 0x905e58ec 
HTTPProtocol::destroyReadStream() + 184
2   com.apple.CFNetwork                 0x905e57b1 
HTTPProtocol::cleanupStreams() + 93
3   com.apple.CFNetwork                 0x905e5acb 
HTTPProtocol::~HTTPProtocol() + 155
4   com.apple.CoreFoundation            0x99138ea1 _CFRelease + 353
5   com.apple.CFNetwork                 0x905e554c 
URLConnectionLoader::reallyCleanUpProtocol(unsigned char) + 240
6   com.apple.CFNetwork                 0x90640249 
URLConnectionLoader::cleanupProtocolFromClientThread() + 25
7   com.apple.CFNetwork                 0x905bb2c8 
URLConnectionClient::getRequestForTransmission(_CFURLResponse*, _CFURLRequest 
const*, __CFError**) + 574
8   com.apple.CFNetwork                 0x905bacaf 
URLConnectionClient::_clientWillSendRequest(_CFURLRequest const*, 
_CFURLResponse*, URLConnectionClient::ClientConnectionEventQueue*) + 223
9   com.apple.CFNetwork                 0x9063f54a 
URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent,
 XClientEventParams>*, long) + 148
10  com.apple.CFNetwork                 0x905baace 
URLConnectionClient::processEvents() + 94
11  com.apple.CFNetwork                 0x905ba96f MultiplexerSource::perform() 
+ 183
12  com.apple.CoreFoundation            0x9916b15b __CFRunLoopDoSources0 + 1563
13  com.apple.CoreFoundation            0x99168c1f __CFRunLoopRun + 1071
14  com.apple.CoreFoundation            0x991680f4 CFRunLoopRunSpecific + 452
15  com.apple.CoreFoundation            0x99167f21 CFRunLoopRunInMode + 97
16  com.apple.HIToolbox                 0x9827b0fc RunCurrentEventLoopInMode + 
392
17  com.apple.HIToolbox                 0x9827aeb1 ReceiveNextEventCommon + 354
18  com.apple.HIToolbox                 0x9827ad36 
BlockUntilNextEventMatchingListInMode + 81
19  com.apple.AppKit                    0x979ae135 _DPSNextEvent + 847
20  com.apple.AppKit                    0x979ad976 -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
21  com.apple.AppKit                    0x9796fbef -[NSApplication run] + 821
22  com.apple.AppKit                    0x97967c85 NSApplicationMain + 574

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to