[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#935909: marked as done (python3-pyqt5: Segmentation fault when switching between image and text with html tags using style sheets)



Your message dated Sun, 08 Dec 2019 21:47:08 +0000
with message-id <E1ie4OS-0007nR-O1@fasolo.debian.org>
and subject line Bug#935909: fixed in qtbase-opensource-src 5.11.3+dfsg1-1+deb10u2
has caused the Debian Bug report #935909,
regarding python3-pyqt5: Segmentation fault when switching between image and text with html tags using style sheets
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
935909: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935909
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: python3-pyqt5
Version: 5.11.3+dfsg-1+b3
Severity: important

Dear Maintainer,

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.

Text:

from PyQt5.QtWidgets import QWidget, QLabel, QApplication
from PyQt5.QtCore import QTimer, QVariant, pyqtSlot


style=\
"""QLabel {
    qproperty-alignment: AlignCenter;
    min-width: 84px;
    min-height: 84px; 
    max-width: 84px;
    max-height: 84px; 
    }
QLabel[state="image"]{
    background-image: url(network-wired-disconnected.png);
    background-repeat: no-repeat;
    background-position: center;
    background-color: #eeeeee;
    qproperty-text: " ";
}
QLabel[state="text"]{
    background-image: none;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #eeeeee;
    qproperty-text: "This is<br>an<br>example";
    } 
"""
style2=\
"""QLabel {
    qproperty-alignment: AlignCenter;
    min-width: 84px;
    min-height: 84px; 
    max-width: 84px;
    max-height: 84px; 
    }
QLabel[state="image"]{
    background-color: orange;
    qproperty-text: "Image";
}
QLabel[state="text"]{
    background-color: #eeeeee;
    qproperty-text: "This is<br>an<br>example";
    } 
"""
# NO segfault!!
style3=\
"""QLabel {
    qproperty-alignment: AlignCenter;
    min-width: 84px;
    min-height: 84px; 
    max-width: 84px;
    max-height: 84px; 
    }
QLabel[state="image"]{
    background-color: orange;
    qproperty-text: "Image";
}
QLabel[state="text"]{
    background-color: #eeeeee;
    qproperty-text: "Text";
    } 
"""
style4=\
"""QLabel {
    qproperty-alignment: AlignCenter;
    border: 1px solid #cccccc;
    border-bottom: 1px solid white;
    background-color: #eeeeee;
    padding: 2px;
    font-size: 15px;
    font-family: "free sans";
    qproperty-alignment: AlignCenter;
    min-width: 84px;
    min-height: 84px; 
    max-width: 84px;
    max-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>";
    } 
"""
# NO segfault!!
style5=\
"""QLabel {
    qproperty-alignment: AlignCenter;
    min-width: 84px;
    min-height: 84px; 
    max-width: 84px;
    max-height: 84px; 
    }
QLabel[state="image"]{
    background-image: url(network-wired-disconnected.png);
    background-repeat: no-repeat;
    background-position: center;
    background-color: #eeeeee;
    qproperty-text: " ";
}
QLabel[state="text"]{
    background-image: none;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #eeeeee;
    qproperty-text: "Text";
    }
"""
# Program crashes with "segmentation fault" when
# html-tags are in the label text
# -----------------------------------
# -----------------------------------
class LabelDemoWidget(QWidget):
    def __init__(self, style=style, parent=None):
        QWidget.__init__(self, parent=parent)
        
        self.style=style
        self.topLabel=QLabel(self)
        self.topLabel.setObjectName("topLabel")
        self.label_prop="text"
        self.switch={"text":"image","image":"text"}
        self.setGeometry(100, 100, 100, 100)
        flip=QTimer(self)
        flip.setInterval(1000)
        flip.timeout.connect(self.new_style)
        flip.start()
# -----------------------------------
    @pyqtSlot()
    def new_style(self):
        self.topLabel.setProperty("state",QVariant(self.switch[self.label_prop]))
        self.label_prop=self.switch[self.label_prop]
        self.setStyleSheet(self.style)
# -----------------------------------
if __name__=='__main__':
    # usage python3 label_demo.py 0 ... 4
    # 2 and 4 cause no segfault
    # all others with html-tags in text will crash after some time with segfault
    # debian buster (10) with python3 (3.7.3), python3-qt5 (5.11.3) out of the box
    
    import sys
    app=QApplication(sys.argv)
    w = LabelDemoWidget([style, style2, style3, style4, style5][int(sys.argv[1])])
    w.show()
    sys.exit(app.exec_())

-- System Information:
Debian Release: 10.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-5-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-pyqt5 depends on:
ii  libc6                             2.28-10
ii  libgcc1                           1:8.3.0-6
ii  libpython3.7                      3.7.3-2
ii  libqt5core5a [qtbase-abi-5-11-3]  5.11.3+dfsg1-1
ii  libqt5dbus5                       5.11.3+dfsg1-1
ii  libqt5designer5                   5.11.3-4
ii  libqt5gui5                        5.11.3+dfsg1-1
ii  libqt5help5                       5.11.3-4
ii  libqt5network5                    5.11.3+dfsg1-1
ii  libqt5printsupport5               5.11.3+dfsg1-1
ii  libqt5test5                       5.11.3+dfsg1-1
ii  libqt5widgets5                    5.11.3+dfsg1-1
ii  libqt5xml5                        5.11.3+dfsg1-1
ii  libstdc++6                        8.3.0-6
ii  python3                           3.7.3-1
ii  python3-sip [sip-py3api-12.5]     4.19.14+dfsg-2

python3-pyqt5 recommends no packages.

Versions of packages python3-pyqt5 suggests:
pn  python3-pyqt5-dbg  <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: qtbase-opensource-src
Source-Version: 5.11.3+dfsg1-1+deb10u2

We believe that the bug you reported is fixed in the latest version of
qtbase-opensource-src, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 935909@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dmitry Shachnev <mitya57@debian.org> (supplier of updated qtbase-opensource-src package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 24 Nov 2019 20:34:59 +0300
Source: qtbase-opensource-src
Binary: libqt5core5a libqt5gui5 qt5-gtk-platformtheme qt5-flatpak-platformtheme libqt5network5 libqt5opengl5 libqt5sql5 libqt5sql5-mysql libqt5sql5-odbc libqt5sql5-psql libqt5sql5-sqlite libqt5sql5-tds libqt5sql5-ibase libqt5xml5 libqt5dbus5 libqt5test5 libqt5concurrent5 libqt5widgets5 libqt5printsupport5 qtbase5-dev qtbase5-private-dev libqt5opengl5-dev qtbase5-dev-tools qt5-qmake-bin qt5-qmake qtbase5-examples qt5-default qtbase5-doc qtbase5-doc-html
Architecture: source
Version: 5.11.3+dfsg1-1+deb10u2
Distribution: buster
Urgency: medium
Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Changed-By: Dmitry Shachnev <mitya57@debian.org>
Description:
 libqt5concurrent5 - Qt 5 concurrent module
 libqt5core5a - Qt 5 core module
 libqt5dbus5 - Qt 5 D-Bus module
 libqt5gui5 - Qt 5 GUI module
 libqt5network5 - Qt 5 network module
 libqt5opengl5 - Qt 5 OpenGL module
 libqt5opengl5-dev - Qt 5 OpenGL library development files
 libqt5printsupport5 - Qt 5 print support module
 libqt5sql5 - Qt 5 SQL module
 libqt5sql5-ibase - Qt 5 Firebird database driver
 libqt5sql5-mysql - Qt 5 MySQL database driver
 libqt5sql5-odbc - Qt 5 ODBC database driver
 libqt5sql5-psql - Qt 5 PostgreSQL database driver
 libqt5sql5-sqlite - Qt 5 SQLite 3 database driver
 libqt5sql5-tds - Qt 5 FreeTDS database driver
 libqt5test5 - Qt 5 test module
 libqt5widgets5 - Qt 5 widgets module
 libqt5xml5 - Qt 5 XML module
 qt5-default - Qt 5 development defaults package
 qt5-flatpak-platformtheme - Qt 5 Flatpak platform theme
 qt5-gtk-platformtheme - Qt 5 GTK+ 3 platform theme
 qt5-qmake  - Qt 5 qmake Makefile generator tool
 qt5-qmake-bin - Qt 5 qmake Makefile generator tool — binary file
 qtbase5-dev - Qt 5 base development files
 qtbase5-dev-tools - Qt 5 base development programs
 qtbase5-doc - Qt 5 base documentation
 qtbase5-doc-html - Qt 5 base HTML documentation
 qtbase5-examples - Qt 5 base examples
 qtbase5-private-dev - Qt 5 base private development files
Closes: 911702 911844 935627 935909
Changes:
 qtbase-opensource-src (5.11.3+dfsg1-1+deb10u2) buster; urgency=medium
 .
   [ Dmitry Shachnev ]
   * Backport upstream patch to add support for non-PPD printers and avoid
     silent fallback to a printer supporting PPD (closes: #911702, #911844).
   * Backport upstream patch to fix crash in QStyleSheetStyle::repolish()
     when using QLabels with rich text (closes: #935909).
 .
   [ Melvin Vermeeren ]
   * Backport upstream patch to fix graphics tablet hover events (closes:
     #935627).
Checksums-Sha1:
 a4441e3c8db9972b37ecaf1a1125124e6a6aaad6 5206 qtbase-opensource-src_5.11.3+dfsg1-1+deb10u2.dsc
 d26a2a435ce5e46386f80c2f5860e383b2bed022 242332 qtbase-opensource-src_5.11.3+dfsg1-1+deb10u2.debian.tar.xz
 a6d4611e527d479d00e4404ffabeff28b88c0fb7 11779 qtbase-opensource-src_5.11.3+dfsg1-1+deb10u2_source.buildinfo
Checksums-Sha256:
 5178fd70e41a63d5c18d39a6144c43c79916eff2be40b80ad087b50148e9dc83 5206 qtbase-opensource-src_5.11.3+dfsg1-1+deb10u2.dsc
 dbf19ba7e2311f2759f21c305d5259638f92601b979cdd50963fe8dce3fca540 242332 qtbase-opensource-src_5.11.3+dfsg1-1+deb10u2.debian.tar.xz
 990fbdde9ffc5bcb85d24f2b22122d4f2113038cb7e2b61e7c3e694b28554ac5 11779 qtbase-opensource-src_5.11.3+dfsg1-1+deb10u2_source.buildinfo
Files:
 9b77c697e4fbd677dd3820da4b49d0cd 5206 libs optional qtbase-opensource-src_5.11.3+dfsg1-1+deb10u2.dsc
 a6a85df9d5118ec7a2d422fc2ef1a3e5 242332 libs optional qtbase-opensource-src_5.11.3+dfsg1-1+deb10u2.debian.tar.xz
 a383a8a683abc4bf95fd7eba0685300a 11779 libs optional qtbase-opensource-src_5.11.3+dfsg1-1+deb10u2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJHBAEBCgAxFiEE5688gqe4PSusUZcLZkYmW1hrg8sFAl3awpMTHG1pdHlhNTdA
ZGViaWFuLm9yZwAKCRBmRiZbWGuDy9JKD/9b6dW0OkiJttXgRleeu8CtIm72AvFU
qjfNjxruVDl+ElPUo8Hz39RtkwwKoR7/fGEtvwLiX5F47KY7pUJJb1y6WN1HN1zz
HAZMkvXUo38VIHQXSWEgIhM7/fMO1gQ4SW1FSLlUzSFWmjeaaUhjANbsIuoZkexV
PVPwJ2WQkTw/66r2tR0np+dKO+BAIwHec8UMZPDUCSDuD5rfow1HMAtLYqE9IXg6
pvJbY75Xu6fWpDtu53kjA8aoW1OocbPrRiG0WY7mFVwm6uPMwsSV99NzzBka5JBh
lQJE0tnOCcuAxOeVDfNYOhqtAanDwIjGOFh/QlCtPuo3SNE1qRahQIYQjbDyKUJz
C4iKWA73H6/e7uDAD9ijFTi+X7SevpoJDx7kifM6z34Eb6PwHj/lR/pb113TPtId
MT0nDPnLKs7YOjGrx5168GA65uit4tekJYYZEClVfP8pcOWe7tvO/glRCHUw8xYT
A+O+k/ilbRMxuJbEBWjJ7CBoKNj7BwrQzVaw8MWK996Qyi2cqQgER9qpiL1WfSXE
1OF+Fu0qfKUV8N15gVAoA0LnNGkO2xCBir1jqsRC9J5671l0NobUIxjSCeVHlwcA
yID4gIPDK94yXPOuwQ6fcHSVQf86l1A/l1wWeQve34LSb2KnhJEsfqaDVbH5FJ2W
NoWcDCUXfBkqyA==
=l8rF
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: