DO Crashing on received object
DO Crashing on received object
- Subject: DO Crashing on received object
- From: Rosyna <email@hidden>
- Date: Thu, 4 Apr 2002 07:23:07 -0700
I'm trying to experiment with DO a little. For the server, I have the
following:
NSConnection* theConnection; //iVar
theConnection = [NSConnection defaultConnection];
[theConnection setRootObject:self];
if ([theConnection registerName:@"serverobject"] == NO) {
NSLog(@"Cannot vend object");
Then in the client, I have:
id theProxy; //ivar
theProxy= [NSConnection
rootProxyForConnectionWithRegisteredName:@"serverobject"
host:nil];
[theProxy retain];
[theProxy see]; // shows "I don't see" in the server properly.
NSLog(@"Hi"); // Show fine.
NSLog(@"the proxy is of class %@\n",
NSStringFromClass([theProxy class])); // Shows NSDistantObject
[self setMenu:[theProxy popup:nil]]; //Unknown results.
NSLog(@"%@",menu); // shows the menu (set by above call) but
then as soon as it's shown, BOOM! Client crashes.
Without the NSLog at the end, setMenu does not appear to work
although it is being called in the server.
The crash log goes something like this:
Thread 0 Crashed:
#0 0x706bab68 in objc_msgSend
#1 0x70816658 in -[NSInvocation invalidate]
#2 0x708267a8 in -[NSInvocation dealloc]
#3 0x708115c4 in -[NSObject release]
#4 0x708121f0 in NSPopAutoreleasePool
#5 0x7083f9e4 in NSLogv
#6 0x7084b3b4 in NSLog
#7 0x027d0408 in -[MyClass getInstance]
...more stuff that probably isn't relevant.
I cannot even log theProxy's description without crashing right after
the logging. It seems like I am missing something fundamental. It
should be noted the client is a loaded NSBundle to another
application.
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
---
Please include any previous correspondence in replies, it helps me
remember what we were talking about. Thanks.
_______________________________________________
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.