Crash of qtgraphicsview example on macOS
Hello,
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 on macOS 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 was a call to this function:
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE,GL_ONE_MINUS_SRC_ALPHA);
Would you know why this crash is happening in the example ? As a side note, I have run all of this on OSX (macbook pro retina, 2012).
Thanks in advance