<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">&lt;<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>&gt;</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ć &lt;<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>&gt; wrote:<br>


&gt; I am switching over to vtk6. Following a recommendation to use COMPONENTS<br>
&gt; argument in CMakeLists causes access violation at run time. Namely,<br>
&gt; QVTKWidget::GetRenderWindow() crashes at line win-&gt;Delete(); due to win<br>
&gt; being null. The function is called from my main window&#39;s constructor:<br>
&gt;<br>
&gt; vtkOpenGLRenderer *renderer = vtkOpenGLRenderer::New();<br>
&gt; qvtkWidget-&gt;GetRenderWindow()-&gt;AddRenderer(renderer); //crash<br>
&gt;<br>
&gt; If I don&#39;t use the components (but rather link all modules), there is no<br>
&gt; crash. Way of invoking VTK:<br>
&gt;<br>
&gt; #FIND_PACKAGE(VTK REQUIRED COMPONENTS vtkRenderingVolumeOpenGL<br>
&gt; vtkGUISupportQt vtkGUISupportQtOpenGL vtkRenderingQt NO_MODULE)<br>
&gt; FIND_PACKAGE(VTK REQUIRED COMPONENTS vtkGUISupportQtOpenGL)<br>
&gt;<br>
&gt; I am using vtk git master. How can I resolve this crash? Or should I just<br>
&gt; link all modules?<br>
&gt;<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>