]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Fix for bug PAL12575 : Superv: GNode - unexpected abort.
authormkr <mkr@opencascade.com>
Fri, 12 Jan 2007 14:38:47 +0000 (14:38 +0000)
committermkr <mkr@opencascade.com>
Fri, 12 Jan 2007 14:38:47 +0000 (14:38 +0000)
src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx

index b56f5e5d25268a7405272338447334e02c172a30..9ae6293eb4577d86b0acfe4cb70b13ce44bce4c9 100644 (file)
@@ -2543,6 +2543,7 @@ int GraphExecutor::InNode::Successed_SuccessAction() {
                << " Successed_SuccessAction # number of ports " << GetNodeOutPortsSize()
                << " != " << aLabelNode-> GetNodeInPortsSize() << endl ;
         SendEvent( GraphExecutor::ErrorEvent ) ;
+        aLabelNode->State( GraphExecutor::ErroredState ) ; // PAL12575
         return 0 ;
       }
       else {
@@ -2573,6 +2574,7 @@ int GraphExecutor::InNode::Successed_SuccessAction() {
                      << " Successed_SuccessAction # names of ports "
                      << aBusParamOutPort->PortName() << endl ;
               SendEvent( GraphExecutor::ErrorEvent ) ;
+              aLabelNode->State( GraphExecutor::ErroredState ) ; // PAL12575
               return 0 ;
            }
          }
@@ -2650,6 +2652,23 @@ int GraphExecutor::InNode::Successed_SuccessAction() {
       }
     }
 
+// PAL12575 -->
+    if ( IsInLineNode() && !IsEndSwitchNode() ) {
+      GraphBase::InPort *toInGatePort = GetChangeNodeInGate() ;
+      GraphBase::OutPort *fromOutPort = toInGatePort->GetOutPort() ;
+      if ( fromOutPort && fromOutPort->IsGate() ) {
+        GraphExecutor::InNode * fromNode = (GraphExecutor::InNode *) _OutNode->Graph()->GetChangeGraphNode( fromOutPort->NodeName() )->GetInNode() ;
+        if ( fromNode && fromNode->IsGOTONode() && fromOutPort->PortState() != SUPERV::ReadyState ) {
+          cdebug << pthread_self() << "/" << ThreadNo()
+                << " Successed_SuccessAction # problem with connection of GoTo node with its coupled node!" << endl ;
+          State( GraphExecutor::ErroredState ) ;
+          SendEvent( GraphExecutor::ErrorEvent ) ;
+          return 0 ;
+        }
+      }
+    }
+// PAL12575 <--
+
 //Loop of LinkedNodes for SendSomeDataReady :
     for ( i = 0 ; i < LinkedNodesSize() ; i++ ) {
       GraphBase::ComputingNode * aComputingNode ;