[vtkusers] "a vtkShader2 object is being deleted before ReleaseGraphicsResources() has been called." with vtkVolume->setMapper

Tijmen Klein T.R.Klein at student.rug.nl
Fri Oct 7 08:41:45 EDT 2011


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.

Tijmen

On Wed, Oct 5, 2011 at 4:43 PM, Aashish Chaudhary <
aashish.chaudhary at kitware.com> wrote:

> No problem. Thanks for the information.
>
> On Wed, Oct 5, 2011 at 10:40 AM, Tijmen Klein <T.R.Klein at student.rug.nl>
> wrote:
> > Hi Aashish,
> > Sorry for not mentioning this, but I am indeed using
> > a vtkGPUVolumeRayCastMapper.
> > Cheers,
> > Tijmen
> >
> > On Wed, Oct 5, 2011 at 4:38 PM, Aashish Chaudhary
> > <aashish.chaudhary at kitware.com> wrote:
> >>
> >> Hi Tijmen,
> >>
> >> On Wed, Oct 5, 2011 at 7:50 AM, Tijmen Klein <T.R.Klein at student.rug.nl>
> >> wrote:
> >> > I recently updated VTK from 5.6 to the 5.9 version from Git. Now when
> I
> >> > close my application, I get this error repeated quite a few times: "a
> >> > vtkShader2 object is being deleted before ReleaseGraphicsResources()
> has
> >> > been called."
> >> > After a while I found the origin of the this problem. I have a
> >> > vtkVolume,
> >> > and throughout the program the mapper of this vtkVolume is gets
> changed.
> >> > So,
> >> > every now and then I do a call vtkVolume->setMapper(someMapper);
> >> > This used to work fine, and the (visual) results do still work.
> However,
> >> > when I comment out the setMapper() lines, the errors do not occur when
> >> > exiting. I was able to get rid of the errors by prepending the
> >> > setMapper()
> >> > call with a ReleaseGraphicsResources() call. So my code now looks
> >> > something
> >> > like this:
> >> > volume->ReleaseGraphicsResources(renWin);
> >> > volume->SetMapper(volumeMapper);
> >> > Is this intended and expected behavior, or is it a bug?
> >>
> >> This seems like a bug.  What particular mapper are you using? Is it
> >> vtkGPUVolumeRayCastMapper? I will have a look at it sometime today.
> >>
> >> Thanks,
> >>
> >>
> >> > Cheers,
> >> > Tijmen
> >> > _______________________________________________
> >> > Powered by www.kitware.com
> >> >
> >> > Visit other Kitware open-source projects at
> >> > http://www.kitware.com/opensource/opensource.html
> >> >
> >> > Please keep messages on-topic and check the VTK FAQ at:
> >> > http://www.vtk.org/Wiki/VTK_FAQ
> >> >
> >> > Follow this link to subscribe/unsubscribe:
> >> > http://www.vtk.org/mailman/listinfo/vtkusers
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> | Aashish Chaudhary
> >> | R&D Engineer
> >> | Kitware Inc.
> >> | www.kitware.com
> >
> >
>
>
>
> --
> | Aashish Chaudhary
> | R&D Engineer
> | Kitware Inc.
> | www.kitware.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111007/ff7009f6/attachment.htm>


More information about the vtkusers mailing list