How to reproduce:
- Load an image
- Create a segmentation on that image
- Activate the measurement view and select the image ( so that it appears in the measurement view GUI)
- close the application --> hangs in Debug Mode, double free/corruption on Release
Reason:
The QmitkMeasurementView::NodeRemoved is called, the GetDerivations call with TNodePredicateDataType< PlanarFigure > is not empty ( the 3d interp contours ?? ) and the view makes an attept to remove the figures from the d->m_DataNodeToPlanarFigureData member map. But the map object is empty ( because the nodes were not created by the measurement view) but still the erase method is called on a invalid map::iterator.
Proposed solution:
Check the validity of the d->m_DataNodeToPlanarFigureData object and of the iterator object returned by the find() method.