Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689704 - dev-qt/qtwidgets-5.12.4: multiple issues caused by resetting winId when backing window surface is destroyed
Summary: dev-qt/qtwidgets-5.12.4: multiple issues caused by resetting winId when backi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL: https://bugreports.qt.io/browse/QTBUG...
Whiteboard:
Keywords: UPSTREAM
: 689916 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-07-12 03:47 UTC by Nikos Chantziaras
Modified: 2019-07-16 11:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Chantziaras 2019-07-12 03:47:59 UTC
Upgrading from 5.12.3 to 5.12.4 breaks two applications for me. qBittorrent and Clementine. They both break in the same exact way, in the same manner. They both have a tray icon, and they both can minimize to tray if you try to close the window by clicking the "x" button in the upper-right of the window.

When doing that, trying to restore the application window by clicking on the tray icon results in an application window with invisible content. You need to resize the window to make the content visible again. Furthermore, interaction with the application (like when moving a scrollbar) will more often that not crash with a segfault.

I thought I might need to recompile these applications against the new Qt, but that didn't help. As a last resort, I recompiled every C++ package:

  revdep-rebuild --library 'libstdc++.so.6' -- --exclude gcc

This rebuilt about 400 packages and included all Qt packages, all KDE packages and all Qt applications. Probably overkill, but I wanted to make sure. It didn't fix the problem.

Downgrading to Qt 5.12.3 fixed it.

The problem is also reproducible with upstream provided Qt binaries (using their online binary installer). For example:

  LD_LIBRARY_PATH=/home/realnc/opt/Qt/5.12.4/gcc_64/lib clementine

reproduces the problem, but:

  LD_LIBRARY_PATH=/home/realnc/opt/Qt/5.12.3/gcc_64/lib clementine

and:

  LD_LIBRARY_PATH=/home/realnc/opt/Qt/5.13.0/gcc_64/lib clementine

work fine, so 5.12.3 and 5.13.0 work fine.
Comment 1 Nikos Chantziaras 2019-07-12 03:48:24 UTC
$ emerge --info
Portage 2.3.69 (python 3.6.8-final-0, default/linux/amd64/17.0/desktop/plasma/systemd, gcc-9.1.0, glibc-2.29-r2, 4.19.58-gentoo x86_64)
=================================================================
System uname: Linux-4.19.58-gentoo-x86_64-Intel-R-_Core-TM-_i5-2500K_CPU_@_3.30GHz-with-gentoo-2.6
KiB Mem:    16392400 total,  13759948 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Thu, 11 Jul 2019 23:07:19 +0000
Head commit of repository gentoo: b3e8db701b0ab9a96a54ddb287ee225297a8dcdb

Head commit of repository flatpak-overlay: fd4c72b2d0653ea1ae6a4e0562604f00ba3e1eef

sh bash 5.0_p7
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          5.0_p7::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.8::gentoo
dev-util/cmake:           3.14.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.1.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /mnt/Data/gentoo/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000
    sync-git-verify-commit-signature: true

abendbrot
    location: /var/lib/layman/abendbrot
    masters: gentoo
    priority: 50

flatpak-overlay
    location: /usr/local/flatpak-overlay
    sync-type: git
    sync-uri: https://github.com/fosero/flatpak-overlay.git
    masters: gentoo
    priority: 50

interactive-fiction
    location: /var/lib/layman/interactive-fiction
    masters: gentoo
    priority: 50

seden
    location: /var/lib/layman/seden
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

vapoursynth
    location: /var/lib/layman/vapoursynth
    masters: gentoo
    priority: 50

local
    location: /usr/local/portage
    masters: gentoo
    priority: 9999999

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -mtune=native -march=native -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/vmware-installer"
CXXFLAGS="-pipe -O2 -mtune=native -march=native -ftree-vectorize"
DISTDIR="/mnt/Data/gentoo/distfiles"
EMERGE_DEFAULT_OPTS="--backtrack=200"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-pipe -O2 -mtune=native -march=native -ftree-vectorize"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-pipe -O2 -mtune=native -march=native -ftree-vectorize"
GENTOO_MIRRORS="http://ftp.ntua.gr/pub/linux/gentoo http://gentoo.mirrors.ovh.net/gentoo-distfiles http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en"
MAKEOPTS="-j4"
PKGDIR="/mnt/Data/gentoo/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac accessibility acl acpi activities amd64 berkdb bzip2 cairo cli crypt cxx dbus declarative dri dts dvd dvdr emboss encode exif fam flac fortran gdbm gif glamor gpm gtk iconv icu ipv6 jpeg kde kipi kwallet lcms libnotify libtirpc linguas_en linguas_en_US mad mng mp3 mp4 mpeg multilib ncurses nptl nvidia offensive ogg opengl openmp pam pango pcre pdf pgo phonon plasma png policykit ppds pulseaudio qml qt5 readline seccomp spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vdpau vorbis vulkan wayland widgets wxwidgets xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64 32" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en-US en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Nikos Chantziaras 2019-07-12 03:50:48 UTC
Something I forgot to mention:

