Salome HOME
Crash in the destructor with omniORB4
authorrahuel <rahuel@opencascade.com>
Tue, 6 Sep 2005 08:42:22 +0000 (08:42 +0000)
committerrahuel <rahuel@opencascade.com>
Tue, 6 Sep 2005 08:42:22 +0000 (08:42 +0000)
ObjRefs of ports was created but not saved

src/Supervision/INode_Impl.cxx

index fe5d9ef926a5984e86ee25e76a342e6236c0bf7d..1775c8f83b6cb70c986ced83bcba958034a1a8eb 100644 (file)
@@ -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 ) ;
       }
     }
   }