MantisBT - ParaView
View Issue Details
0002886ParaViewBugpublic2006-02-15 09:072015-01-09 14:06
Christian Becker 
Berk Geveci 
lowminoralways
closedfixed 
 
3.14 
0002886: AVS UCD reader doesn't recognize comment lines
If AVS ucd files with comment lines (symbol #)
are used, the reader doesn't recognize the
file information without any error message.
No tags attached.
? cellsnd.ascii.reader-chokes-on-empty-comment.inp (1,171) 2011-06-29 15:44
https://www.vtk.org/Bug/file/8960/cellsnd.ascii.reader-chokes-on-empty-comment.inp
? cellsnd.ascii.reader-chokes-on-excessive-comment-length.inp (1,271) 2011-06-29 15:44
https://www.vtk.org/Bug/file/8961/cellsnd.ascii.reader-chokes-on-excessive-comment-length.inp
patch 0001-BUG-Fix-for-BUG-2886.-AVS-UCD-reader-could-choke-on-.patch (1,356) 2011-06-29 15:45
https://www.vtk.org/Bug/file/8962/0001-BUG-Fix-for-BUG-2886.-AVS-UCD-reader-could-choke-on-.patch
Issue History
2009-12-09 14:51Berk GeveciProject@3@ => ParaView
2009-12-09 17:22Berk GeveciPrioritynormal => low
2009-12-09 17:22Berk GeveciCategory => Bug
2011-06-29 15:42Sven BuijssenNote Added: 0026914
2011-06-29 15:44Sven BuijssenFile Added: cellsnd.ascii.reader-chokes-on-empty-comment.inp
2011-06-29 15:44Sven BuijssenFile Added: cellsnd.ascii.reader-chokes-on-excessive-comment-length.inp
2011-06-29 15:45Sven BuijssenFile Added: 0001-BUG-Fix-for-BUG-2886.-AVS-UCD-reader-could-choke-on-.patch
2012-02-28 04:26Sven BuijssenNote Added: 0028325
2012-02-28 04:26Sven BuijssenStatusexpired => closed
2012-02-28 04:26Sven BuijssenResolutionopen => fixed
2012-02-28 04:26Sven BuijssenFixed in Version => 3.14
2015-01-09 14:04Robert MaynardSource_changeset_attached => VTK master 69dd488d
2015-01-09 14:04Robert MaynardSource_changeset_attached => VTK master c1fd00a2
2015-01-09 14:06Utkarsh AyachitSource_changeset_attached => VTK master 55be43b6

Notes
(0026914)
Sven Buijssen   
2011-06-29 15:42   
I'm familiar with the issue the original reporter tried to explain and will try to be more specific:

The reader silently chokes on
1) empty comment lines (i.e. comment character in column 1 and no trailing white space)
2) comment lines of excessive length (i.e. > 100 characters)

1) is due to
      this->FileStream->get(buf, 100, '\n');
in vtkAVSucdReader.cxx:226 setting the failbit flag as soon as an empty comment line is found. Subsequent parsing then fails due to !this->FileStream->good()

In both cases subsequent attempts to read the number of nodes/cells/node fields etc. set all of these variables to zero such that the user ends up with no data being imported at all.

I'll attach an example file for either case (both files are derived from VTK_Data/Data/cellsnd.ascii.inp) and a suggested patch.
(0028325)
Sven Buijssen   
2012-02-28 04:26   
c1fd00a BUG: Fix for BUG 0002886. AVS UCD reader could choke on comments