View Issue Details

IDProjectCategoryView StatusLast Update
0004615Slicer4Core: Renderingpublic2018-10-01 18:27
Reporterlassoan Assigned Tojcfr  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionSlicer 4.9.0 
Target VersionSlicer 4.9.0Fixed in VersionSlicer 4.9.0 
Summary0004615: VTK OpenGL2 Backend: Warnings about error in cache state for GL_SCISSOR_TEST
Description

When Slicer is built in debug mode then any render operation (even just rotating the empty box in 3D viewer) generates a long warning message.

<pre>
Generic Warning: In C:\D\S4D\VTKv9\Rendering\OpenGL2\vtkOpenGLState.cxx, line 138
Error in cache state for GL_SCISSOR_TEST

Generic Warning: In C:\D\S4D\VTKv9\Rendering\OpenGL2\vtkOpenGLState.cxx, line 229
at stack loc
at vtkOpenGLState::CheckState in c:\d\s4d\vtkv9\rendering\opengl2\vtkopenglstate.cxx line 228
at vtkOpenGLState::SetEnumState in c:\d\s4d\vtkv9\rendering\opengl2\vtkopenglstate.cxx line 552
at vtkOpenGLState::vtkglDisable in c:\d\s4d\vtkv9\rendering\opengl2\vtkopenglstate.cxx line 821
at QVTKOpenGLNativeWidget::paintGL in c:\d\s4d\vtkv9\guisupport\qt\qvtkopenglnativewidget.cxx line 534
SymGetLineFromAddr64 returned error code 487
at QStyleOptionFrame::QStyleOptionFrame

at QVTKOpenGLNativeWidget::event in c:\d\s4d\vtkv9\guisupport\qt\qvtkopenglnativewidget.cxx line 696
SymGetLineFromAddr64 returned error code 487
at QStyleOptionFrame::QStyleOptionFrame

at qSlicerApplication::notify in c:\d\s4\base\qtgui\qslicerapplication.cxx line 396
SymGetLineFromAddr64 returned error code 487
at QtPrivate::QContainerImplHelper::mid

SymGetLineFromAddr64 returned error code 487
at QStyleOptionFrame::QStyleOptionFrame
...
at qSlicerApplication::notify in c:\d\s4\base\qtgui\qslicerapplication.cxx line 396
SymGetLineFromAddr64 returned error code 487
at QtPrivate::QContainerImplHelper::mid

at CallWindowProcW
SymGetLineFromAddr64 returned error code 487
at DispatchMessageW
SymGetLineFromAddr64 returned error code 487
at QtPrivate::QContainerImplHelper::mid
SymGetLineFromAddr64 returned error code 487
at qt_plugin_query_metadata
SymGetLineFromAddr64 returned error code 487
at QtPrivate::QContainerImplHelper::mid

SymGetLineFromAddr64 returned error code 487
at QOpenGLFunctions_4_2_Core::glGetVertexAttribLdv
SymGetLineFromAddr64 returned error code 487
at QStyleOptionFrame::QStyleOptionFrame
at `anonymous namespace'::SlicerAppMain in c:\d\s4\applications\slicerapp\main.cxx line 58
at main in c:\d\s4\base\qtapp\qslicerapplicationmainwrapper.cxx line 57
at invoke_main in f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl line 65
at scrt_common_main_seh in f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl line 253
at
scrt_common_main in f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl line 296
at mainCRTStartup in f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp line 17
</pre>

TagsNo tags attached.

Relationships

related to 0004600 resolvedallison.vacanti VTK OpenGL2 Backend: Toggling surface smoothing hide/show GPU volume rendering instead of effectively updating the smoothing 

Activities

lassoan

lassoan

2018-09-20 09:16

developer   ~0016039

It seems that VTK and Qt's states are temporarily get out of sync and this generates the warning.

Calling ostate->vtkglDisable before f->glDisable in QVTKOpenGLNativeWidget::paintGL() (around Line 532) seems to fix the issue:

Current (generates warning):

f->glDisable(GL_SCISSOR_TEST); // Scissor affects glBindFramebuffer.
ostate->vtkglDisable(GL_SCISSOR_TEST); // Scissor affects glBindFramebuffer.

Updated (does not generate warning):

ostate->vtkglDisable(GL_SCISSOR_TEST); // Scissor affects glBindFramebuffer.
f->glDisable(GL_SCISSOR_TEST); // Scissor affects glBindFramebuffer.

I was just playing around with this, so I'm not sure that this is a proper solution but it seems to work.

jcfr

jcfr

2018-10-01 13:00

administrator   ~0016058

I think this was fixed in VTK master. See https://github.com/Kitware/VTK/commit/60989d5e79bd25154e7c2416d47843ec1536de0d#diff-6e5f5332237272bf7cf332e80ffcfb36

lassoan

lassoan

2018-10-01 13:19

developer   ~0016059

Great, thanks, then we just have to update VTK in Slicer!

jcfr

jcfr

2018-10-01 18:27

administrator   ~0016062

Closing. Fix integrated in http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=27440

Issue History

Date Modified Username Field Change
2018-09-20 01:28 lassoan New Issue
2018-09-20 01:28 lassoan Status new => assigned
2018-09-20 01:28 lassoan Assigned To => jcfr
2018-09-20 01:28 lassoan Relationship added related to 0004600
2018-09-20 09:16 lassoan Note Added: 0016039
2018-10-01 13:00 jcfr Note Added: 0016058
2018-10-01 13:19 lassoan Note Added: 0016059
2018-10-01 18:27 jcfr Status assigned => resolved
2018-10-01 18:27 jcfr Resolution open => fixed
2018-10-01 18:27 jcfr Fixed in Version => Slicer 4.9.0
2018-10-01 18:27 jcfr Note Added: 0016062