Page MenuHomePhabricator

QmitkImageNavigatorView : missing a named renderWindow crash the application.
Closed, ResolvedPublic

Description

Hello,

I encountered a bug while porting my code from 2014.10 to 2015.05.2.

Incriminated lines in file "Plugins/org.mitk.gui.qt.imagenavigator/src/internal/QmitkImageNavigatorView.cpp", function "QmitkImageNavigatorView::SetBorderColors" :
208 QmitkRenderWindow* renderWindow = m_IRenderWindowPart->GetQmitkRenderWindow("axial");
209 QString decoColor = GetDecorationColorOfGeometry(renderWindow);
210 if (renderWindow)
211 {

(and following calls to GetDecorationColorOfGeometry in the same function)

In my custom editor, I removed the 3rd window, named "coronal". The GetQmitkRenderWindow return a nullptr, and GetDecorationColorOfGeometry try to access it without null check.

The fix would be to either move the call to the function inside the "if(renderWindow)" section, or add a nullptr check in GetDecorationColorOfGeometry.

AFAIK, the bug is still present in the latest git commit (4d544bec0b86f7780021ce5dfcc8d66ccb2cdd5c).

Event Timeline

rosst added a subscriber: rosst.Dec 2 2015, 3:17 PM

Hello Pierreyves,

thank you for your bug report. We moved the decoColor into the if-statement as you suggested. Please try if it works with you now.

Best wishes
Tobias and Nils

menguy added a subscriber: menguy.Dec 7 2015, 7:46 PM

Hello,

Sorry for the delay, I can confirm it now works as expected.

Thanks a lot,

Pierre-Yves.

kislinsk edited projects, added MITK (2016-03); removed MITK.Aug 1 2016, 10:49 PM