[vtkusers] Segfault when Adding Renderer in Linux but now Window

Mathieu Westphal mathieu.westphal at kitware.com
Thu Sep 27 04:19:19 EDT 2018


Hi Robert,

Please take a look into VTK/GUISupport/Qt/Testing/Cxx/QVTKOpenGLWidget* for
example usage of the QVTKOpenGLWidget

Best,

Mathieu Westphal


On Wed, Sep 26, 2018 at 10:19 PM <robert.hedges at lickenbrocktech.com> wrote:

>
>
> I'm running VTK master branch (qt 5.10.1) and have code that will run in
> Windows but not in Linux:
>
> The ui file defines the qvtkWidget as a QVTKOpenGLWidget
>
> These lines run as expected:
>
>
> vtkSmartPointer<vtkGenericOpenGLRenderWindow>
> vRendWin=vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();
> vtkSmartPointer<vtkRenderer> vRend=vtkSmartPointer<vtkRenderer>::New();
> ui.qvtkWidget->SetRenderWindow(vRendWin);
>
>
> However, this line causes a segfault:
>
>
> ui.qvtkWidget->GetRenderWindow()->AddRenderer(vRend);
>
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180927/a82422bb/attachment.html>


More information about the vtkusers mailing list