[vtkusers] Crash/Timing problem of QVTKWidget
Lodron, Gerald
Gerald.Lodron at joanneum.at
Tue Sep 10 04:03:33 EDT 2013
Hello,
I have a minimal qt program (qt 4.8.1) with vtk 5.10.1 whereby I use a qvtkwidget (code snippet below). The problem is that the programm sometimes (not always) crashes on the w.show() function of the QMainWindow. The depug trace is not much helpful, there is a uninitialized pointer access in:
> nvoglv64.dll!0000000069b83157()
[Frames below may be incorrect and/or missing, no symbols loaded for nvoglv64.dll]
nvoglv64.dll!0000000069b85c58()
nvoglv64.dll!0000000069b85f94()
nvoglv64.dll!0000000069c88fc6()
kernel32.dll!000000007721652d()
ntdll.dll!00000000776bc521()
The problem exists in 32 bit, 64 bit release and debug mode. When I set a breakpoint at the constructor of qvtkwidget the crashes seem to be less often... a sleep helps a little bit but that's not the fine way....
I already checked all vtk libs and program dependencies with a dependency walker (depends), the all seem correct for me (all debug dlls with correct bit mode)
Thanks for any help
int main( int argc, char* argv[])
{
try
{
QApplication a(argc, argv);
CMainGUI w;
w.show();
return a.exec();
}
catch(...)
{
return 0;
}
return 0;
}
Whereby CMainGUI is a simple QMainWindow:
class CMainGUI : public QMainWindow
{
Q_OBJECT
public:
CMainGUI();
~CMainGUI();
private:
QVTKWidget* m_poVTKWidget;
vtkRenderer* m_poRenderer;
//QLabel* m_poFilePathLabel;
};
With following code:
CMainGUI::CMainGUI()
{
m_poRenderer = vtkRenderer::New();
m_poVTKWidget = new QVTKWidget(this,QFlag(0));
m_poVTKWidget->GetRenderWindow()->AddRenderer(m_poRenderer);
this->setCentralWidget( m_poVTKWidget );
}
CMainGUI::~CMainGUI()
{
m_poRenderer->Delete();
m_poRenderer = NULL;
}
_________________________________________________________________
JOANNEUM RESEARCH Forschungsgesellschaft mbH
DIGITAL - Institute for Information and Communication Technologies
Steyrergasse 17, 8010 Graz, Austria
phone: +43 316 876-1751
fax: +43 316 8769-1751
e-mail: gerald.lodron at joanneum.at
web: www.joanneum.at/digital
_________________________________________________________________
This message and any attached files are confidential and intended solely for the addressee(s). Any publication, transmission or other use of the information by a person or entity other than the intended addressee(s) is prohibited. If you receive this in error please contact the sender and delete the material. The sender does not accept liability for any errors or omissions as a result of the transmission.
Please consider the environment before printing this page.
More information about the vtkusers
mailing list