Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 779883 - dev-qt/qtwayland-5.15.2-r1 crashes randomly when qt windows receive focus.
Summary: dev-qt/qtwayland-5.15.2-r1 crashes randomly when qt windows receive focus.
Status: RESOLVED TEST-REQUEST
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: fixed in >=dev-qt/qtwayland-5.15.2-r10
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-03 13:09 UTC by Andreas Grois
Modified: 2021-12-24 10:52 UTC (History)
1 user (show)

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


Attachments
Callstack of the crash. (callstack.txt,2.67 KB, text/plain)
2021-04-03 13:09 UTC, Andreas Grois
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Grois 2021-04-03 13:09:47 UTC
Created attachment 697023 [details]
Callstack of the crash.

Hi!

Some Qt applications seem to have random crashes with qtwayland-5.15.2-r1. Those random crashes occur mostly when the application receives focus.

Reproduction steps:
1) Install Sway (or any other Wayland compositor, really)
2) Install Clementine (or any other Qt application)
3) Have the application open, and wait. Sometimes focus it.
4) Observe that after a couple of minutes to hours the Qt application will crash upon receiving focus.

The error message shown is simply
"ERROR unknown The Wayland connection broke. Did the Wayland compositor die?"

For good measure, I've attached a callstack to this bug report.

This bug has also been reported to the Clementine developers here:
https://github.com/clementine-player/Clementine/issues/6595

A very similar callstack has been reported for qbittorrent as well:
https://github.com/qbittorrent/qBittorrent/issues/13216


I might be misreading the source code and call stacks, but to me it seems this bug has been fixed upstream:
https://github.com/qt/qtwayland/commit/16760280fd04cf70255bab16d9acecad254fdd8f

I've added this commit as a user patch on my system, and since then no Qt applications have crashed. However I've only done this a few hours ago, and with the crash being random, there's no guarantee that it isn't a coincidence.

Best Regards,
Andreas
Comment 1 Andreas Grois 2021-04-03 15:08:50 UTC
I indeed misread the issue, the linked github patch does not resolve the problem.

However there is a bugreport for Sway upstreamed, that might have a solution people claimed working:
https://github.com/swaywm/sway/issues/4506
Comment 2 Andreas Sturmlechner gentoo-dev 2021-04-08 17:10:51 UTC
You could try with this patch applied to qtwayland:

https://invent.kde.org/qt/qt/qtwayland/-/commit/9ee2ea141adc7765f6c212e63839ef23a4494b30
Comment 3 Andreas Grois 2021-04-08 18:39:04 UTC
9ee2ea141adc7765f6c212e63839ef23a4494b30 just changes the severity of the error to warning, but still terminates the program.

https://github.com/swaywm/sway/issues/4506#issuecomment-778666954 supplies a patch for the issue, and since I put that into the user patches folder for qtwayland, I haven't seen a single qt application crash and gotten quite a few hours uptime with clementine constantly running, so I'm reasonably confident that this indeed prevents the crashes.

By the way, there is also an upstream bug report at qt: https://bugreports.qt.io/browse/QTBUG-81504
Comment 4 Andreas Sturmlechner gentoo-dev 2021-08-22 23:45:36 UTC
This sounds relevant, and it applies cleanly at least:

https://invent.kde.org/qt/qt/qtwayland/-/commit/93058de8d7e7c2f320c22b3bd898aa06cf5babcd
Comment 5 Andreas Sturmlechner gentoo-dev 2021-12-24 10:52:52 UTC
Please test with latest available version in tree.