[vtkusers] Bug in vtkGenericEnSightReader.cxx

Emmanuel Guillot manimag at hotmail.com
Thu Aug 19 07:42:59 EDT 2004


Hi everybody,
This mail is a bug report (I didn't manage to log in in the "bug tracker") 
for vtkGenericEnSightReader.cxx.

When 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.

Can someone report the bug for me or explain me how to login ?
Thanks
Manu

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

_________________________________________________________________
Bloquez les fenêtres pop-up, c'est gratuit ! http://toolbar.msn.fr




More information about the vtkusers mailing list