Here's what I'm getting: 2534 2688881888 //Users/slate/Documents/equalizer/XCode/../lib/net/ node.cpp:328 4869 node fc582f2938a28cc1:787f567ed2b017ce listening. 2534 2954915840 //Users/slate/Documents/equalizer/XCode/../lib/net/ node.cpp:1536 4869 Entered command thread of N8eqOsirix8EqOsirixE 2534 2953850880 //Users/slate/Documents/equalizer/XCode/../lib/net/ node.cpp:1247 4869 Entered receiver thread of N8eqOsirix8EqOsirixE
//Create Server 2534 2688881888 //Users/slate/Documents/equalizer/XCode/../lib/net/ node.cpp:93 10519 New Node @0x3017600 2dbf49b1afe275f0:2a4c8f3a2ed99756 2534 2688881888 //Users/slate/Documents/equalizer/XCode/../lib/client/ server.cpp:42 10519 New server at 0x3017600 (gdb) p server._ptr->getRefCount() $1 = 0 //Enter connectServer( server) 2534 2688881888 //Users/slate/Documents/equalizer/XCode/../lib/client/ client.cpp:98 68427 Connecting to TCPIP#0#localhost##4743#default# (gdb) p server._ptr->getRefCount() $2 = 0 2534 2688881888 //Users/slate/Documents/equalizer/XCode/../lib/net/ socketConnection.cpp:123 97834 Could not connect to 'localhost:4743': Connection refused (61) 2534 2688881888 //Users/slate/Documents/equalizer/XCode/../lib/net/ node.cpp:854 97834 Node could not be connected. 2534 2688881888 //Users/slate/Documents/equalizer/XCode/../lib/net/ node.cpp:815 97834 Connection initialization to RefPtr<node 2dbf49b1afe275f0:2a4c8f3a2ed99756> failed. (gdb) p server._ptr->getRefCount() $3 = 1 2534 2688881888 //Users/slate/Documents/equalizer/XCode/../lib/client/ server.cpp:47 35328 Delete server at 0x3017600 (gdb) p server._ptr->getRefCount() $4 = 0 RefCount remains at 0 until connect( net::NodePtr( server.get( ) )) is called, where it goes up to 1 and then gets decremented and deleted when connect fails. Now that I know what's going on, I put a call to (gdb) server.get()- >ref() which bumps the count up to 1 and it runs fine after that. But if I put the code in the file, it doesn't. -S! On Apr 14, 12:23 pm, Stefan Eilemann <[email protected]> wrote: > 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-devhttp://www.equalizergraphics.com _______________________________________________ eq-dev mailing list [email protected] http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev http://www.equalizergraphics.com

