[vtk-developers] [Ctk-developers] Fwd: RE: RE: [slicer-users] Slicer hanging while saving

Steve Pieper pieper at ibility.net
Sun Oct 6 15:45:11 EDT 2013

Hi VTK Developers -

We've run into a bug [1] in 3D Slicer where VTK goes into an infinite loop
calling glGetError [2].  According to the OpenGL man page [3], VTK is doing
the correct thing, since the error code should eventually be cleared.  But
apparently in some circumstances for an invalid context the error is not
cleared which is probably a driver bug.  The slicer bug report [1] has more

We can try to avoid the situation in CTK and/or Slicer by not calling
QVTKWidget::cachedImage method on non-shown QVTKWidgets, but it also seems
to me VTK would be the right place to put in a workaround for a graphics
driver bug that can cause an infinite loop.

If you agree this should be addressed in VTK, can anyone suggest the right
way to address this?  Perhaps we can check for a valid context before going
into the infinite loop.  Or we could add a counter and say that more than N
calls to glGetError without getting GL_NO_ERROR is itself an error
condition (with maybe N = 1000?).

Note that the same kind of loop appears elsewhere in VTK, like
vtkGLSLShader so whatever the right behavior is could be centralized in a


[1] http://www.na-mic.org/Bug/view.php?id=3438


[3] Here's the current man page, but it looks unchanged in all the versions
posted on opengl.org:

On Sun, Oct 6, 2013 at 2:09 AM, Ron Kikinis <kikinis at bwh.harvard.edu> wrote:

> Hello CTK community,
> Slicer is failing under certain circumstances while saving a scene. Can
> somebody help with this?
> Many thanks
> Ron
> -------- Original Message --------
> Subject:        RE: RE: [slicer-users] Slicer hanging while saving
> Date:   Sun, 6 Oct 2013 00:55:00 +0000
> From:   Andras Lasso <lasso at queensu.ca>
> To:     Jean-Christophe Fillion-Robin <jchris.fillionr at kitware.com>, Steve
> Pieper <pieper at bwh.harvard.edu>
> CC:     Julien Finet <julien.finet at kitware.com>, Ron Kikinis
> <kikinis at bwh.harvard.edu>, Yuzheng Zhou <yuzheng.zhou at kitware.com>
> The issue is 100% reproducible if the “Red slice only” layout is used
> (and no other layouts are activated). The issue could be fixed in either
> Slicer (workaround only), CTK (root cause), and VTK (report error
> instead of hang). Added details to
> http://www.na-mic.org/Bug/**view.php?id=3438<http://www.na-mic.org/Bug/view.php?id=3438>
> .
> The best would be if a CTK developer who knows ctk::grabVTKWidget part
> could take over from here and resolve the issue.
> Until the problem is fixed users should switch to the “Four-up” layout
> before saving the scene.
> Andras
> --
> Ron Kikinis, M.D.,
> Robert Greenes Distinguished Director of Biomedical Informatics
> Professor of Radiology, Harvard Medical School
> Director, Surgical Planning Laboratory
> http://www.spl.harvard.edu/~**kikinis<http://www.spl.harvard.edu/~kikinis>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/**complianceline<http://www.partners.org/complianceline>. If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
> ______________________________**_________________
> Ctk-developers mailing list
> Ctk-developers at commontk.org
> http://public.kitware.com/cgi-**bin/mailman/listinfo/ctk-**developers<http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20131006/49fb5297/attachment.html>

More information about the vtk-developers mailing list