Crash when point arrays are repeated in VTK unstructured grid XML files
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Load the attached file with a vtkXMLUnstructuredGridReader. You should get a crash in vtkAbstractArray::GetNumberOfComponents() because the array instance is NULL. This is because vtkXMLDataReader::ReadPieceData() accesses point data arrays by index, and the maximum index is found by looking at how many point data arrays are defined in the XML file. When a data file has more than one data array with the same name, the XML reader counts all of them. However, vtkPointData can have only one array of a particular name. This leads to the array being requested by index being invalid, hence NULL is returned, hence a crash.
The same likely happens for repeat cell arrays.