[Interest] Lockup when resizing QGLWidget

Carl Olsson carl.olsson at gmail.com
Fri Dec 27 22:46:51 CET 2013


Already posted this on the forums, but it was suggested I post here.

OS: Linux x86-64, KDE 4.11.2
Hardware: AMD Phenon 2, Radeon HD 7870 (fglrx driver)
Qt Versions: 4.8.4, 5.0.2, 5.1.1

I'm experiencing a lockup when resizing a QGLWidget on linux with AMD
fglrx video drivers.

If I run the attached code, grab a window corner and move the mouse
back and forth then in short order I'll always lock up the system
(display not updating, mouse and keyboard not appearing to do
anything, can still perform a proper shutdown with power button
though).

It will happen with simpler code, just resizing a vanilla QGLWidget,
but it seems to take a bit longer for the problem to trigger.

Doesn't appear to happen with open source radeon drivers.

Anyone have any ideas what'd cause this?

The minimal code:

#include <QtWidgets/QApplication>
#include <QtOpenGL/QGLWidget>

class MyGLWidget : public QGLWidget {
public:
    MyGLWidget(QWidget *parent=0) : QGLWidget(parent) {}
protected:
    void paintEvent(QPaintEvent *event) {
        QPainter p;
        p.begin(this);
        p.fillRect(this->rect(), QColor(255, 0, 0));
        p.end();
    }
};

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    MyGLWidget widget;
    widget.show();

    return a.exec();
}



More information about the Interest mailing list