Page MenuHomePhabricator

Image statistics crash when closed and reopened
Closed, ResolvedPublic

Description

Steps to reproduce the crash:

  1. Open Workbench
  2. Open ImageStatistics
  3. Close ImageStatistics
  4. Open ImageStatistics again
  5. Load any image

> CRASH

Event Timeline

Could not reproduce this on Linux (Arch 64bit)

Crashes on Ubuntu 12.04. 64 bit

The variable m_StatisticsUpdatePending seems to be overwritten by random values.

Moving the method content from PartClosed(...) to Deactivated() in QmitkImageStatisticsView solves the problem.

It is necessary to remove the observer in SliceNavigationController every time the widget is closed. Removing the Observer in PartClosed(...) ensures a clean destruction at program end, but does not ensure a reliable state when the widget is reused within the same program session.

Sorry, Deactivated() is inappropriate because it is triggered at focus change.

We might think about adding the observer in Visible() and removing it in Hidden(). This worked well with a 4D data set; further investigation is still necessary.

User goerres has pushed new remote branch:

bug-17665-ImageStatisticsNavigationObserver

Current release is finished. Resetting target milestone

[c696b7]: Merge branch 'bug-17665-ImageStatisticsNavigationObserver'

Merged commits:

2014-04-09 17:46:23 Joseph Görres [bcd0d3]
moved the insertion and removal of the navigation observer to the visible- and hidden- slots