View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003160VTK(No Category)public2006-04-25 02:252016-08-12 09:54
ReporterBernd Hentschel 
Assigned ToDavid Partyka 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003160: vtkDataReader crash with VC .NET 2005
DescriptionTrying to read an "empty" VTK-File (either file or string input), e.g. the representation of an empty vtkPolyData object (no points, no cells, just the header), a test app crashes inside the read operation. The reason for this is the "new" STL-implementation shipped with .NET2005. A lot of calls there are using assertions to ensure proper input parameters. In particular istream::read(*readbuffer,numbytes) now asserts that the input read pointer be != NULL. This caused the crash mentioned above, since eventually a NULL pointer is passed to read (in template <class T> int vtkReadBinaryData(istream *IS, T *data, int numTuples, int numComp)).
In the "old" STL implementation this was no problem. A NULL-pointer was only passed to calls which didn't read anything from the istream either, so in effect nothing was written to the invalid address. I include a possible fix for this here, introducing a sanity check into vtkReadBinaryData in vtkDataReader.cxx, resulting in the code attached to this report.
I got this problem with vtk4.2.6 but it does not seem to be fixed in vtk5 either. Moreover, it is likely that this does not only apply to empty polydata but also to other (empty) data object classes because the respective reader classes also rely on vtkDataReader's functionality.
BTW: Nobody seems to care about the return value of vtkReadBinaryData. I don't know if this should be called a design issue.
TagsNo tags attached.
Project
Type
Attached Filescxx file icon vtkDataReaderFix.cxx [^] (541 bytes) 1969-12-31 19:00

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0031298)
Dave DeMarle (administrator)
2013-07-22 20:33

Dave P no longer works on the project. If these old issues still exist in 6.0.0, reopen them and assign to Dave DeMarle
(0036860)
Kitware Robot (administrator)
2016-08-12 09:54

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

- Issue History
Date Modified Username Field Change
2008-11-30 09:10 Mathieu Malaterre Assigned To Mathieu Malaterre => David Cole
2011-01-19 09:54 David Cole Assigned To David Cole => David Partyka
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2013-07-22 20:33 Dave DeMarle Status backlog => expired
2013-07-22 20:33 Dave DeMarle Note Added: 0031298
2016-08-12 09:54 Kitware Robot Note Added: 0036860
2016-08-12 09:54 Kitware Robot Status expired => closed
2016-08-12 09:54 Kitware Robot Resolution open => moved


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker