<div dir="ltr"><div>Hi VTK Developers - </div><div><br></div><div>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 details.</div>
<div><br></div><div>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.</div>
<div><br></div><div>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?).</div>
<div><br></div><div>Note that the same kind of loop appears elsewhere in VTK, like vtkGLSLShader so whatever the right behavior is could be centralized in a method.</div><div><br></div><div>Thanks,</div><div>Steve</div><div>
<br></div><div>[1] <a href="http://www.na-mic.org/Bug/view.php?id=3438">http://www.na-mic.org/Bug/view.php?id=3438</a><br></div><div><br></div>[2] <a href="https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL/vtkOpenGLRenderWindow.cxx#L526-530">https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL/vtkOpenGLRenderWindow.cxx#L526-530</a><br>
<div class="gmail_extra"><br></div><div class="gmail_extra">[3] Here's the current man page, but it looks unchanged in all the versions posted on <a href="http://opengl.org">opengl.org</a>: <a href="http://www.opengl.org/sdk/docs/man/xhtml/glGetError.xml">http://www.opengl.org/sdk/docs/man/xhtml/glGetError.xml</a><br>
<br><div class="gmail_quote">On Sun, Oct 6, 2013 at 2:09 AM, Ron Kikinis <span dir="ltr"><<a href="mailto:kikinis@bwh.harvard.edu" target="_blank">kikinis@bwh.harvard.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hello CTK community,<br>
Slicer is failing under certain circumstances while saving a scene. Can somebody help with this?<br>
Many thanks<br>
Ron<div class="im"><br>
<br>
<br>
-------- Original Message --------<br>
Subject: RE: RE: [slicer-users] Slicer hanging while saving<br>
Date: Sun, 6 Oct 2013 00:55:00 +0000<br>
From: Andras Lasso <<a href="mailto:lasso@queensu.ca" target="_blank">lasso@queensu.ca</a>><br>
To: Jean-Christophe Fillion-Robin <<a href="mailto:jchris.fillionr@kitware.com" target="_blank">jchris.fillionr@kitware.com</a>>, Steve<br>
Pieper <<a href="mailto:pieper@bwh.harvard.edu" target="_blank">pieper@bwh.harvard.edu</a>><br>
CC: Julien Finet <<a href="mailto:julien.finet@kitware.com" target="_blank">julien.finet@kitware.com</a>>, Ron Kikinis<br>
<<a href="mailto:kikinis@bwh.harvard.edu" target="_blank">kikinis@bwh.harvard.edu</a>>, Yuzheng Zhou <<a href="mailto:yuzheng.zhou@kitware.com" target="_blank">yuzheng.zhou@kitware.com</a>><br>
<br>
<br>
<br>
The issue is 100% reproducible if the “Red slice only” layout is used<br>
(and no other layouts are activated). The issue could be fixed in either<br>
Slicer (workaround only), CTK (root cause), and VTK (report error<br>
instead of hang). Added details to<br>
<a href="http://www.na-mic.org/Bug/view.php?id=3438" target="_blank">http://www.na-mic.org/Bug/<u></u>view.php?id=3438</a>.<br>
<br>
The best would be if a CTK developer who knows ctk::grabVTKWidget part<br>
could take over from here and resolve the issue.<br>
<br>
Until the problem is fixed users should switch to the “Four-up” layout<br>
before saving the scene.<br>
<br>
Andras<br>
<br>
<br></div><div class="im">
-- <br>
Ron Kikinis, M.D.,<br>
Robert Greenes Distinguished Director of Biomedical Informatics<br>
Professor of Radiology, Harvard Medical School<br>
Director, Surgical Planning Laboratory<br>
<a href="http://www.spl.harvard.edu/~kikinis" target="_blank">http://www.spl.harvard.edu/~<u></u>kikinis</a><br>
<br>
<br>
<br>
<br></div><div class="im">
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/<u></u>complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></div>
______________________________<u></u>_________________<br>
Ctk-developers mailing list<br>
<a href="mailto:Ctk-developers@commontk.org" target="_blank">Ctk-developers@commontk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers" target="_blank">http://public.kitware.com/cgi-<u></u>bin/mailman/listinfo/ctk-<u></u>developers</a><br>
</blockquote></div><br></div></div>