[vtk-developers] PSLACReaderQuadratic test: Invalid array accesses

David Lonie david.lonie at kitware.com
Wed Dec 2 14:41:13 EST 2015


I've uncovered an issue with the PSLACReaderQuadratic unit test. With the
following patch applied, you can see that process 0 is trying to read
tuples from an empty array:

diff --git a/IO/Parallel/vtkPSLACReader.cxx b/IO/Parallel/vtkPSLACReader.cxx
index 89389e8..9336ffc 100644
--- a/IO/Parallel/vtkPSLACReader.cxx
+++ b/IO/Parallel/vtkPSLACReader.cxx
@@ -1070,6 +1070,9 @@ int vtkPSLACReader::ReadMidpointCoordinates (
       {
       MidpointsAvailableType::const_iterator iter;
       vtkIdType e[2];
+      std::cout << "Attempting to access tuple " << i + 1 << " of "
+                <<
this->Internal->EdgesToSendToProcesses->GetNumberOfTuples()
+                << std::endl;
       this->Internal->EdgesToSendToProcesses->GetTupleValue(i, e);
       iter = MidpointsAvailable.find(EdgeEndpoints(e[0], e[1]));
       if (iter != MidpointsAvailable.end ())

The output contains many (79604, to be exact) lines of:

Attempting to access tuple 1 of 0
Attempting to access tuple 2 of 0
Attempting to access tuple 3 of 0
Attempting to access tuple 4 of 0
Attempting to access tuple 5 of 0
Attempting to access tuple 6 of 0
Attempting to access tuple 7 of 0
Attempting to access tuple 8 of 0
Attempting to access tuple 9 of 0
Attempting to access tuple 10 of 0
....

Is anyone familiar with this reader able to take a look?

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20151202/09caca20/attachment.html>


More information about the vtk-developers mailing list