Segmentation fault in drawComplexControl() with Gtk style (Qt 4.8.1)

  • After upgrading to Qt 4.8.1, the application I'm working on got very unstable if the Gtk style (which is my default) is used - I get frequent segfaults for simple operations. The first few call stack entries when this occurs are:

    #0 0x00000000 in ?? ()
    #1 0x00e7d178 in QGtkStyle::drawComplexControl(QStyle::ComplexControl, QStyleOptionComplex const*, QPainter*, QWidget const*) const ()
    from /usr/lib/qt4/lib/
    #2 0x00f82ae5 in QScrollBar::paintEvent(QPaintEvent*) ()
    from /usr/lib/qt4/lib/
    #3 0x00ad1494 in QWidget::event(QEvent*) () from /usr/lib/qt4/lib/
    #4 0x00ece894 in QAbstractSlider::event(QEvent*) ()

    It turns out that I can also reproduce this problem with (at least) one of the example applications - the "tabdialog". Steps to reproduce become:

    Make sure "GTK+" is selected as GUI Style in Qt Configuration, or alternatively, "Desktop Settings" on a GNOME based system.

    /usr/lib/qt4/examples/dialogs/tabdialog/tabdialog (but substitute your Qt root for /usr/lib/qt4 as appropriate.)

    Select the "Applications" tab.

    This result in the good (or bad) old
    Segmentation fault (core dumped)

    That's on a system running CentOS 5.8, 32-bit.

    Does anyone else have this problem?

  • My Debian 5.0 build also produces this exact core file whenever I attempt to launch a Qt binary (designer, linguist, assistant).

  • Right. Thanks.

    I've now filed a bug report for this:

    I've looked at the Qt source code, too, and I think I know how the problem could be fixed. I'll add more details to the QtBug...

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.