]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
[Jira430-Tuleap16777] : Crash of static mesh plugin on array modification
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 30 Oct 2019 13:52:35 +0000 (14:52 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 30 Oct 2019 13:52:35 +0000 (14:52 +0100)
src/Plugins/MEDReader/IO/vtkMEDReader.cxx
src/Plugins/StaticMesh/vtkStaticDataSetSurfaceFilter.cxx

index af8da0533272c447a99754ca04f2be318fa627a1..c61a9c7c62eee07cf8b0b3f7796def865ac82ebc 100644 (file)
@@ -686,7 +686,7 @@ vtkDataSet *vtkMEDReader::RetrieveDataSetAtTime(double reqTS, ExportedTinyInfo *
       vtkGenerateVectors::Operate(ret->GetFieldData());
       // The operations above have potentially created new arrays -> This breaks the optimization of StaticMesh that expects the same field arrays over time.
       // To enforce the cache recomputation declare modification of mesh.
-      vtkGenerateVectors::ChangeMeshTimeToUpdateCache(ret);
+      //vtkGenerateVectors::ChangeMeshTimeToUpdateCache(ret);
     }
   return ret;
 }
index 065447e38fcb85eb3a13e4d8e34bbee63debc3ed..429e890535919daa5101125589d2b48aaa0e4717 100644 (file)
@@ -100,8 +100,8 @@ int vtkStaticDataSetSurfaceFilter::UnstructuredGridExecute(vtkDataSet* input, vt
         vtkAbstractArray* inArr = inPD->GetAbstractArray(iArr);
         outArr = inArr->NewInstance();
         outArr->SetName(inArr->GetName());
-        outArr->SetNumberOfTuples(output->GetNumberOfPoints());
         outArr->SetNumberOfComponents(inArr->GetNumberOfComponents());
+        outArr->SetNumberOfTuples(output->GetNumberOfPoints());
         inArr->GetTuples(pointIds.Get(), outArr);
         outPD->AddArray(outArr);
       }
@@ -137,8 +137,8 @@ int vtkStaticDataSetSurfaceFilter::UnstructuredGridExecute(vtkDataSet* input, vt
         vtkAbstractArray* inArr = inCD->GetAbstractArray(iArr);
         outArr = inArr->NewInstance();
         outArr->SetName(inArr->GetName());
-        outArr->SetNumberOfTuples(output->GetNumberOfCells());
         outArr->SetNumberOfComponents(inArr->GetNumberOfComponents());
+        outArr->SetNumberOfTuples(output->GetNumberOfCells());
         inArr->GetTuples(cellIds.Get(), outArr);
         outCD->AddArray(outArr);
       }