[vtk-developers] EOF Errors from vtk3DSImporter

Kevin H. Hobbs hobbsk at ohio.edu
Thu Aug 8 10:33:07 EDT 2013


The vtk3DSImporter reports errors like :

ERROR: In /home/kevin/kitware/VTK/IO/Import/vtk3DSImporter.cxx, line 1083
vtk3DSImporter (0x75cd20): Pre-mature end of file in read_word

on almost every machine in the dashboard.

On some of my builds there's also a segfault that I'd like to track down
but I'd like to clear up this error first.

The errors come from failed reads of either read_word or read_dword.

I did a bit of poking around with gdb and std::cerr, and it looks like
these reads past EOF are not at all unexpected.

For example parse_face_array uses read_word to read the number of faces
and then to read what I assume are the face vertex ids: a failure here
is catastrophic.

Then even though importer->GetFileFD() could be at the end of the file
it calls start_chunk which calls both read_word and read_dword to see if
there is another (sub?)chunk to parse into.

Maybe start_chunk could call new functions with names like peek_word and
peek_dword that are just like read_word and read_dword but don't complain.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 255 bytes
Desc: OpenPGP digital signature
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130808/946a5762/attachment.sig>


More information about the vtk-developers mailing list