Summary: | Crash on startup in kwin's KWin::Window::checkWorkspacePosition on 6.3.x branch | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Sam James <sam> |
Component: | core | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | kacper.slominski72, nate |
Priority: | NOR | ||
Version First Reported In: | git-stable-Plasma/6.3 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=500319 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118923 |
||
Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/19ef51db0e1d9cb58b777f2da6f815b871565929 | Version Fixed In: | 6.3.2 |
Sentry Crash Report: |
Description
Sam James
2025-02-18 11:48:37 UTC
I managed to hit it several times, then once I tried to run it under gdb and thereafter, it works. Gah. I'll close for now. A friend has hit this too, so reopening. We think it's a GCC bug (thanks to qookie for nailing it): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118923 (In reply to Sam James from comment #3) > We think it's a GCC bug (thanks to qookie for nailing it): > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118923 if we rewrite code as follows const auto ret = workspace()->*moveAreaFunc(); for (const QRect &r : ret) { ... } would it help? we may want to do it anyway because of copy-on-write semantics of Qt container types (In reply to Vlad Zahorodnii from comment #4) > would it help? we may want to do it anyway because of copy-on-write > semantics of Qt container types I've checked on godbolt and that change does fix the bug on a reduced test case. I've applied a patch that changes the 4 for loops that use moveAreaFunc to see if it resolves the bug in kwin (the later for loops that call `workspace()->restrictedMoveArea()` directly should be fine as-is). Can you make MR please? https://invent.kde.org/plasma/kwin workspace()->restrictedMoveArea() can be changed too to fix container detachment a MR* I've tested the changes on kwin and they do fix the crash. MR is here: https://invent.kde.org/plasma/kwin/-/merge_requests/7191 Git commit 2fe864ef88164627a3e66e09a972abfbc8e92471 by Vlad Zahorodnii, on behalf of Kacper Słomiński. Committed on 18/02/2025 at 19:15. Pushed by vladz into branch 'master'. Factor out {previousRestricted,restricted}MoveArea calls out of loops This works around a GCC 15 bug that causes KWin to crash. M +16 -8 src/window.cpp https://invent.kde.org/plasma/kwin/-/commit/2fe864ef88164627a3e66e09a972abfbc8e92471 Git commit 19ef51db0e1d9cb58b777f2da6f815b871565929 by Vlad Zahorodnii. Committed on 18/02/2025 at 19:35. Pushed by vladz into branch 'Plasma/6.3'. Factor out {previousRestricted,restricted}MoveArea calls out of loops This works around a GCC 15 bug that causes KWin to crash. (cherry picked from commit 2fe864ef88164627a3e66e09a972abfbc8e92471) Co-authored-by: Kacper Słomiński <kacper.slominski72@gmail.com> M +16 -8 src/window.cpp https://invent.kde.org/plasma/kwin/-/commit/19ef51db0e1d9cb58b777f2da6f815b871565929 |