[vtk-developers] qtgraphicsview example crash with OpenGL2

Olivier Commowick Olivier.Commowick at inria.fr
Thu Apr 28 09:32:21 EDT 2016


Hi everyone,

We would like to upgrade one of our projects to the new backend of VTK 7 (OpenGL2). We are using the QVTKGraphicsItem for the VTK visualisation in our Qt application. For some reason, when switching to OpenGL2 backend, the app crashes in vtkOpenGLRenderWindow::OpenGLInitState.

I therefore tried the qtgraphicsview example of VTK, and it crashes as well. Here is part of the crash backlog:

0   ???                           	000000000000000000 0 + 0
1   libvtkRenderingOpenGL2-7.0.1.dylib	0x0000000109ade96d vtkOpenGLRenderWindow::OpenGLInitState() + 93 (vtkOpenGLRenderWindow.cxx:328)
2                                 	0x0000000103d5e7ac GraphicsView::drawBackground(QPainter*, QRectF const&) + 108 (GraphicsView.hpp:48)
3   org.qt-project.QtWidgets      	0x000000010899fb8b QGraphicsView::paintEvent(QPaintEvent*) + 1099
4   org.qt-project.QtWidgets      	0x000000010868f1bb QWidget::event(QEvent*) + 2123
5   org.qt-project.QtWidgets      	0x000000010878276d QFrame::event(QEvent*) + 45
6   org.qt-project.QtWidgets      	0x00000001088079fa QAbstractScrollArea::viewportEvent(QEvent*) + 170
7   org.qt-project.QtWidgets      	0x000000010899d862 QGraphicsView::viewportEvent(QEvent*) + 1730


At line 328 in vtkOpenGLRenderWindow.cxx, there is this function : 

glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE,GL_ONE_MINUS_SRC_ALPHA);

Would anyone have any idea why this crash is happening in this example ? As a side note, I have run all of this on OSX (macbook pro retina, 2012).

Thanks in advance

---

Olivier Commowick, Ph.D.
Research Scientist
INRIA Rennes - Bretagne Atlantique, VISAGES Team
Campus de Beaulieu
35042 Rennes
FRANCE

Phone: +33 2 99 84 25 92
Email: Olivier.Commowick at inria.fr
Web: http://olivier.commowick.org/







More information about the vtk-developers mailing list