Bug 444667 - kwin crashes in KDecoration2::DecorationSettings::font() during login causing kde freeze
Summary: kwin crashes in KDecoration2::DecorationSettings::font() during login causing...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (show other bugs)
Version: 5.21.5
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 444830 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-10-30 15:36 UTC by lvschenker
Modified: 2023-09-06 10:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Generated KDE bug report (3.13 KB, text/vnd.kde.kcrash-report)
2021-10-30 15:36 UTC, lvschenker
Details
New crash information added by DrKonqi (7.03 KB, text/plain)
2021-11-02 14:11 UTC, f.kargl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lvschenker 2021-10-30 15:36:49 UTC
Created attachment 143030 [details]
Generated KDE bug report

SUMMARY
KDE/Plasma freezes during login start-up. Bug report (attached) says kwin_x11 crashed.

STEPS TO REPRODUCE
1. Boot/reboot
2. Login to Plasma
3. 

OBSERVED RESULT
Black screen, freeze.

EXPECTED RESULT
Successful login.

SOFTWARE/OS VERSIONS
Qt Version: 5.15.2
Frameworks Version: 5.86.0
Operating System: Linux 5.14.0-2-amd64 x86_64
Windowing System: X11
Distribution: Debian GNU/Linux bookworm/sid
DrKonqi: 5.23.0 [KCrashBackend]

ADDITIONAL INFORMATION
This happens on several x86_64 systems, including fresh installation (qemu).
Selecting XFCE and GNOME on login works fine.
Comment 1 Nate Graham 2021-11-01 15:45:50 UTC
Pasting inline:


#4  0x00007f12e42dd510 in KDecoration2::DecorationSettings::font() const () from /usr/lib/x86_64-linux-gnu/libkdecorations2.so.5
#5  0x00007f12e42dd737 in KDecoration2::DecorationSettings::DecorationSettings(KDecoration2::DecorationBridge*, QObject*) () from /usr/lib/x86_64-linux-gnu/libkdecorations2.so.5
#6  0x00007f12e6326add in KWin::Decoration::DecorationBridge::init() () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#7  0x00007f12e642b5a7 in KWin::Workspace::Workspace() () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#8  0x00007f12e6384990 in KWin::Application::createWorkspace() () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
#9  0x00005638c068141e in ?? ()
#10 0x00007f12e4f53977 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f12dc2cbd73 in void KWin::X11StandalonePlatform::doUpdateOutputs<KWin::Xcb::RandR::ScreenResources>() () from /usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kwin.platforms/KWinX11Platform.so
#12 0x00007f12dc2c5779 in KWin::X11StandalonePlatform::initOutputs() () from /usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kwin.platforms/KWinX11Platform.so
#13 0x00007f12dc2c57d1 in KWin::X11StandalonePlatform::init() () from /usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kwin.platforms/KWinX11Platform.so
Comment 2 f.kargl 2021-11-02 14:11:55 UTC
Created attachment 143139 [details]
New crash information added by DrKonqi

kwin_x11 (5.21.5) using Qt 5.15.2

- What I was doing when the application crashed

Booting the system gets stuck after the login screen and only shows a black screen. The mouse pointer is visible and can be moved around. Using the `Ctrl-Esc` key combination, the task manager can be opened and from there on a shell via the tools menu. Manually starting the plasma desktop via `startplasma-x11` fails, but `plasmashell` can be started which shows the task bar, desktop widgets and desktop background. All windows are missing their titlebar/window decorations. 
Attempting to manually start `kwin` in the shell leads to a crash.
When attempting to open the window decoration settings tab in the system settings application, the application crashes (other settings tabs work fine).

-- Backtrace (Reduced):
#6  0x00007f00c73d0510 in KDecoration2::DecorationSettings::font() const (this=this@entry=0x55ceff5c2960) at /usr/include/c++/11/bits/unique_ptr.h:173
#7  0x00007f00c73d0737 in operator() (__closure=<synthetic pointer>) at ./src/decorationsettings.cpp:19
#8  KDecoration2::DecorationSettings::DecorationSettings(KDecoration2::DecorationBridge*, QObject*) (this=0x55ceff5c2960, bridge=0x7f00bc0062f0, parent=<optimized out>) at ./src/decorationsettings.cpp:34
#9  0x00007f00c9419add in QSharedPointer<KDecoration2::DecorationSettings>::create<KWin::Decoration::DecorationBridge*>(KWin::Decoration::DecorationBridge*&&) () at /usr/include/c++/10/new:175
#10 KWin::Decoration::DecorationBridge::init() (this=0x7f00bc0062f0) at ./decorations/decorationbridge.cpp:121
Comment 3 f.kargl 2021-11-03 10:44:25 UTC
Downgrading the libkdecorations package as suggested here temporarily fixed it for me https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996726
Comment 4 Nicolas Fella 2021-11-06 14:54:29 UTC
*** Bug 444830 has been marked as a duplicate of this bug. ***
Comment 5 Bug Janitor Service 2021-11-07 00:34:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdecoration/-/merge_requests/13
Comment 6 Aleix Pol 2021-11-08 13:34:56 UTC
Git commit 6e5e6006c64860c59590c20575a1c2ceea29f775 by Aleix Pol.
Committed on 07/11/2021 at 00:35.
Pushed by apol into branch 'master'.

Fix warning

warning: moving a temporary object prevents copy elision [-Wpessimizing-move]

M  +1    -1    src/decoratedclient.cpp
M  +1    -1    src/decorationsettings.cpp

https://invent.kde.org/plasma/kdecoration/commit/6e5e6006c64860c59590c20575a1c2ceea29f775
Comment 7 David Edmundson 2023-09-06 10:39:00 UTC
This bug was reported against an outdated version of KWin. We have made many changes since the. 
If the issue persists in newer versions can you reopen the bug report updating the version number.