Hi,

On Wed, Apr 14, 2010 at 5:05 PM, Stephen Furlani [via Software]
<[email protected]> wrote:
> eq::Client::connectServer(ServerPtr server) {
> ...
> if( connect( net::NodePtr( server.get( )) ))
> ...
> }
>
> de-references the ServerPtr, after it's use of server.get()
>
> When created with eq::getConfig() server has at this point a refcount
> of 3
>
> When created with my program, server has at this point a refcount of
> 1, and since refcount hits 0 during de-ref it calls
> deleteReferenced(this) on the line of code in ConnectServer above.

At this point it should have at least a ref count of one (your program
+ the parameter refptr). As you said, the server gets deleted which is
bad. It seems that the ref-counting is not working in your code - with
eq::getConfig() it works since the server is already referenced by a
couple of users on return. But its refcount is likely wrong as well,
you just haven't noticed yet.

When you create the server its refptr should have a refcount of one,
and once you enter connectServer it should be two. Can you verify
this?


HTH,

Stefan.

-- 
View this message in context: 
http://n2.nabble.com/Back-to-n00b-errors-tp4891109p4902642.html
Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.
_______________________________________________
eq-dev mailing list
[email protected]
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com

Reply via email to