[vtkusers] How avoid QVTKWidget crash on exit

Andrew J. Buckler (Elucid Bioimaging) andrew.buckler at elucidbio.com
Sun Dec 20 18:31:03 EST 2015


Hello,
I am successfully using QVTKWidgets with one nagging exception.  Despite my best efforts at handling the smart and non-smart pointers, I get an exception caused by something in VTK when trying to exit the application.

All smart pointers in VTK (and ITK) are handled by setting to NULL rather than deleting, and all is fine until the very end, when something during the Qt deletion ends up calling ~vtkFreeTypeToolsCleanup which causes the exception.

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?

Thank you,
Andy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151220/490efd7b/attachment.html>


More information about the vtkusers mailing list