A slew of OpenGL errors reported in VTK version 8.2.0, static libs, Windows

I used -DBUILD_SHARED_LIBS:BOOL=“0” to build a static lib version of 8.2.0

I built debug libs using Visual Studio 2017. I used the cmake-gui to configure, generate, and open the generated solution and built the libs using debug x64 option

I built a separate dll project (it displays 3D, volume, and 2D, slice, images) and referenced all the static VTK libs plus opengl32.lib and Dbghelp.lib.

I then built an app that uses my dll to display 3D 2D and images.

Things work OK but I see a slew of OpenGL errors reported in the window that VTK displays to show text messages. This makes my display updates run very slowly.

Nothing has gone bang, yet, it’s just irritating and I couldn’t release the software and we have a release scheduled for next month.

Here is a sample of the output:

Generic Warning: In D:\VTK-8.2.0\Rendering\OpenGL2\vtkOpenGLState.cxx, line 617
Error glEnable/Disable1 OpenGL errors detected
0 : (1286) Invalid framebuffer operation

with stack trace of
at `anonymous namespace’::reportOpenGLErrors in d:\vtk-8.2.0\rendering\opengl2\vtkopenglstate.cxx line 256
at vtkOpenGLState::SetEnumState in d:\vtk-8.2.0\rendering\opengl2\vtkopenglstate.cxx line 617
at vtkOpenGLState::vtkglEnable in d:\vtk-8.2.0\rendering\opengl2\vtkopenglstate.cxx line 655
at vtkOrderIndependentTranslucentPass::Render in d:\vtk-8.2.0\rendering\opengl2\vtkorderindependenttranslucentpass.cxx line 340
at vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry in d:\vtk-8.2.0\rendering\opengl2\vtkopenglrenderer.cxx line 477
at vtkOpenGLRenderer::UpdateGeometry in d:\vtk-8.2.0\rendering\opengl2\vtkopenglrenderer.cxx line 337
at vtkOpenGLRenderer::DeviceRender in d:\vtk-8.2.0\rendering\opengl2\vtkopenglrenderer.cxx line 236
at vtkRenderer::Render in d:\vtk-8.2.0\rendering\core\vtkrenderer.cxx line 372
at vtkRendererCollection::Render in d:\vtk-8.2.0\rendering\core\vtkrenderercollection.cxx line 53
at vtkRenderWindow::DoStereoRender in d:\vtk-8.2.0\rendering\core\vtkrenderwindow.cxx line 333
at vtkRenderWindow::Render in d:\vtk-8.2.0\rendering\core\vtkrenderwindow.cxx line 292

ERROR: In D:\VTK-8.2.0\Rendering\OpenGL2\vtkOpenGLActor.cxx, line 112
vtkOpenGLActor (00000296BF824040): failed after Render 1 OpenGL errors detected
0 : (1286) Invalid framebuffer operation

I should mention that I commented out a call to vtkCheckOpenGLErrorsWithStack(“glDepthMask”); on line 427 of vtkOpenGLState.cxx to see the errors in the post above.

With the line non commented out I see this instead:

Generic Warning: In D:\VTK-8.2.0\Rendering\OpenGL2\vtkOpenGLState.cxx, line 617
Error glEnable/Disable1 OpenGL errors detected
0 : (1286) Invalid framebuffer operation

with stack trace of
at `anonymous namespace’::reportOpenGLErrors in d:\vtk-8.2.0\rendering\opengl2\vtkopenglstate.cxx line 256
at vtkOpenGLState::SetEnumState in d:\vtk-8.2.0\rendering\opengl2\vtkopenglstate.cxx line 617
at vtkOpenGLState::vtkglEnable in d:\vtk-8.2.0\rendering\opengl2\vtkopenglstate.cxx line 655
at vtkOrderIndependentTranslucentPass::Render in d:\vtk-8.2.0\rendering\opengl2\vtkorderindependenttranslucentpass.cxx line 340
at vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry in d:\vtk-8.2.0\rendering\opengl2\vtkopenglrenderer.cxx line 477
at vtkOpenGLRenderer::UpdateGeometry in d:\vtk-8.2.0\rendering\opengl2\vtkopenglrenderer.cxx line 337
at vtkOpenGLRenderer::DeviceRender in d:\vtk-8.2.0\rendering\opengl2\vtkopenglrenderer.cxx line 236
at vtkRenderer::Render in d:\vtk-8.2.0\rendering\core\vtkrenderer.cxx line 372
at vtkRendererCollection::Render in d:\vtk-8.2.0\rendering\core\vtkrenderercollection.cxx line 53
at vtkRenderWindow::DoStereoRender in d:\vtk-8.2.0\rendering\core\vtkrenderwindow.cxx line 333
at vtkRenderWindow::Render in d:\vtk-8.2.0\rendering\core\vtkrenderwindow.cxx line 292

