Skip to content

Always clear DisplayId in CloseDisplay

David Gobbi requested to merge dgobbi/vtk:xwindow-close-display into master

There was a bug when vtkXRenderWindowInteractor owned the display, because the interactor would close the display in its Finalize() method and leave vtkXOpenGLRenderWindow with a dangling DisplayId pointer.

To fix this, the window's Finalize() method (which is called by the interactor's Finalize() method) must clear the window's DisplayId.

See the following discussion for additional info: https://discourse.vtk.org/t/seg-faults-on-render-call/9803

Addendum: the interactor's Finalize() method had similar problems. It could potentially leave DisplayId as a dangling pointer, and it put the interactor into a unusable state from which it could not be re-initialized (re-initialization is necessary to put it back into the Instances set so that it is able to receive events).

Backport: release

Edited by David Gobbi

Merge request reports