[vtkusers] "a vtkShader2 object is being deleted before ReleaseGraphicsResources() has been called." with vtkVolume->setMapper
Tijmen Klein
T.R.Klein at student.rug.nl
Mon Oct 10 05:15:43 EDT 2011
Hello Aashish,
I think it would indeed be possible to create a new vtkVolume instead of
switching mappers. But right now I don't have the idea that the errors that
I am getting are much of a performance hit. So for now (as my project is
still in development), I'll leave it as it.
Tijmen
On Fri, Oct 7, 2011 at 6:03 PM, Aashish Chaudhary <
aashish.chaudhary at kitware.com> wrote:
> Hi Tijmen,
>
> Thanks for the update. I looked into the code and found some issues. I
> will get back to you on those once I have something concrete.
>
> On other note, can you create a new vtkVolume when you switch mappers
> ? You would need to remove the out going vtkVolume from the renderer
> though.
>
> Best,
>
>
> On Fri, Oct 7, 2011 at 8:41 AM, Tijmen Klein <T.R.Klein at student.rug.nl>
> wrote:
> > 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
> >
> >
>
>
>
> --
> | 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/20111010/723aef24/attachment.htm>
More information about the vtkusers
mailing list