bug-gnustep
[Top][All Lists]
Advanced

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

[bug #35164] reference not released after servicing proxy request


From: rajendra
Subject: [bug #35164] reference not released after servicing proxy request
Date: Fri, 23 Dec 2011 21:06:40 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0) Gecko/20100101 Firefox/7.0

URL:
  <http://savannah.gnu.org/bugs/?35164>

                 Summary: reference not released after servicing proxy request
                 Project: GNUstep
            Submitted by: rajendra123
            Submitted on: Fri 23 Dec 2011 09:06:39 PM GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Hi,
    I am developing a DO application and I see that after invoking a method
from client process, retain count of root object increments by 1. If I keep
repeating this, retain counter keeps incrementing.

Even when connection between client and server is released properly (server
process receiving proxy_release message), references are not decremented to
what it was before proxy was created.

>From my debugging, I see root object reference is incremented 2 times in
processing the method request but release happens only 1 time. Following are
the 2 places:


First place:
#1  0x00007ffff766b311 in +[GSDistantObjectPlaceHolder initWithCoder:]
(self=0x7ffff7b125c0, _cmd=<optimized out>, aCoder=<optimized out>) at
NSDistantObject.m:224
#2  0x00007ffff76d75ec in -[NSPortCoder decodeValueOfObjCType:at:]
(self=0x77e208, _cmd=0x7ffff7b04630, type=<optimized out>,
address=0x7fffffffd0a8) at NSPortCoder.m:611
#3  0x00007ffff763e26c in -[NSConnection(Private) _service:forwardForProxy:]
(self=0x72fd38, _cmd=0x7ffff7b04880, aRmc=0x77e208) at NSConnection.m:2555
#4  0x00007ffff763d298 in -[NSConnection(Private) handlePortMessage:]
(self=0x65d178, _cmd=0x7ffff7b93270, msg=0x72fff8) at NSConnection.m:2335

2nd place:
#1  0x00007ffff77657ef in -[GSFFIInvocation invokeWithTarget:] (self=0x77a848,
_cmd=<optimized out>, anObject=0x71da58) at GSFFIInvocation.m:449
#2  0x00007ffff768cae4 in -[NSInvocation invoke] (self=0x77a848,
_cmd=0x7ffff7b04930) at NSInvocation.m:627
#3  0x00007ffff763e983 in -[NSConnection(Private) _service:forwardForProxy:]
(self=0x72fd38, _cmd=0x7ffff7b04880, aRmc=0x77e208) at NSConnection.m:2695
#4  0x00007ffff763d298 in -[NSConnection(Private) handlePortMessage:]
(self=0x65d178, _cmd=0x7ffff7b93270, msg=0x72fff8) at NSConnection.m:2335


second retain is released when invokation is deallocated. But nobody seems to
be releasing the first retain.

I think [NSConnection(Private) _service:forwardForProxy:] should release the
reference after invoking the method because it gets 1 reference as part of
following call:

    /* Decode the object, (which is always the first argument to a method).
*/
      [decoder decodeValueOfObjCType: @encode(id) at: &object];

When I added "[object autorelease]" after the above line then things seems to
work fine. No crash and reference counts are correct after executing methods
multiple times.

So this is probably a bug. I am using gnustep-base-1.23.0. 

Thanks
Rajendra




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35164>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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