Page MenuHomePhabricator

Crash on closing MitkDiffusion Application
Closed, WontfixPublic

Description

Open MitkDiffusion and open a Perspective, close the application --> Crash!

Place of the crash:
QmitkNodeDescriptor::RemoveAction with a _Action != nullptr but only a stub, hence the call on

line 86: QObject(disconnect( _Action --- )

leads to a segmentation fault.

The class name of the Descriptor is 'ImageMask', the predicate is 'Image && Binary', the call originates from QmitkDataManagerView [NodeDescriptor]

T19690 related, but most likely only a special case of this one.

Event Timeline

Not for all views, this was due to one of the perspectives, need to check the views using some image masks (and possibly registering an Action)

One problematic detected already is the basic_image_processing, however the crash was during opening, when the view was getting focus as the first one and tried to retrieve the time navigation controller.

The basicimageprocessing issue will be explored in T19852

I am not sure the observation with _Action! = nullptr being a stub I made was correct. The object itself seems to have the same (member) variables set as the other actions.

To sum up:

there are several actions registered from the DataManager View and held by the list QmitkNodeDescriptor::m_BatchActions. During destruction of the QmitkDataManagerView, first some UnknownActions are successfully removed from the list and then disconnected before there is the attempt to disconnect the ImageMask action.

(changing the order of disconnecting and removal from the list of actions does not change the behavior)

hering lowered the priority of this task from High to Low.Aug 19 2016, 1:04 PM

The crash occurs on closing a perspective (the Diffusion perspective?), however, after using --BlueBerry.clean for the start, I could not reproduce it any more.

Tested separately all perspectives in MitkDiffusion (each after a clean start), everything works fine. Tried also several combinations of perspectives ( open multiple, close them or close the application while opened ) again without any crash.

First help in such case is the --BlueBerry.clean flag, I have reduced the task's priority as this issue is rather near to INVALID

hering added a subscriber: hering.

Still can reproduce this error-on-closing MitkDiffusion, and it persists over multiple sessions until I restart $> MitkDiffusion --BlueBerry.clean
with --BlueBerry.clean.
To me this issue smells like an off-by-one in the destructor callchain between BlueBerry and Qt. Since this issue seems to only create a coredump _on_closing_ and does not affect the session/usage/functionality of the MitkDiffusion-Workbench, as far as I can see, really low priority... but a vexing problem none the less.

...

#15 0x00007f999a28cd8a in berry::WorkbenchPage::~WorkbenchPage (this=0x310e2d0, __in_chrg=<optimized out>)
    at /home/mhettich/MITK/Plugins/org.blueberry.ui.qt/src/internal/berryWorkbenchPage.cpp:1831
1831	      QList<IWorkbenchPart::Pointer> dirtyParts;
(gdb) l
1826	      // Need to make sure model data is cleaned up when the page is
1827	      // disposed. Collect all the views on the page and notify the
1828	      // saveable list of a pre/post close. This will free model data.
1829	      QList<IWorkbenchPartReference::Pointer> partsToClose =
1830	          this->GetOpenParts();
1831	      QList<IWorkbenchPart::Pointer> dirtyParts;
1832	      for (int i = 0; i < partsToClose.size(); i++)
1833	      {
1834	        IWorkbenchPart::Pointer part = partsToClose[i]->GetPart(false);
1835	        if (part != 0 && part.Cast<IViewPart> () != 0)
(gdb) p dirtyParts
$8 = {<QListSpecialMethods<berry::SmartPointer<berry::IWorkbenchPart> >> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {
            _q_value = {<std::__atomic_base<int>> = {_M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, 
      d = 0x277d010}, d = 0x277d010}}
(gdb) p *dirtyParts
Cannot resolve function operator* to any overloaded instance
(gdb) p &dirtyParts
$9 = (QList<berry::SmartPointer<berry::IWorkbenchPart> > *) 0x7ffd46b03f50
(gdb) f 16
#16 0x00007f999a28d1b3 in berry::WorkbenchPage::~WorkbenchPage (this=0x310e2d0, __in_chrg=<optimized out>)
    at /home/mhettich/MITK/Plugins/org.blueberry.ui.qt/src/internal/berryWorkbenchPage.cpp:1905
1905	}
(gdb) l
1900	
1901	  }
1902	
1903	  // decrement reference count again, without explicit deletion
1904	  this->UnRegister(false);
1905	}
1906	
1907	void WorkbenchPage::DisposePerspective(Perspective::Pointer persp, bool notify)
1908	{
1909	  // Get rid of perspective.
(gdb)
kislinsk claimed this task.
kislinsk added a project: Auto-closed.
kislinsk added a subscriber: kislinsk.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs

kislinsk removed kislinsk as the assignee of this task.May 26 2020, 12:05 PM
kislinsk removed a subscriber: kislinsk.