OpenGL State Errors with QVTKOpenGLWidget

Hello Guys,

I have a problem in visualizing point cloud with QVTKOpenGLWidget. I promoted the QWidget to QVTKOpenGLWidget and load point cloud data to the Widget. As soon as the MainWindow is appeared, the following error are shown;

Generic Warning: In /home/Software/vtk-v8.2.0/Rendering/OpenGL2/vtkOpenGLState.cxx, line 401
Error glClearDepth1 OpenGL errors detected
  0 : (1282) Invalid operation

 with stack trace of
0x7fb2c7f36c : vtksys::SystemInformationImplementation::GetProgramStack[abi:cxx11](int, int) [(libvtksys-8.2.so.1) ???:-1]
0x7fb2c79e44 : vtksys::SystemInformation::GetProgramStack[abi:cxx11](int, int) [(libvtksys-8.2.so.1) ???:-1]
0x7fb43741ec : ??? [(???) ???:-1]
0x7fb4374a0c : vtkOpenGLState::vtkglClearDepth(double) [(libvtkRenderingOpenGL2-8.2.so.1) ???:-1]
0x7fb435d5dc : vtkOpenGLRenderer::Clear() [(libvtkRenderingOpenGL2-8.2.so.1) ???:-1]
0x7fb42a3850 : vtkOpenGLCamera::Render(vtkRenderer*) [(libvtkRenderingOpenGL2-8.2.so.1) ???:-1]
0x7fb482fbc0 : vtkRenderer::UpdateCamera() [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7fb435b4f0 : vtkOpenGLRenderer::DeviceRender() [(libvtkRenderingOpenGL2-8.2.so.1) ???:-1]
0x7fb482f540 : vtkRenderer::Render() [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7fb482cc58 : vtkRendererCollection::Render() [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7fb484a704 : vtkRenderWindow::DoStereoRender() [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7fb484a4fc : vtkRenderWindow::Render() [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7fb4357390 : vtkOpenGLRenderWindow::Render() [(libvtkRenderingOpenGL2-8.2.so.1) ???:-1]
0x7fb428e014 : vtkGenericOpenGLRenderWindow::Render() [(libvtkRenderingOpenGL2-8.2.so.1) ???:-1]
0x7fb48579a0 : vtkRenderWindowInteractor::Render() [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7fb4a6ee28 : QVTKOpenGLWindow::paintGL() [(libvtkGUISupportQt-8.2.so.1) ???:-1]
0x7fb25f0744 : QPaintDeviceWindow::exposeEvent(QExposeEvent*) [(libQt5Gui.so.5) ???:-1]

But PCD file can be loaded successfully, and point cloud is shown but the program is crashed after mouse click in the widget for about five times. The following errors is show for all mouse event (mouse move, mouse press, mouse release and wheel movement) in the widget;

Generic Warning: In /home/Software/vtk-v8.2.0/Rendering/OpenGL2/vtkOpenGLState.cxx, line 401
Error glClearDepth1 OpenGL errors detected
  0 : (1282) Invalid operation

 with stack trace of
0x7f8f8e436c : vtksys::SystemInformationImplementation::GetProgramStack[abi:cxx11](int, int) [(libvtksys-8.2.so.1) ???:-1]
0x7f8f8dee44 : vtksys::SystemInformation::GetProgramStack[abi:cxx11](int, int) [(libvtksys-8.2.so.1) ???:-1]
0x7f90fd91ec : ??? [(???) ???:-1]
0x7f90fd9a0c : vtkOpenGLState::vtkglClearDepth(double) [(libvtkRenderingOpenGL2-8.2.so.1) ???:-1]
0x7f90fc25dc : vtkOpenGLRenderer::Clear() [(libvtkRenderingOpenGL2-8.2.so.1) ???:-1]
0x7f90f08850 : vtkOpenGLCamera::Render(vtkRenderer*) [(libvtkRenderingOpenGL2-8.2.so.1) ???:-1]
0x7f91494bc0 : vtkRenderer::UpdateCamera() [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7f90fc04f0 : vtkOpenGLRenderer::DeviceRender() [(libvtkRenderingOpenGL2-8.2.so.1) ???:-1]
0x7f91494540 : vtkRenderer::Render() [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7f91491c58 : vtkRendererCollection::Render() [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7f914af704 : vtkRenderWindow::DoStereoRender() [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7f914af4fc : vtkRenderWindow::Render() [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7f90fbc390 : vtkOpenGLRenderWindow::Render() [(libvtkRenderingOpenGL2-8.2.so.1) ???:-1]
0x7f90ef3014 : vtkGenericOpenGLRenderWindow::Render() [(libvtkRenderingOpenGL2-8.2.so.1) ???:-1]
0x7f914bc9a0 : vtkRenderWindowInteractor::Render() [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7f91645148 : vtkInteractorStyleTrackballCamera::Rotate() [(libvtkInteractionStyle-8.2.so.1) ???:-1]
0x7f91644690 : vtkInteractorStyleTrackballCamera::OnMouseMove() [(libvtkInteractionStyle-8.2.so.1) ???:-1]
0x7f91521024 : vtkInteractorStyle::ProcessEvents(vtkObject*, unsigned long, void*, void*) [(libvtkRenderingCore-8.2.so.1) ???:-1]
0x7f921b73e4 : vtkCallbackCommand::Execute(vtkObject*, unsigned long, void*) [(libvtkCommonCore-8.2.so.1) ???:-1]
0x7f9240354c : ??? [(???) ???:-1]
0x7f92403c8c : vtkObject::InvokeEvent(unsigned long, void*) [(libvtkCommonCore-8.2.so.1) ???:-1]
0x7f916a9870 : QVTKInteractorAdapter::ProcessEvent(QEvent*, vtkRenderWindowInteractor*) [(libvtkGUISupportQt-8.2.so.1) ???:-1]
0x7f916d47d0 : QVTKOpenGLWindow::ProcessEvent(QEvent*) [(libvtkGUISupportQt-8.2.so.1) ???:-1]
0x7f916d462c : QVTKOpenGLWindow::mouseMoveEvent(QMouseEvent*) [(libvtkGUISupportQt-8.2.so.1) ???:-1]
0x7f8f22bce8 : QWindow::event(QEvent*) [(libQt5Gui.so.5) ???:-1]

I am using in::

  • Ubuntu 18.04
  • Qt 5.9.5
  • PCL 1.12
  • Vtk 8.2.0

Please give me any suggestions.

Best regards,