Strangely enough, I actually was already disabling the cache in my NSURLRequest. I changed the disable caching flag to the newer constant (NSURLRequestReloadIgnoringLocalCacheData), and now the crash has changed...

#0      0x90e684a6 in mach_msg_trap
#1      0x90e6fc9c in mach_msg
#2      0x901a60be in CFRunLoopRunSpecific
#3      0x901a6cf8 in CFRunLoopRunInMode
#4      0x970c5b5e in CFURLConnectionSendSynchronousRequest
#5 0x963d080b in +[NSURLConnection sendSynchronousRequest:returningResponse:error:] #6 0x0001993b in -[BBSHessianProxy callSynchronous:withParameters:] at BBSHessianProxy.m:67
#7      0xb0006ca7 in -[SQLDatabase queryString:]
#8 0xb0005cf6 in -[SQLDatabase table:objectValueForColumn:row:withSort:withFilter:cacheRow:] at SQLDatabase.m:301
#9      0xb00029d4 in -[SQLRow valueForUndefinedKey:] at SQLRow.m:103
#10     0x9634069b in _NSGetUsingKeyValueGetter
#11     0x96340137 in -[NSObject(NSKeyValueCoding) valueForKey:]
#12 0xb0001a8c in -[SQLRelationshipDictionary parseTable] at SQLRelationshipDictionary.m:43 #13 0xb00021a9 in -[SQLRelationshipDictionary initWithDatabase:] at SQLRelationshipDictionary.m:94
#14     0xb0004cbd in -[SQLDatabase connect] at SQLDatabase.m:130
#15     0xb0004701 in -[SQLDatabase awakeFromNib] at SQLDatabase.m:64
#16     0x9022e955 in -[NSSet makeObjectsPerformSelector:]
#17 0x96627be6 in -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:]
#18     0x9661de12 in loadNib
#19 0x9661d774 in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] #20 0x9661d3b7 in +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:]
#21     0x9661d2f5 in +[NSBundle(NSNibLoading) loadNibNamed:owner:]
#22     0x9661cfa4 in NSApplicationMain
#23     0x00001f60 in main at main.m:13

Here is the code I am using (it's nearly identical to the code of the official Hessian Obj-C framework)...

NSMutableURLRequest * request = [[[NSMutableURLRequest alloc] initWithURL:[self serviceUrl] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60.0] autorelease];
//add all the paramters to the data
[request setHTTPMethod:@"POST"];
NSData *hessianData = [hessianRequest data];
[request setHTTPBody:hessianData];
//force this header field to be text/xml... Tomcat 4 blows up otherwise
[request setValue:@"text/xml" forHTTPHeaderField:@"Content-type"];
NSHTTPURLResponse * returnResponse = nil;

NSError * requestError = nil;
NSData * retData = [NSURLConnection sendSynchronousRequest:request
returningResponse:&returnResponse error:&requestError];

On May 30, 2008, at 8:12 AM, Jens Alfke wrote:


On 30 May '08, at 12:55 AM, Colin Cornaby wrote:

I'm using an NSURLConnection to heavily query a server (basically I'm abstracting a MySQL database, and I have a Hessian server (basically SOAP) on the other end handling requests.) However, I keep having sendSyncronousRequest crash on me after periods of heavy load. The stack trace is:

Make sure you file a bug report. I haven't heard of a crash like this, but almost all of the URL loading code was rewritten in Leopard, so it's somewhat less mature than the Tiger codebase was.

You could try working around this by disabling caching in your NSURLRequests. If you're sending SOAP queries it's probably not appropriate to cache them anyway, right?

—Jens

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to