Page MenuHomePhabricator

Application crashes on closing with active Segmentation and Measurement View
Closed, ResolvedPublic

Description

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.

Event Timeline

New remote branch pushed: bug-13985-Crash-on-deleting-measurement-objects

Critical bug ( app crash ). Target milestone 2012.12?? Requesting release flag

[7adf02]: Merge branch 'bug-13985-Crash-on-deleting-measurement-objects'

Merged commits:

2012-12-12 16:27:53 Jan Hering [b26a58]
Check object's validity before erasing

  • check if the map holding planar figures is not empty before searching
  • test the iterator returned by find() method for != map::end

Tested manually on Linux & Win. Nightlies ok. Closing bug.