Import 2017-06-07 23:51:09: master 6628ff87

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-07-17 02:51:10 master bddaad81
Changeset

BUG: Fix uninitialized value issue in qMRMLTransformSliders

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:

==1972== Conditional jump or move depends on uninitialised value(s)
==1972== at 0x5EB79E1: qMRMLTransformSliders::setTypeOfTransform(qMRMLTransformSliders::TransformType) (qMRMLTransformSliders.cxx:131)
==1972== by 0x5EB753C: qMRMLTransformSliders::qMRMLTransformSliders(QWidget) (qMRMLTransformSliders.cxx:71)
==1972== by 0x10930B917: Ui_qSlicerTransformsModuleWidget::setupUi(qSlicerWidget
) (ui_qSlicerTransformsModuleWidget.h:163)
==1972== by 0x109307D16: qSlicerTransformsModuleWidget::setup() (qSlicerTransformsModuleWidget.cxx:117)
==1972== by 0x8E83A6A: qSlicerAbstractModuleRepresentation::setModule(qSlicerAbstractCoreModule) (qSlicerAbstractModuleRepresentation.cxx:82)
==1972== by 0x8E73522: qSlicerAbstractCoreModule::createNewWidgetRepresentation() (qSlicerAbstractCoreModule.cxx:258)
==1972== by 0x8E733BB: qSlicerAbstractCoreModule::widgetRepresentation() (qSlicerAbstractCoreModule.cxx:226)
==1972== by 0x59554F6: qSlicerModulePanel::addModule(qSlicerAbstractCoreModule
) (qSlicerModulePanel.cxx:145)
==1972== by 0x595547C: qSlicerModulePanel::setModule(qSlicerAbstractCoreModule) (qSlicerModulePanel.cxx:131)
==1972== by 0x59553BB: qSlicerModulePanel::setModule(QString const&) (qSlicerModulePanel.cxx:109)
==1972== by 0x59B025B: qSlicerModulePanel::qt_static_metacall(QObject
, QMetaObject::Call, int, void) (moc_qSlicerModulePanel.cxx:53)
==1972== by 0x20AE9DC9: QMetaObject::activate(QObject, QMetaObject const, int, void
) (in /home/jcfr/Support/qt-everywhere-opensource-release-build-4.8.6/lib/libQtCore.so.4.8.6)

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24449 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Libs/MRML/Widgets/qMRMLTransformSliders.cxx Diff File