[vtkusers] Error msg when destroying a vtkTkRenderWidget

Roger Blum roger_blum at swissonline.ch
Mon Jun 12 17:28:29 EDT 2006


Hi vtk users,

I have an application written in Tcl which displays a scene of different 
actors. The user can select one actor to display in a separate window.
To acheive this I create a new toplevel widget with an embedded 
vtkTkRenderWidget. I create a new mapper (as a shallow copy of the original 
mapper) and a new actor, which I add to the new renderer.

When I close this separate window the following warning is displayed:
Generic Warning: In 
C:\Dashboards\Releases\rc-VTK-5-0-0-rc1\VTK\Rendering\vtkTkRenderWidget.cxx, 
line 622
A TkRenderWidget is being destroyed before it associated vtkRenderWindow is 
destroyed. This is very bad and usually due to the order in which objects 
are being destroyed. Always destroy the vtkRenderWindow before destroying 
the user interface components.

How do I have to destroy/delete the vtk objects created for this separate 
window? I do not create a vtkRenderWindow explicitly. It is created by the 
vtkTkRenderWidget. I have tried to delete/destroy the objects in various 
sequences, nothing helped. A call to
[tkRenderWidget GetRenderWindow] Delete
caused error messages complaining about a non existing TempXYZ object.

As a quick and dirty solution: Can I prevent vtk from showing the 
vtkOutputWindow?

Thanks in advance for your help,
Roger 






More information about the vtkusers mailing list