A small update. Doing the volume->ReleaseGraphicsResources(renwin) call does in fact lead to an error: "PreRender end ERROR (x502) Invalid operation". So that's not much of a solution.<div><br></div><div>Tijmen<br>
<br><div class="gmail_quote">On Wed, Oct 5, 2011 at 4:43 PM, Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com">aashish.chaudhary@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
No problem. Thanks for the information.<br>
<div><div></div><div class="h5"><br>
On Wed, Oct 5, 2011 at 10:40 AM, Tijmen Klein <<a href="mailto:T.R.Klein@student.rug.nl">T.R.Klein@student.rug.nl</a>> wrote:<br>
> Hi Aashish,<br>
> Sorry for not mentioning this, but I am indeed using<br>
> a vtkGPUVolumeRayCastMapper.<br>
> Cheers,<br>
> Tijmen<br>
><br>
> On Wed, Oct 5, 2011 at 4:38 PM, Aashish Chaudhary<br>
> <<a href="mailto:aashish.chaudhary@kitware.com">aashish.chaudhary@kitware.com</a>> wrote:<br>
>><br>
>> Hi Tijmen,<br>
>><br>
>> On Wed, Oct 5, 2011 at 7:50 AM, Tijmen Klein <<a href="mailto:T.R.Klein@student.rug.nl">T.R.Klein@student.rug.nl</a>><br>
>> wrote:<br>
>> > I recently updated VTK from 5.6 to the 5.9 version from Git. Now when I<br>
>> > close my application, I get this error repeated quite a few times: "a<br>
>> > vtkShader2 object is being deleted before ReleaseGraphicsResources() has<br>
>> > been called."<br>
>> > After a while I found the origin of the this problem. I have a<br>
>> > vtkVolume,<br>
>> > and throughout the program the mapper of this vtkVolume is gets changed.<br>
>> > So,<br>
>> > every now and then I do a call vtkVolume->setMapper(someMapper);<br>
>> > This used to work fine, and the (visual) results do still work. However,<br>
>> > when I comment out the setMapper() lines, the errors do not occur when<br>
>> > exiting. I was able to get rid of the errors by prepending the<br>
>> > setMapper()<br>
>> > call with a ReleaseGraphicsResources() call. So my code now looks<br>
>> > something<br>
>> > like this:<br>
>> > volume->ReleaseGraphicsResources(renWin);<br>
>> > volume->SetMapper(volumeMapper);<br>
>> > Is this intended and expected behavior, or is it a bug?<br>
>><br>
>> 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>
>> > Cheers,<br>
>> > Tijmen<br>
>> > _______________________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Please keep messages on-topic and check the VTK FAQ at:<br>
>> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> | Aashish Chaudhary<br>
>> | R&D Engineer<br>
>> | Kitware Inc.<br>
>> | <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
| Aashish Chaudhary<br>
| R&D Engineer<br>
| Kitware Inc.<br>
| <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
</div></div></blockquote></div><br></div>