MantisBT - ParaView
View Issue Details
0007453ParaView(No Category)public2008-08-05 18:032009-05-13 13:46
olesen 
Zhanping Liu 
normalcrashalways
closedfixed 
 
3.6 
0007453: Ensight measured data crash paraview.
Reading ensight gold with measured data in ASCII format crashes paraview while attempting to assign the points:

vtkEnSightGoldReader::ReadMeasuredGeometryFile()
{
...
  vtkDebugMacro("assign points");
  geom->SetPoints(newPoints); // CRASH!
  vtkDebugMacro("assigned points");
  newPoints->Delete();
  vtkDebugMacro("newPoints->Deleted");

  ...
}

NOTE: in the prev code snippet, I already had to replace the
  geom->InsertNextCell(VTK_VERTEX, 1, &id);

with
  vtkCellArray *newCells = vtkCellArray::New();
  newCells->Allocate(this->NumberOfMeasuredPoints);
  ...
  for (...)
    {
    newCells->InsertNextCell(1, &id);
    }

to avoid another crash.



Reading in binary files fails differently. Here the culprit is apparently from re-using the same block:

Debug: In .../VTK/IO/vtkEnSightGoldBinaryReader.cxx, line 1145
vtkEnSightGoldBinaryReader (0x17b6060): read measured data - add to block

ERROR: In .../VTK/IO/vtkEnSightReader.cxx, line 2145
vtkEnSightGoldBinaryReader (0x17b6060): Block already has a vtkDataSet assigned to it.

Debug: In .../VTK/IO/vtkEnSightGoldBinaryReader.cxx, line 1152
vtkEnSightGoldBinaryReader (0x17b6060): added to block


Looking at the code in vtkEnSightGoldBinaryReader.cxx, line 1150

  this->AddToBlock(output, this->NumberOfGeometryParts, pd);

It looks like the last geometry part is getting reused.
In the ReadMeasuredGeometryFile() there is no signs of the output dataset being incremented.


The attached cases are a minimal set of data that reproduces the problem.

No tags attached.
bz2 ensightMeasuredData.tar.bz2 (253,640) 2008-08-05 18:03
https://www.vtk.org/Bug/file/6650/ensightMeasuredData.tar.bz2
txt Patch7453.txt (2,850) 2009-03-23 13:28
https://www.vtk.org/Bug/file/7137/Patch7453.txt
Issue History
2008-08-05 18:03olesenNew Issue
2008-08-05 18:03olesenFile Added: ensightMeasuredData.tar.bz2
2008-08-21 13:55Utkarsh AyachitStatusbacklog => tabled
2008-08-21 13:55Utkarsh AyachitAssigned To => Berk Geveci
2009-02-18 09:04Utkarsh AyachitCategory3.4 => 3.6
2009-03-18 13:36Berk GeveciAssigned ToBerk Geveci => Zhanping Liu
2009-03-23 13:25Zhanping LiuNote Added: 0015764
2009-03-23 13:27Zhanping LiuNote Added: 0015765
2009-03-23 13:28Zhanping LiuFile Added: Patch7453.txt
2009-03-23 13:29Zhanping LiuStatustabled => @80@
2009-03-23 19:44Alan ScottNote Added: 0015770
2009-03-23 19:44Alan ScottStatus@80@ => closed
2009-03-23 19:44Alan ScottResolutionopen => fixed
2009-05-13 13:46Utkarsh AyachitTarget Version => 3.6
2011-06-16 13:10Zack GalbreathCategory => (No Category)

Notes
(0015764)
Zhanping Liu   
2009-03-23 13:25   
The bug has been fixed and the problem was due to the lack of updating (incrementing) of the number of geoemtry parts (this->NumberOfGeometryParts) as they are extracted in vtkEnSightGoldBinaryReader::ReadGeometryFile. After the fix, the measured geometry can be properly combined into a vtkMultiBlockDataSet object.

There were still two additional bugs (#A and #B) even with the added code for updating the aforementioned counter. Bug #A causes the measured geometry to be incorrectly interpreted due to the 1-based indexing scheme ALWAYS used in EnSight. In other words, "this->ParticleCoordinatesByIndex" needs to be, and was, removed from vtkEnSightGoldBinaryReader::ReadMeasuredGeometryFile().

Bug #B causes the measured scalars (associated with the measured geometry) to be incorrectly read due to a redundant use of this->ReadLine(line) in vtkEnSightGoldBinaryReader::ReadScalarsPerNode().

All of these three related bugs have been fixed and both the binary and ASCII versions of the provided sample dataset work well with the fix.

Please see the atatched patch file for detail.

new revision: 1.79; previous revision: 1.78
(0015765)
Zhanping Liu   
2009-03-23 13:27   
BTW, the reported problem with the ASCII version does not exist even before my fix. It was fixed some time by somebody else after your report (Aug 2008).
(0015770)
Alan Scott   
2009-03-23 19:44   
Tested client/remote server.