<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Adding <span style="font-family:arial,sans-serif;font-size:15px">vtkRenderingOpenGL</span> solves the problem. Thanks!</div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 28, 2013 at 8:47 PM, Marcus D. Hanwell <span dir="ltr"><<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, May 27, 2013 at 4:54 AM, Dženan Zukić <<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>> wrote:<br>
> I am switching over to vtk6. Following a recommendation to use COMPONENTS<br>
> argument in CMakeLists causes access violation at run time. Namely,<br>
> QVTKWidget::GetRenderWindow() crashes at line win->Delete(); due to win<br>
> being null. The function is called from my main window's constructor:<br>
><br>
> vtkOpenGLRenderer *renderer = vtkOpenGLRenderer::New();<br>
> qvtkWidget->GetRenderWindow()->AddRenderer(renderer); //crash<br>
><br>
> If I don't use the components (but rather link all modules), there is no<br>
> crash. Way of invoking VTK:<br>
><br>
> #FIND_PACKAGE(VTK REQUIRED COMPONENTS vtkRenderingVolumeOpenGL<br>
> vtkGUISupportQt vtkGUISupportQtOpenGL vtkRenderingQt NO_MODULE)<br>
> FIND_PACKAGE(VTK REQUIRED COMPONENTS vtkGUISupportQtOpenGL)<br>
><br>
> I am using vtk git master. How can I resolve this crash? Or should I just<br>
> link all modules?<br>
><br>
</div></div>I added <a href="http://vtk.org/Wiki/VTK/Build_System_Migration#Common_Implementation_Modules" target="_blank">http://vtk.org/Wiki/VTK/Build_System_Migration#Common_Implementation_Modules</a><br>
to give an example where one might find the common implementation<br>
modules and use it. You could add vtkGUISupportQtOpenGL to the list of<br>
dependencies, but you are missing vtkRenderingOpenGL from your<br>
dependencies that is causing the null render window.<br>
<span class="HOEnZb"><font color="#888888"><br>
Marcus<br>
</font></span></blockquote></div><br></div>