Control: reassign -1 libqt5widgets5 5.11.3+dfsg1-4
Control: fixed -1 qtbase-opensource-src/5.12.4+dfsg-1

Hi Danny!

On Tue, Aug 27, 2019 at 04:06:07PM +0000, Danny Milosavljevic wrote:
> there is a segmentation fault problem with python3-qt5 and/or qt5 when
> switching between image and text with html tags.
>
> To reproduce,
>
> (1) Use Debian 10 live iso (or any Debian 10; it happened on a finished
> installation as well)
> (2) Invoke: sudo apt-get update
> (3) Invoke: sudo apt-get install python3-pyqt5
> (4) Invoke: cp 
> /usr/share/icons/Adwaita/48x48/status/network-wired-disconnected.png .
> (or any other png)
> (5) Save the text below as "a.py"
> (6) Invoke: QT_QPA_PLATFORM=offscreen python3 a.py 1
> (7) Wait for 5 seconds
> (8) See the segmentation fault
>
> It's very very reproducible for me.

I can reproduce it with the attached C++ source. So it is a bug in Qt, not
in PyQt. Reassigning accordingly.

Also I can reproduce it with Qt 5.11.3 but not with 5.12.4 from experimental.
Looking at upstream changes, I found [1] which most probably fixed this.

So it will be fixed in Sid as soon as we upgrade to 5.12. Do you want a fix
in Buster as well?

[1]: https://codereview.qt-project.org/c/qt/qtbase/+/242929

--
Dmitry Shachnev
#include <QtCore/QString>
#include <QtCore/QTimer>
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QLabel>
#include <QtWidgets/QWidget>

static const char *styleSheet =
    "QLabel {"
    "    padding: 2px;"
    "    min-width: 84px;"
    "    min-height: 84px;"
    "    }"
    "QLabel[state=\"image\"]{"
    "    background-color: orange;"
    "    qproperty-text: \"Image\";"
    "}"
    "QLabel[state=\"text\"]{"
    "    background-color: #eeeeee;"
    "    qproperty-text: \"<table><tr><td>This is a</td></tr><tr><td>Text</td></tr></table>\";"
    "    }";

int main(int argc, char **argv) {
    QApplication app(argc, argv);
    QWidget widget;
    QLabel topLabel(&widget);
    widget.setGeometry(100, 100, 100, 100);
    QString labelProp = QStringLiteral("text");

    QTimer flipTimer(&widget);
    flipTimer.setInterval(1000);
    QObject::connect(&flipTimer, &QTimer::timeout, [&]() {
        if (labelProp == QStringLiteral("text"))
            labelProp = QStringLiteral("image");
        else
            labelProp = QStringLiteral("text");
        topLabel.setProperty("state", QVariant(labelProp));
        widget.setStyleSheet(styleSheet);
    });
    flipTimer.start();

    widget.show();
    return app.exec();
}

Attachment: signature.asc
Description: PGP signature

Reply via email to