Bug 463434

Summary: When closing certain windows KWin crash
Product: [Plasma] kwin Reporter: Louen <sir.louen>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: kde, nicolas.fella
Priority: NOR Keywords: drkonqi
Version First Reported In: 5.26.4   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Louen 2022-12-24 16:36:21 UTC
Application: kwin_x11 (5.26.4)

Qt Version: 5.15.7
Frameworks Version: 5.101.0
Operating System: Linux 6.0.14-300.fc37.x86_64 x86_64
Windowing System: X11
Distribution: Fedora Linux 37 (KDE Plasma)
DrKonqi: 5.26.4 [KCrashBackend]

-- Information about the crash:
This doesn't happen always, but all of sudden. It happens 100% when following this customization guide https://www.youtube.com/watch?v=y4yPm9s3KVg&t=1514s Not sure if Lightly could be the culprit. I need to test it more thorough

The crash can be reproduced sometimes.

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f10a15173a0 in main_arena () at /lib64/libc.so.6
#5  0x00007f10a4033872 in KWin::FocusChain::isUsableFocusCandidate(KWin::Window*, KWin::Window*) const () at /lib64/libkwin.so.5
#6  0x00007f10a3fda2fe in KWin::Workspace::activateNextWindow(KWin::Window*) () at /lib64/libkwin.so.5
#7  0x00007f10a4126e8b in KWin::X11Window::releaseWindow(bool) () at /lib64/libkwin.so.5
#8  0x00007f10a40308aa in KWin::X11Window::unmapNotifyEvent(xcb_unmap_notify_event_t*) () at /lib64/libkwin.so.5
#9  0x00007f10a403250b in KWin::X11Window::windowEvent(xcb_generic_event_t*) () at /lib64/libkwin.so.5
#10 0x00007f10a4034a28 in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) () at /lib64/libkwin.so.5
#11 0x00007f10a26a53f4 in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) () at /lib64/libQt5Core.so.5
#12 0x00007f108f8efbc3 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () at /lib64/libQt5XcbQpa.so.5
#13 0x00007f108f8f1296 in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5XcbQpa.so.5
#14 0x00007f108f9178d7 in xcbSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5XcbQpa.so.5
#15 0x00007f10a0066cbf in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#16 0x00007f10a00bc598 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#17 0x00007f10a0063f40 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#18 0x00007f10a26f938a in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#19 0x00007f10a26a6cca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#20 0x00007f10a26aed92 in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#21 0x000055b18b36d655 in main ()
[Inferior 1 (process 32369) detached]

The reporter indicates this bug may be a duplicate of or related to bug 452785, bug 400394.

Reported using DrKonqi
Comment 1 Louen 2022-12-24 17:09:46 UTC
I have also tested with Kvantum and same issue, not only with Lightly.

I have tested both in Fedora 37 and Ubuntu 22.10, both with KDE 5.26

This report was done with Fedora

Bug with Ubuntu: #463162

In both bugs I was using this customization guide (only appearance settings, including Latte-Dock and ULauncher with both Lightly and Kvantum)

https://www.youtube.com/watch?v=y4yPm9s3KVg
Comment 2 Louen 2022-12-24 17:31:24 UTC
I've been able to hunt down the issue to replicate it 100% of the time

Here is the video:
https://i.imgur.com/biOTdkC.mp4

What I've done after clean install:
1. Clean install Fedora 37
2. Installed both Anydesk and Google Chrome
3. Followed this tutorial https://www.youtube.com/watch?v=y4yPm9s3KVg for appearance settings (both Kvantum and Lightly option do the bug, so they are not the root cause)
4. And then do what I show in the video. It happens 100% of the time.
Comment 3 Louen 2022-12-24 17:32:25 UTC
Sorry, I forgot to explain what I do in the video exactly:

1. Anydesk open
2. I open Google Chrome full screen
3. Close Google Chrome
4. Minimize Anydesk
5. KWin crashes.
Comment 4 David Edmundson 2022-12-24 23:29:56 UTC
Can you try to get debug symbols for libkwin.so and get a new backtrace. It'll help narrow this down quicker.
Comment 5 Louen 2022-12-25 00:03:24 UTC
(In reply to David Edmundson from comment #4)
> Can you try to get debug symbols for libkwin.so and get a new backtrace.
> It'll help narrow this down quicker.

I'm not sure how to accomplish this. I had Kwin right in the distro, not compiled from sources

I need to compile https://github.com/KDE/kwin from sources with some sort of flags or something?
Comment 6 Nicolas Fella 2022-12-27 12:28:33 UTC
You can do "sudo dnf in kwin-debuginfo kwin-common-debuginfo kwin-libs-debuginfo kwin-wayland-debuginfo"
Comment 7 David Edmundson 2023-01-01 14:28:46 UTC
resetting to needsinfo
Comment 8 Bug Janitor Service 2023-01-16 05:14:17 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2023-01-31 05:06:19 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 10 Louen 2023-03-23 15:51:21 UTC
(In reply to Bug Janitor Service from comment #9)
> This bug has been in NEEDSINFO status with no change for at least
> 30 days. The bug is now closed as RESOLVED > WORKSFORME
> due to lack of needed information.
> 
> For more information about our bug triaging procedures please read the
> wiki located here:
> https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging
> 
> Thank you for helping us make KDE software even better for everyone!

Ok, sorry for the time passed, but I had issues with my laptop drivers and had to go back to Windows for a while

Now I have reinstalled everything and KWin bug seems to be there. 

Going back to the last point I left with Nicholas Fella 

> # sudo dnf install kwin-debuginfo kwin-common-debuginfo kwin-libs-debuginfo kwin-wayland-debuginfo

This is the error I find. Those debug packages doesn't seem to exist in dnf 
Error: Unable to find a match: kwin-debuginfo kwin-common-debuginfo kwin-libs-debuginfo kwin-wayland-debuginfo

Anyway, from what I see in Fedora 37, which I'm using there is debunginfod which is mentioned in this guide
https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Fedora

But I'm still not sure how to specifically debug kwin related crashes with such tool apart from the backtraces I've offered in this thread.
Comment 11 David Edmundson 2023-04-07 22:05:38 UTC

*** This bug has been marked as a duplicate of bug 438315 ***