[vtkusers] vtkRenderWindow::New() returns null
David Gobbi
david.gobbi at gmail.com
Wed Sep 24 10:47:23 EDT 2014
This can happen if you don't include the vtkRenderingOpenGL library
in your project.
- David
On Wed, Sep 24, 2014 at 6:33 AM, Tankard <emptytanka at web.de> wrote:
> 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
More information about the vtkusers
mailing list