MakeCurrent() error with vtkPanel using the Java wrappers under windows.
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Somtimes, when disposing a vtkPanel an error occurs in vtkWin32OpenGLRenderWindow::MakeCurrent().
(Typically a vtkOutputWindow pops up, and the application crashes out)
Code that reliable reproduces the error is here: https://github.com/lukedodd/lwjgl-vtkcanvas/blob/lwjgl-vtkcanvas/lwjglvtkcanvas/VTKMakeCurrentBugReproduce.java
In the context of a larger project I've had this error happen fairly non-deterministically. I've had someone else report that the test case crashes for them too.
This error happens under fairly similar circumstances to: http://www.vtk.org/Bug/view.php?id=12756
But the panel must have it's Delete method called prior to disposing, which judging from the source of vtkPanel is the only way to ensure memory is cleaned up.
As with bug 0012756 my alternative vtkPanel class which is based on LWJGL fixes the issue. https://github.com/lukedodd/lwjgl-vtkcanvas/tree/lwjgl-vtkcanvas/lwjglvtkcanvas
I've attached a stack trace of the MakeCurrent error.