[vtkusers] How avoid QVTKWidget crash on exit

John Drescher drescherjm at gmail.com
Mon Dec 21 07:50:48 EST 2015


> I do not know if this helps but I am calling
> theQvtkWidget->SetRenderWindow(NULL); before delting the ui (and which does
> not give any problems).  I am not doing anything for the interactors, as
> unclear whether I should even be doing this, and I do not see a
> corresponding call for the interactors anyway.
>
>
>
> Thoughts?
>
If this is Visual Studio (and vtk is built as dlls) make sure you are
using VTK compiled with the version of Visual Studio that you use. And
if you installed vtk as Release make sure you only build your
application as Release. Same goes with debug. The reason for this is
you will have more than 1 heap if you use a different version of
visual studio or are mixing debug and release. Having more than 1 heap
will lead to random looking application crashes because you can not
safely allocate memory in 1 heap and free it in a second.

John


More information about the vtkusers mailing list