Skip to content

BUG: Fix X Error during shutdown on Linux

Connor Bowley requested to merge connor.bowley/iMSTK:fix-xerror-linux into master

On Linux occasionally during shutdown of an iMSTK app, the following error would appear:

X Error of failed request: BadWindow (invalid Window parameter)

I believe this error came from trying to run another iren->ProcessEvents call after Finalizing the vtkRenderWindow (which destroys the X Window on Linux).

After moving the Finalize call on the vtkRenderWindow to after the final ProcessEvents, I have not seen the error through repeated runs of the same application I originally saw the error on.

@harald.scheirich @andrew.wilson I have not tested this change on Windows or Mac. If you could run this change through its paces on those platforms, I would appreciate it.

Merge request reports