If you don't try to do a minimize-close by clicking the "x" button on the window but instead just click the tray icon to minimize to tray, it works fine. The bug only seems to occur if you close-minimize using the "x" button of the window.
Comment 3 Andreas Sturmlechner gentoo-dev 2019-07-12 06:18:07 UTC
Those are application bugs, please file one bug per application.
Comment 4 Nikos Chantziaras 2019-07-13 06:53:37 UTC
(In reply to Andreas Sturmlechner from comment #3)
> Those are application bugs, please file one bug per application.

This is not an application bug. It's a Qt bug. I found the upstream reports, and they are "P1 critical bugs":

https://bugreports.qt.io/browse/QTBUG-76509
https://bugreports.qt.io/browse/QTBUG-76661
https://bugreports.qt.io/browse/QTBUG-76923

It affects ALL applications. Clementine and qBittorrent and just the ones I happen to use that make use of these Qt codepaths.
Comment 5 Nikos Chantziaras 2019-07-13 06:56:47 UTC
I have reverted the bug title back, since it is a Qt bug.
Comment 6 Nikos Chantziaras 2019-07-13 07:03:28 UTC
The "close window" bug was fixed by upstream for 5.12.5:

https://codereview.qt-project.org/c/qt/qtbase/+/267755
Comment 7 Andreas Sturmlechner gentoo-dev 2019-07-13 09:58:40 UTC
Qbittorrent upstream fix: https://github.com/qbittorrent/qBittorrent/issues/9240
Comment 8 Larry the Git Cow gentoo-dev 2019-07-16 09:39:57 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ba34f12ffa132f756c19c43880f1a7b226f0be0

commit 2ba34f12ffa132f756c19c43880f1a7b226f0be0
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-07-16 09:36:07 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-07-16 09:39:37 +0000

    net-p2p/qbittorrent: EAPI-7, drop gnome2-utils, fix bug w/ Qt-5.12.4
    
    Upstream commit 9a4dd3ea9d1fc2af0cc5724ebb19fc99297c2960
    
    Reported-by: Nikos Chantziaras <realnc@gmail.com>
    Bug: https://bugs.gentoo.org/689704
    Package-Manager: Portage-2.3.69, Repoman-2.3.16
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 ...-4.1.6-no-screenblank-on-close-to-systray.patch | 25 ++++++++
 net-p2p/qbittorrent/qbittorrent-4.1.6-r1.ebuild    | 72 ++++++++++++++++++++++
 2 files changed, 97 insertions(+)
Comment 9 Andreas Sturmlechner gentoo-dev 2019-07-16 09:45:16 UTC
Re-assigning to Qt after clementine and qbittorrent were fixed upstream.
Comment 10 Andreas Sturmlechner gentoo-dev 2019-07-16 09:45:34 UTC
*** Bug 689916 has been marked as a duplicate of this bug. ***
Comment 11 Larry the Git Cow gentoo-dev 2019-07-16 11:00:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=541a1f06fe45169a693c9e1ca4d2a084d56b81f9

commit 541a1f06fe45169a693c9e1ca4d2a084d56b81f9
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-07-16 09:55:32 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-07-16 11:00:30 +0000

    dev-qt/qtwidgets: Revert "Reset QWidget's winId..."
    
    Reported-by: Nikos Chantziaras <realnc@gmail.com>
    Closes: https://bugs.gentoo.org/689704
    Package-Manager: Portage-2.3.69, Repoman-2.3.16
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../qtwidgets-5.12.4-revert-reset-winId.patch      | 41 +++++++++++++++
 dev-qt/qtwidgets/qtwidgets-5.12.4-r1.ebuild        | 60 ++++++++++++++++++++++
 2 files changed, 101 insertions(+)