Page MenuHomePhabricator | MITK

Crash on hitting 'F1' on already opened help window (Linux)
Closed, ResolvedPublic

Description

How to reproduce:

(1) Start mitkWorkbench
(2) Open the context help (F1)
(3) Hit F1 in the help editor window
(4) When attempting to close the editor ( by the X ), the application crashes:

[Wed May 13 13:37:22 2015
0.376] Logfile: /home/hering/.local/share/DKFZ/MITK Workbench_2439886502/data/9/mitk-0.log
[0.635] [BlueBerry] BlueBerry Workbench ready
[1.713] [BlueBerry] Context help url invalid: qthelp://org.mitk.gui.qt.stdmultiwidgeteditor/bundle/org_mitk_editors_stdmultiwidget.html
[1.789] [BlueBerry] Context help url invalid: qthelp://org.blueberry.ui.qt.help/bundle/org_blueberry_editors_help.html
#1.794# [BlueBerry] ERROR: Problem detected with part org.blueberry.editors.help(class = berry::HelpEditor): Editor is not firing a PROP_INPUT event in response to IReusableEditor.setInput(...)
Aborted (core dumped)

Event Timeline

Can not reproduce on windows.

Even the workflow:

  1. Select display tab -> open context help
  2. Hit F1
  3. Close Editor

does not crash on windows (but it does on linux).

Console log on windows:

First F1 press:
BlueBerry: Context help url invalid: qthelp://org.blueberry.ui.qt.help/bundle/org_blueberry_editors_help.html

Second F1 press:
BlueBerry ERROR: Problem detected with part org.blueberry.editors.help(class = berry::HelpEditor): Editor is not firing a PROP_INPUT event in response to IReusableEditor.setInput(...)

Every Subsequent F1 presses:
BlueBerry: Context help url invalid: qthelp://org.blueberry.ui.qt.help/bundle/org_blueberry_editors_help.html

kislinsk triaged this task as Normal priority.Aug 10 2016, 4:59 AM
kislinsk edited projects, added MITK (2016-11); removed MITK.
kislinsk renamed this task from Crash on hitting 'F1' on already opened help window to Crash on hitting 'F1' on already opened help window (Linux).Oct 28 2016, 1:24 PM
eisenman moved this task from 2016-11 to Bugsquashing - In Progress on the MITK board.
eisenman edited projects, added MITK; removed MITK (2016-11).

This bug still occurs under Linux.

The workbench crashes due to a segmentation fault during a dynamic cast in the comparison operator of the class DataStorageEditorInput.

The above mentioned steps don't exactly describe the way to reproduce this bug on my Linux system.

Here's the update:

  • Press F1
  • Close help window
  • Press F1 twice
  • Close help window

--> Workbench crashes

berry::WorkbenchSourceProvider is the class from which the comparison (newShowInInput != lastShowInInput) leading to the segmentation fault is triggered.

if (newShowInInput != lastShowInInput)
{
  sources |= ISources::ACTIVE_SITE();
  lastShowInInput = newShowInInput.GetPointer();
}

The comparison is only used to manage the sources variable. Maybe there's an alternative way for managing that? If this check is omitted, I cannot reproduce this bug anymore.

This bug can be solved by using a SmartPointer for member variable lastShowInInput instead of a standard pointer.

eisenman closed this task as Resolved.Feb 17 2017, 2:07 PM