Mapper bug - sort of.

Bill Lorensen wlorens1 at
Sun Dec 5 18:04:09 EST 1999

  A bug is a bug... don't stop,


At 10:01 PM 12/5/99 +0000, John Biddiscombe wrote:
>Dear vtk,
>Please stop me if I'm posting too many bug reports.
>vtkMapper and sub classes can get munged if you do this...
>This is bad
>this is good
>The problem is that when you call RemoveProp(), the renderer doesn't call
>ReleaseGraphicsResources() on the mapper - (this may be sensible if you're
>about to put the prop into another window and may have to redo a massive
>However, the mapper keeps its renderwindow pointer and when the window is
>deleted, the pointer is left hanging. Subsequent deletion of the prop
>causes a pointer violation during the destructor cleaning up.
>The solution is for users to call ReleaseGraphicsResources themselves when
>deleting a prop if they think the window may disappear ...
>My own solution is to add a flag to removeprop (in my code) which says
>whether the window is being deleted or left. If deleted, then
>ReleaseGrraphicsResources should be called.
>This may not be a good solution because the prop may be removed without a
>window deletion occuring, then later the window is really deleted, and now
>the pointer is left hanging. The only safe solution is to call
>ReleaseGraphicsResources every time. - if an alternative ReplaceProp
>routine were used, then one could safely pass the display lists from one
>renderer to another without worrying but there are no doubt other reasons
>why this wouldn't work. (not least opengl display contexts anyway).
>John B

This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.

More information about the vtkusers mailing list