[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #27128] rootProxy cannot be called twice on an NSConnection

From: Michael Johnston
Subject: [bug #27128] rootProxy cannot be called twice on an NSConnection
Date: Tue, 28 Jul 2009 15:27:20 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17


                 Summary: rootProxy cannot be called twice on an NSConnection

                 Project: GNUstep
            Submitted by: mjohnston
            Submitted on: Tue 28 Jul 2009 03:27:16 PM GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any



Library Version - gnustep-base-0.19
OS - Fedora Core 10
gcc - 4.1.2

The expected behaviour is that you can call rootProxy multiple time on an
NSConnection object.
This is the behaviour on Mac.

Actual Behaviour.

Initial calls to rootProxy, and subsequent calls in the same method succeed.

Once the method that first called rootProxy is exited subsequently sending
rootProxy to the NSConnection instance (e.g. if its stored in an array and
retrieved later) cause NSConnectionDidDieNotifications to be posted and
exceptions to be raised.

The exceptions are different for message ports and socket ports. 

Message ports raise NSPortTimeoutExceptions with reason 'root proxy request -
port was invalidated'

Socket ports raise NSObjectInaccessibleException with reason 'Waiting for
reply in wrong thread'

The bug is also present in gnustep-base-1.16


It seems that NSConnection tries to reuse the NSDistantObject created on the
first call to rootProxy but does not retain it. Thus after exiting the method
where the root proxy is first obtained it may be released.


Retaining the rootProxy when its first returned avoids the bug. However doing
this is difficult unless a central class manages all connections.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]