Hi Aashish,<div><br></div><div>Sorry for not mentioning this, but I am indeed using a vtkGPUVolumeRayCastMapper.</div><div><br></div><div>Cheers,</div><div>Tijmen<br><br><div class="gmail_quote">On Wed, Oct 5, 2011 at 4:38 PM, Aashish Chaudhary <span dir="ltr">&lt;<a href="mailto:aashish.chaudhary@kitware.com">aashish.chaudhary@kitware.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Tijmen,<br>
<div><div></div><div class="h5"><br>
On Wed, Oct 5, 2011 at 7:50 AM, Tijmen Klein &lt;<a href="mailto:T.R.Klein@student.rug.nl">T.R.Klein@student.rug.nl</a>&gt; wrote:<br>
&gt; I recently updated VTK from 5.6 to the 5.9 version from Git. Now when I<br>
&gt; close my application, I get this error repeated quite a few times: &quot;a<br>
&gt; vtkShader2 object is being deleted before ReleaseGraphicsResources() has<br>
&gt; been called.&quot;<br>
&gt; After a while I found the origin of the this problem. I have a vtkVolume,<br>
&gt; and throughout the program the mapper of this vtkVolume is gets changed. So,<br>
&gt; every now and then I do a call vtkVolume-&gt;setMapper(someMapper);<br>
&gt; This used to work fine, and the (visual) results do still work. However,<br>
&gt; when I comment out the setMapper() lines, the errors do not occur when<br>
&gt; exiting. I was able to get rid of the errors by prepending the setMapper()<br>
&gt; call with a ReleaseGraphicsResources() call. So my code now looks something<br>
&gt; like this:<br>
&gt; volume-&gt;ReleaseGraphicsResources(renWin);<br>
&gt; volume-&gt;SetMapper(volumeMapper);<br>
&gt; Is this intended and expected behavior, or is it a bug?<br>
<br>
</div></div>This seems like a bug.  What particular mapper are you using? Is it<br>
vtkGPUVolumeRayCastMapper? I will have a look at it sometime today.<br>
<br>
Thanks,<br>
<br>
<br>
&gt; Cheers,<br>
&gt; Tijmen<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
&gt;<br>
<font color="#888888"><br>
<br>
<br>
--<br>
| Aashish Chaudhary<br>
| R&amp;D Engineer<br>
| Kitware Inc.<br>
| <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
</font></blockquote></div><br></div>