vtkEventQtSlotConnect::Connect crashes a simple Qt application when VTK is compiled in release mode only
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
I wanted to catch VTK event from a Qt application (ParaView, in fact). I used vtkEventQtSlotConnect to connect the renwin interactor events to a Qt widget. If I link the project to a Debug-compiled VTK, this works well. But a Release-mode VTK yields a seg fault.
Here is the GDB backtrace for the modified SimpleView detailed thereafter:
#################################################" Program received signal SIGSEGV, Segmentation fault. 0x01ad5ee4 in vtkSubjectHelper::AddObserver () from /home/dje/Softwares/Paraview-3.7-Release/bin/libvtkCommon.so.pv3.7 (gdb) backtrace #0 0x01ad5ee4 in vtkSubjectHelper::AddObserver () from /home/dje/Softwares/Paraview-3.7-Release/bin/libvtkCommon.so.pv3.7 #1 0x01ad5f9e in vtkObject::AddObserver () from /home/dje/Softwares/Paraview-3.7-Release/bin/libvtkCommon.so.pv3.7 #2 0x0047b063 in vtkQtConnection::SetConnection () from /home/dje/Softwares/Paraview-3.7-Release/bin/libQVTK.so.pv3.7 #3 0x0047a826 in vtkEventQtSlotConnect::Connect () from /home/dje/Softwares/Paraview-3.7-Release/bin/libQVTK.so.pv3.7 #4 0x0804c299 in SimpleView::SimpleView () #5 0x0804bd28 in main ()