SimpleITK / SlicerSimpleFilters

A Module for Slicer3D to provide a simple GUI to image filters from the Insight Toolkit.
Other
1 stars 12 forks source link

BUG: Fix crash when switching between filters #10

Closed lassoan closed 6 years ago

lassoan commented 6 years ago

In Slicer-4.9 (with Qt5), SimpleFilters module made Slicer crash when switching to a widget that contains ctkCoordinatesWidget. For example, switching to AdaptiveHistogramEqualizationImageFilter and then to another filter caused crash.

The problem was caused by destroying ctkCoordinateWidget while still having connections.

Fixed by removing all connections of filter parameter widgets before the widgets are destroyed.

blowekamp commented 6 years ago

Thanks for the patch. I was off yesterday. Just starting to spin up on this issue...

blowekamp commented 6 years ago

@jcfr @lassoan Was this ever updated in Slicer master?

jcfr commented 6 years ago

Not yet. Would be great if someone could take care of it.

I was out at a hackathon last week and now in vacation.

On Tue, Apr 10, 2018, 2:46 PM Bradley Lowekamp notifications@github.com wrote:

@jcfr https://github.com/jcfr @lassoan https://github.com/lassoan Was this ever updated in Slicer master?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SimpleITK/SlicerSimpleFilters/pull/10#issuecomment-380224190, or mute the thread https://github.com/notifications/unsubscribe-auth/AANXo9dYeoHBYUsiji353UiVRf6_pQ3eks5tnQwHgaJpZM4TAxAT .

lassoan commented 6 years ago

I'll take care of it.

lassoan commented 6 years ago

Fixed in rev 27138.

The update has fixed py_SimpleFiltersModuleTest, which has been failing for a long time.

blowekamp commented 6 years ago

Thanks again to fixing this. I still don't understand the origins of this problem and where the behavior changed.

I thought that with Qt slot and signals, when were automatically deleted when the QtObject emitting the signal was deconstructed. So the need for this fix just seems little odd to me and makes me thing there may be something improper with the destructor of the ctkCoordinateWidget.

lassoan commented 6 years ago

I don't understand the root cause either and why the problem is only with ctkCoordinateWidget. The issue came up when we switched to Qt5.