Page MenuHomePhabricator

Closing MITK-Diffusion after Gibbs-Tracking leads to crash
Closed, ResolvedPublic

Description

Steps to reproduce:

  • Load Diff. Image
  • Start Gibbs Tracking
  • Close MITK while Gibbs Tracking is still running

-> Crash & Crash Message

Event Timeline

While this is a somewhat exotic use case, a crash is always a critical bug.

Reassigning to Peter.

Qt does not provide proper support to cancel QThreads.
The stopping of a thread has to be included in such a way that the Thread listens for a stop Signal.

I'm not sure on which level this has to be done in this case,
the itkFilter ? This would be very nasty.

We tried terminating the thread within

QmitkGibbsTrackingView::~QmitkGibbsTrackingView()

using

m_TrackingThread.exit(0); and
m_TrackingThread.quit(); and

m_TrackingThread.terminate();

but none worked.

Might need bigger design changes, or switch to Qt::Concurrent or similiar ..

User webechr has pushed new remote branch:

bug-17703-CrashFiberTracking

Using the standard way of aborting the tracking did work ..

[0a538f]: Merge branch 'bug-17703-CrashFiberTracking'

Merged commits:

2014-10-15 16:07:35 Christian Weber [6b6b41]
terminate qthread when closing of tracking plugin is requested.