NSConnection exceptions
NSConnection exceptions
- Subject: NSConnection exceptions
- From: Greg Hulands <email@hidden>
- Date: Fri, 25 Apr 2003 09:48:58 +1000
Hi,
I have a DO connection setup to the server. I can query the server,
but on one line when I try to send a message I get an exception. Here
is the backtrace from gdb:
(gdb) bt
#0 0x90844888 in -[NSException raise] ()
#1 0x90844810 in +[NSException raise:format:] ()
#2 0x907fbffc in -[NSConcretePortCoder sendBeforeTime:sendReplyPort:]
()
#3 0x907edac8 in -[NSConnection sendInvocation:] ()
#4 0x907f10b4 in -[NSObject(NSForwardInvocation) forward::] ()
#5 0x9068c130 in _objc_msgForward ()
#6 0x01767154 in -[SIPlugin processOrder:] (self=0xa8480,
_cmd=0x167f44, order=0x1d693a0) at SIPlugin.m:129/Users/ghulands/DLS/
#7 0x00153ab0 in -[DLSOutput connectWithPorts:] (self=0xa8480,
_cmd=0x166890, portArray=0x2fdc50) at
DLSOutput.m:118/Users/ghulands/DLS/
#8 0x9081cd38 in forkThreadForFunction ()
#9 0x90020d48 in bootstrap_status ()
(gdb)
I tried setting the setReplyTimeout: in the server to a longer time,
but still the same occurred. Below is the client code that connects to
the server:
- (BOOL)processOrder:(DLSOrder *)order
{
//Connect to the Store-It server via DO and archive the order
if (!server)
{
NSSocketPort *sport = [[NSSocketPort alloc]
initRemoteWithTCPPort:[port intValue] host:[ipAddress stringValue]];
NSConnection *conn = [NSConnection
connectionWithReceivePort:nil sendPort:sport];
server = [[conn rootProxy] retain];
}
if (!server)
{
NSLog(@"Could not connect to Store-It server");
return NO;
}
[server setProtocolForProxy:@protocol(StoreItProtocol)];
int index = [server addOrderWithOrderNumber:[order orderNumber]
customerID:[order customerID]];
int i, c = [[order frames] count];
DLSFrame *frame;
for (i = 0; i < c; i++)
{
frame = [[order frames] objectAtIndex:i];
[server addFrame:frame toOrderAtIndex:index]; //this is where
it raises the exception
[order output:[self name]
updatedCompletionAmount:(float)(i+1)/(float)c];
}
return YES;
}
Does anyone know why this would be occurring. The frame object
implements the NSCoding protocol.
Any help is greatly appreciated.
Regards,
Greg
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.