[vtkusers] Nonblocking vtkRenderWindowInteractor

Lisa S. Avila lisa.avila at kitware.com
Wed Jun 6 12:02:00 EDT 2001


Hello Rene,

VTK is not thread-safe by default. You can create a set of vtk objects and 
use them in one thread, and create an entirely different set of vtk objects 
and use them in another thread, but you cannot use a vtk object in both 
threads. I suspect that is why you are crashing - two threads are accessing 
the same object at the same time, leading to an incorrect state.


Lisa




At 03:38 PM 6/1/2001, Rene Tschirley wrote:
>Dear all,
>
>
>Possibly I forgot something obvious. It might be a little naive, but
>I wonder how to get a vtkRenderWindowInteractor to work non-blocking. The
>user of my application should be able to interact with a rendered volume
>and change some control data which manipulate the rendered volume.
>
>I tried to detach a separate thread which starts the window
>interactor. My application then listens to the user again. Works fine,
>except that at the moment when I try to interact with the window, the
>application crashes with a segmentation fault.
>
>I'm using vtk2.3 and would be glad if I don't have to upgrade to 3.x. Can
>anyone give me a hint?
>
>
>Bye,
>         René
>
>--
>Dipl.-Inform. René Tschirley,              http://cg.cs.tu-berlin.de/~pooh
>TU Berlin, Computer Graphics and Computer Assisted Medicine research group





More information about the vtkusers mailing list