Page MenuHomePhabricator

Application crashes on exit
Closed, ResolvedPublic

Description

On quitting the application there is sometimes a crash in the QmitkFileSaveaction.

The following behaviour does mostly reproduce the crash:

  1. Delete temporary files
  2. Start application
  3. Open View Navigator
  4. Randomly open several perspectives using it
  5. Open a couple of views using it
  6. Close application

Crash happens in

~QmitkFileSaveActionPrivate()

{
  m_Window.Lock()->GetSelectionService()->RemoveSelectionListener(m_SelectionListener);
}

the second time it is called.

It seems to be always be called two time. Usually both times m_Window is valid. When a crash happens m_Window is Null the second time the destructor is called.

Event Timeline

Currently, there may be two different instances of QmitkFileSaveAction. One for the application menu and the second for the context menu in the data manager.

The action by default has a Qt parent which out-lives a workbench window, so adding a simple NULL check inside the QmitkFileSaveAction desctructor should do the trick.

User zelzer has pushed new remote branch:

bug-18368-file-save-action-may-use-nullptr

[31eba3]: Merge branch 'bug-18368-file-save-action-may-use-nullptr'

Merged commits:

2014-10-28 22:52:58 Sascha Zelzer [7268a4]
Check if workbench window still exists.

@Caspar Could you please try to reprodcue the crash with the fix?

Can no longer reproduce, seems to be fixed.