I’m trying to use the relatively new class vtkQWidgetWidget in SlicerVR (to show a Qt widget in VR that can be manipulated using a laser pointer), and I keep getting a crash when rendering the scene after adding the prop to the renderer.
I checked that the VTK test TestQWidgetWidget works, and started from that code. When I changed the creation of the Qt widget on the stack to the heap, then it crashed.
It seems that the crash happens on the first render after adding the prop. This is the log after the render call:
Python console user input: r.Render() Generic Warning: In C:\d\S4D\VTK\Rendering\OpenGL2\vtkOpenGLState.cxx, line 182 Error in cache state for GL_SCISSOR_BOX
Then it crashes. Not fully deterministically though: when I debug into the code and step slowly, it many times does not crash. Also in release mode sometimes it seems like crashing (few seconds wait), but then shows the widget as expected.
My first question is whether anybody actually used the vtkQWidgetWidget class in a real project, other than the test?