Changeset |
BUG: Fix uninitialized value issue in vtkNRRDReader
This commit fixes the error(s) reported below by valgrind memcheck tool.
Valgrind was used on Ubuntu 14.04 against a Debug build of Slicer. It was
executed doing the following:
(1) Start a terminal with the appropriate environment: ./Slicer --gnome-terminal
(2) Start Slicer using valgrind: valgrind --log-file=2015-07-16-Slicer-memcheck.txt --tool=memcheck --leak-check=yes ./bin/SlicerApp-real --disable-python
(3) Load MRHead.nrrd file
(4) Exit Slicer and inspect valgrind log file
Valgrind error:
==581== Conditional jump or move depends on uninitialised value(s)
==581== at 0x1E7585AF: vtkNRRDReader::SetPointDataType(int) (in /home/jcfr/Projects/Slicer-Debug/Slicer-build/bin/libvtkTeem.so)
==581== by 0x1E74F0FF: vtkNRRDReader::ExecuteInformation() (vtkNRRDReader.cxx:346)
==581== by 0x23AD4531: vtkImageReader2::RequestInformation(vtkInformation*, vtkInformationVector, vtkInformationVector) (vtkImageReader2.cxx:484)
==581== by 0x291481B8: vtkImageAlgorithm::ProcessRequest(vtkInformation, vtkInformationVector, vtkInformationVector) (vtkImageAlgorithm.cxx:109)
==581== by 0x2913BB9B: vtkExecutive::CallAlgorithm(vtkInformation, int, vtkInformationVector, vtkInformationVector) (vtkExecutive.cxx:775)
==581== by 0x29134493: vtkDemandDrivenPipeline::ExecuteInformation(vtkInformation, vtkInformationVector, vtkInformationVector) (vtkDemandDrivenPipeline.cxx:480)
==581== by 0x29159FCD: vtkStreamingDemandDrivenPipeline::ExecuteInformation(vtkInformation, vtkInformationVector, vtkInformationVector) (vtkStreamingDemandDrivenPipeline.cxx:412)
==581== by 0x29133AF6: vtkDemandDrivenPipeline::ProcessRequest(vtkInformation, vtkInformationVector, vtkInformationVector) (vtkDemandDrivenPipeline.cxx:237)
==581== by 0x29159D60: vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation, vtkInformationVector*, vtkInformationVector) (vtkStreamingDemandDrivenPipeline.cxx:335)
==581== by 0x2913407A: vtkDemandDrivenPipeline::UpdateInformation() (vtkDemandDrivenPipeline.cxx:405)
==581== by 0x29126865: vtkAlgorithm::UpdateInformation() (vtkAlgorithm.cxx:1478)
==581== by 0x1067960EC: vtkMRMLMultiVolumeStorageNode::ReadDataInternal(vtkMRMLNode*) (vtkMRMLMultiVolumeStorageNode.cxx:89)
git-svn-id: http://svn.slicer.org/Slicer4/trunk@24448 3bd1e089-480b-0410-8dfb-8563597acbee |