[vtkusers] vtkRenderWindow::New() returns null

Tankard emptytanka at web.de
Wed Sep 24 08:33:37 EDT 2014


Hi,

I'm trying to display 3D Data within a QT-GUI. Therefore, I want to use the
QVTKWidget.

My problem is, that there is an access violation when I set a parent to the
QVTKWidget. I have a QWidget (name: wid3D) in my gui. Then, after setting up
the gui, I construct a QVTKWidget and set the QWidget as parent.

vtkWidget = std::make_unique<QVTKWidget>();
vtkWidget->setParent(ui.wid3D);

Within setParent, the following method is called

vtkRenderWindow* QVTKWidget::GetRenderWindow()
{
  if (!this->mRenWin)
    {
    // create a default vtk window
    vtkRenderWindow* win = vtkRenderWindow::New();
    this->SetRenderWindow(win);
    win->Delete();
    }

  return this->mRenWin;
}

There, vtkRenderWindow::New() returned null and the call win->Delete()
crashes the application.
In the VTK-OutputWindow is a generic warning that points to somewhere in the
VTK Build Folder, but I cannot figure out where exactly, because I cannot
interact with this window after the application crashed. There is also an
error message that there was no override found for vtkRenderWindow.

Has anyone an idea how to fix this?

I use QT 5.3 and VTK 6.1 which I build by myself with CMake. I also use
Visual Studio 2013 on Windows 8.1 (64 Bit).


regards,

Tankard



--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkRenderWindow-New-returns-null-tp5728854.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list