MouseMove event handling in parallel coordinates charts can lead to crash
Under specific circumstances, vtkChartParallelCoordinates
can cause a vector access with an index of -1 to this->Storage->Axes
in its MouseMoveEvent
method.
The quick fix I applied locally for me to prevent this issue from crashing our application is to insert a check in Charts/Core/vtkChartParallelCoordinates.cxx, line 513 (in vtk 8.1.2), like this:
else if (mouse.GetButton() == this->Actions.Pan())
{
+ if (this->Storage->CurrentAxis == -1)
+ return true;
vtkAxis* axis = this->Storage->Axes[this->Storage->CurrentAxis];
Not 100% sure about the exact cause why CurrentAxis would be -1 yet, but in our case, it most often occurs after we close a dialog, where closing triggers the contents of the parallel coordinates to change.
Hope this helps; let me know whether we are maybe doing something wrong in the first place to even get to this situation where CurrentAxis can be -1 in MouseMoveEvent
? Maybe some situation where the mouse is moved with left button down, but the initial button press was not caught by the parallel coordinates...