[vtk-developers] Re: [vtkusers] vtk 4.4.2, python, vtkTkRenderWidget, crashes X11
Prabhu Ramachandran
prabhu_r at users.sf.net
Wed Nov 17 06:56:29 EST 2004
>>>>> "Burlen" == burlen <burlen at apollo.sr.unh.edu> writes:
Burlen> Prabhu, I have been able to reproduce the crash on a
Burlen> redhat 9 machine, running vtk4.2, so I am convinced it is
Burlen> NOT due to vtk 4.4!! The problem must be with in my code.
Are you using threads in your code? If you are you should make sure
Tcl is compiled with threads enabled. Non-threaded Tcl plus Tkinter
plus threads can make for some hairy problems.
Burlen> I was browsing the mayavi sources, and notice a function
Burlen> to remove_actors, do you have to also remove actors from
Burlen> the render window before the destorying it???
No, not that I can recall but its been a while and I am likely to have
forgotten.
Burlen> what is the correct way to destroy a vtkTkrenderWidget
Burlen> aned its parent window???
Burlen> my app, creates and destroys the vtkTkRenderWidget and its
Burlen> parent window many times in a session, so i have to get
Burlen> this right. I also have about 5-10 actors in each scene,
Burlen> which get re-created for each render...
I think it is a good idea to remove all the actors from the
renderwindow and only then `destroy` the widget and the renderwidget.
One possible problem (i.e. a shot in the dark) could be that you hold
references to a renderwidget and for some reason a Render is being
invoked. Since there is no widget to render, this causes problems.
If you are getting segfaults you could consider running your code
under gdb or valgrind and try to see what is going on.
Also, it always helps to be able to reduce the problem down to the
smallest example that demonstrates the problem. This exercise will
either give everyone else a simple example with which they can nail
the problem down or will help you find the bug and fix it.
cheers,
prabhu
More information about the vtkusers
mailing list