View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001102VTK(No Category)public2004-08-19 08:202011-01-13 17:00
Reportermanimag 
Assigned ToAmy Squillacote 
PrioritylowSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001102: vtkGenericEnSightReader.cxx segfault
DescriptionWhen we try to open the geometry file contained in the case file, if the FILE pointer is NULL, the fclose lead to a segmentation fault (see the code that follow).
Moreover, why assuming the file is binary whereas it can simply be absent...

Another problem - to my mind - is the return of vtkGenericEnSightReader::ENSIGHT_6_BINARY (returned 0=ENSIGHT_6 in VTK4.2) : the reading of the case file will continue with the reading of the variable files which is totally useless because we have no geometry. It should be intersting to use the VTK_OK and VTK_ERROR flags (as it is done in PLOT3DReader) to stop the update or the execute.


in VTK4.4 line 466
        this->IFile = fopen(sfilename.c_str(), "rb");
        if (this->IFile == NULL)
          {
          vtkErrorMacro("Unable to open file: " << sfilename.c_str());
          vtkWarningMacro("Assuming binary file.");
          fclose(this->IFile);
          this->IFile = NULL;
          delete [] fileName;
          return vtkGenericEnSightReader::ENSIGHT_6_BINARY;
          } // end if IFile == NULL
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0001397)
Amy Squillacote (reporter)
2004-08-23 13:03

This has been fixed on the main CVS tree.

 Issue History
Date Modified Username Field Change
2010-11-29 17:59 Amy Squillacote Source_changeset_attached => VTK master 81fd7e4e
2011-01-13 17:00 Source_changeset_attached => VTK master a2bd8391
2011-01-13 17:00 Source_changeset_attached => VTK master 020ef709
2011-06-16 13:11 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team