From: Anthony Geay Date: Wed, 30 Oct 2019 13:52:35 +0000 (+0100) Subject: [Jira430-Tuleap16777] : Crash of static mesh plugin on array modification X-Git-Tag: V9_4_0rc1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b5a223162fccb18a3ddf54629ad31192062fbb87;p=modules%2Fparavis.git [Jira430-Tuleap16777] : Crash of static mesh plugin on array modification --- diff --git a/src/Plugins/MEDReader/IO/vtkMEDReader.cxx b/src/Plugins/MEDReader/IO/vtkMEDReader.cxx index af8da053..c61a9c7c 100644 --- a/src/Plugins/MEDReader/IO/vtkMEDReader.cxx +++ b/src/Plugins/MEDReader/IO/vtkMEDReader.cxx @@ -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; } diff --git a/src/Plugins/StaticMesh/vtkStaticDataSetSurfaceFilter.cxx b/src/Plugins/StaticMesh/vtkStaticDataSetSurfaceFilter.cxx index 065447e3..429e8905 100644 --- a/src/Plugins/StaticMesh/vtkStaticDataSetSurfaceFilter.cxx +++ b/src/Plugins/StaticMesh/vtkStaticDataSetSurfaceFilter.cxx @@ -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); }