[vtk-developers] Fwd: [vtkusers] null vtkRenderWindow with CMake

Bill Lorensen bill.lorensen at gmail.com
Tue May 28 14:26:11 EDT 2013


This will be an FAQ for VTK6. Is there a link to a simple solution. I know
there are wiki pages that justify/explain it. But is there a page that
suggests a simple solution?


---------- Forwarded message ----------
From: Dženan Zukić <dzenanz at gmail.com>
Date: Mon, May 27, 2013 at 4:54 AM
Subject: [vtkusers] null vtkRenderWindow with CMake
To: vtkusers <vtkusers at vtk.org>


I am switching over to vtk6. Following a recommendation to use COMPONENTS
argument in CMakeLists causes access violation at run time.
Namely, QVTKWidget::GetRenderWindow() crashes at line win->Delete(); due to
win being null. The function is called from my main window's constructor:

vtkOpenGLRenderer *renderer = vtkOpenGLRenderer::New();
qvtkWidget->GetRenderWindow()->AddRenderer(renderer); //crash

If I don't use the components (but rather link all modules), there is no
crash. Way of invoking VTK:

 #FIND_PACKAGE(VTK REQUIRED COMPONENTS vtkRenderingVolumeOpenGL
vtkGUISupportQt vtkGUISupportQtOpenGL vtkRenderingQt NO_MODULE)
FIND_PACKAGE(VTK REQUIRED COMPONENTS vtkGUISupportQtOpenGL)

I am using vtk git master. How can I resolve this crash? Or should I just
link all modules?

Regards,
Dženan

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers




-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130528/9d2754b2/attachment.html>


More information about the vtk-developers mailing list