From: rahuel Date: Tue, 6 Sep 2005 08:42:22 +0000 (+0000) Subject: Crash in the destructor with omniORB4 X-Git-Tag: V3_1_0a1~19 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsuperv.git;a=commitdiff_plain;h=7b87edd9ae0906b0804c292d3de50bba150f348c Crash in the destructor with omniORB4 ObjRefs of ports was created but not saved --- diff --git a/src/Supervision/INode_Impl.cxx b/src/Supervision/INode_Impl.cxx index fe5d9ef..1775c8f 100644 --- a/src/Supervision/INode_Impl.cxx +++ b/src/Supervision/INode_Impl.cxx @@ -133,9 +133,9 @@ void INode_Impl::destroy() { if ( DataFlowEditor()->IsEditing() ) { if ( Delete() ) { _poa->deactivate_object(*_id) ; - CORBA::release(_poa) ; +// CORBA::release(_poa) ; delete(_id) ; - _thisObj->_remove_ref(); +// _thisObj->_remove_ref(); } else { MESSAGE("INode_Impl::destroy ERROR ") ; @@ -211,6 +211,8 @@ SUPERV::Port_ptr INode_Impl::InPort( const char *aParameterName , PortableServer::ObjectId * id = myInPort->getId() ; CORBA::Object_var obj = _poa->id_to_reference(*id) ; Inobject = SUPERV::Port::_narrow(obj) ; +//JR 02.09.2005 : set of objref is better + anInPort->ObjRef( Inobject ) ; } } } @@ -219,9 +221,11 @@ SUPERV::Port_ptr INode_Impl::InPort( const char *aParameterName , ( DataFlowNode()->IsLoopNode() || DataFlowNode()->IsEndLoopNode() ) ) { // || DataFlowNode()->IsEndSwitchNode() ) ) { Outobject = OutPort( aParameterName , aParameterType ) ; +// ==> The OutPort (and ObjRef) with the same name is created in the LoopNode if ( DataFlowNode()->IsLoopNode() ) { LNode_Impl * myLoopNode = (LNode_Impl * ) this ; InEndobject = myLoopNode->Coupled()->InPort( aParameterName , aParameterType ) ; +// ==> The In/OutPort (and ObjRef) with the same name are created in the EndLoopNode DataFlowEditor()->AddLink( Outobject->Node()->Name() , Outobject->Name() , InEndobject->Node()->Name() , InEndobject->Name() ) ; } @@ -256,6 +260,8 @@ SUPERV::Port_ptr INode_Impl::OutPort( const char *aParameterName , PortableServer::ObjectId * id = myOutPort->getId() ; CORBA::Object_var obj = _poa->id_to_reference(*id) ; Outobject = SUPERV::Port::_narrow(obj) ; +//JR 02.09.2005 : set of objref is better + anOutPort->ObjRef( Outobject ) ; } } }