Generic Warning: In D:\VTK-8.2.0\Rendering\OpenGL2\vtkOpenGLState.cxx, line 427
Error glDepthMask1 OpenGL errors detected
0 : (1286) Invalid framebuffer operation

with stack trace of
at `anonymous namespace’::reportOpenGLErrors in d:\vtk-8.2.0\rendering\opengl2\vtkopenglstate.cxx line 256
at vtkOpenGLState::vtkglDepthMask in d:\vtk-8.2.0\rendering\opengl2\vtkopenglstate.cxx line 427
at vtkOpenGLActor::Render in d:\vtk-8.2.0\rendering\opengl2\vtkopenglactor.cxx line 112
at vtkActor::RenderTranslucentPolygonalGeometry in d:\vtk-8.2.0\rendering\core\vtkactor.cxx line 261
at vtkAssembly::RenderTranslucentPolygonalGeometry in d:\vtk-8.2.0\rendering\core\vtkassembly.cxx line 121
at vtkProp::RenderFilteredTranslucentPolygonalGeometry in d:\vtk-8.2.0\rendering\core\vtkprop.cxx line 296
at vtkDefaultPass::RenderFilteredTranslucentPolygonalGeometry in d:\vtk-8.2.0\rendering\opengl2\vtkdefaultpass.cxx line 129
at vtkTranslucentPass::Render in d:\vtk-8.2.0\rendering\opengl2\vtktranslucentpass.cxx line 44
at vtkOrderIndependentTranslucentPass::Render in d:\vtk-8.2.0\rendering\opengl2\vtkorderindependenttranslucentpass.cxx line 357
at vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry in d:\vtk-8.2.0\rendering\opengl2\vtkopenglrenderer.cxx line 477
at vtkOpenGLRenderer::UpdateGeometry in d:\vtk-8.2.0\rendering\opengl2\vtkopenglrenderer.cxx line 337
at vtkOpenGLRenderer::DeviceRender in d:\vtk-8.2.0\rendering\opengl2\vtkopenglrenderer.cxx line 236
at vtkRenderer::Render in d:\vtk-8.2.0\rendering\core\vtkrenderer.cxx line 372
at vtkRendererCollection::Render in d:\vtk-8.2.0\rendering\core\vtkrenderercollection.cxx line 53
at vtkRenderWindow::DoStereoRender in d:\vtk-8.2.0\rendering\core\vtkrenderwindow.cxx line 333
at vtkRenderWindow::Render in d:\vtk-8.2.0\rendering\core\vtkrenderwindow.cxx line 292

There are a LOT of invalid framebuffer operations reported by line 427

It’s been two days and no reply from Kitware.

I am reporting a bug, the bug makes it impossible for me to ship with version 8.2 of VTK. I have a deadline coming up.

I expected a prompt response.

I expected some combination of:

  • a request for clarification or more data
  • a work around
  • a fix

I have an NVIDIA Quadro M1000M, the NVIDIA control panel can save a complete description of my system? Do you want it? Where can I upload it?

Is this the correct place to report bugs?

GitLab Issues is where to report bugs: https://gitlab.kitware.com/vtk/vtk/issues

This forum is for discussion of VTK development.

I wouldn’t call two days a slow response, unless you’re paying for support. Two weeks maybe…

I’ve had bug reports go unanswered for months in other open source projects. Not saying that is good of course, but I would never expect a reply within two days.

@jmcauley these errors should go away if you configure with

-DVTK_REPORT_OPENGL_ERRORS:BOOL=OFF

Thanks for the link.

The error reports go away.

I tried that flag yesterday and I tried a release build. Neither change sped up the UI (rotating models, scrolling through slices).

We have decided not to convert to 8.2 right now. We will do that after the release.