From b5a223162fccb18a3ddf54629ad31192062fbb87 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 30 Oct 2019 14:52:35 +0100 Subject: [PATCH] [Jira430-Tuleap16777] : Crash of static mesh plugin on array modification --- src/Plugins/MEDReader/IO/vtkMEDReader.cxx | 2 +- src/Plugins/StaticMesh/vtkStaticDataSetSurfaceFilter.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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); } -- 2.39.2