https://bugs.kde.org/show_bug.cgi?id=489072
--- Comment #26 from Kacper Koniuszy <kde.eardrum...@aleeas.com> --- (In reply to Siyanmao from comment #25) > Created attachment 171572 [details] > plasmashell crashes after backport the patch in comment 12 > > Qt Version: 6.7.2 (with patch backported from > https://codereview.qt-project.org/c/qt/qtwayland/+/574934 ) > Frameworks Version: 6.1.2 > Operating System: Linux 6.9.8-arch1-1 > Windowing System: Wayland > Distribution: "Arch Linux" That is expected because that patch was actually for bug 489180 – it fixed a crash in QWaylandWindow::waylandScreen, but not in QWaylandWindow::handleScreensChanged which this bug report is about. Without that patch, it would be somewhat more likely to see a crash in waylandScreen, but I'm pretty sure I saw both of them. There is no fix for this bug right now and it seems to have appeared after commit 9838bf42 in qtwayland. It's not a regression per se, it's more like a hidden bug that got revealed after fixing something else. Until this gets fixed, you can either make a patch that reverts 9838bf42 or apply my patch from comment 22 which approximates pre-9838bf42 behaviour, with its possible failure modes as well. Keep in mind that it's deliberately broken to reveal issues with null handling that could occur in the code that follows. I have been daily driving it with no problems so far though. Or, for a relatively sane workaround that isn't made to fail if things are seriously wrong, try adding a simple guard for the null newScreen case: diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index c3725ffc..96690ddb 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -1407,6 +1407,9 @@ void QWaylandWindow::handleScreensChanged() { QPlatformScreen *newScreen = calculateScreenFromSurfaceEvents(); + if (!newScreen) + return; + if (newScreen->screen() == window()->screen()) return; -- You are receiving this mail because: You are watching all bug changes.