Segmentation fault sharing GL context

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Segmentation fault sharing GL context

David Hoese

I'm one of the maintainers of the vispy library
( It's a high level wrapper around
OpenGL and we offer PyQt5 as one of the backends people can use to
create a GL canvas. Recently we merged changes to use PyQt5's newer
QOpenGLWidget interface instead of QGLWidget.

While working on these changes we kept getting inconsistent results and
segmentation faults in places where multiple QOpenGLWidgets were
created. We tracked it down to context sharing being the problem and
have disabled it for now. We were enabling it by default by setting
"Qt::AA_ShareOpenGLContexts" on the QApplication

We and a lot of our users use conda with the conda-forge channel to
install PyQt, but due to some compilation limitations they are limited
to PyQt 5.6. I'm wondering if anyone is aware of fixes in more recent
versions of PyQt that may fix some of the issues we've run in to? If
not, does anyone know the proper way to unlink contexts/widgets from the
QApplication? I think what is happening is that one canvas is getting
garbage collected by python and another is being created, but the
QApplication is still trying to use the gc'd objects.



P.S. Please CC me in any replies. I only get a digest of this mailing
list right now.
PyQt mailing list    [hidden email]