Page MenuHomePhabricator

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



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

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


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

Thanks a lot,