This could be the same bug as #386370 but I am not sure. I don't have a backtrace. I'll try and install versions with debug info but I wanted to file this now. I have tried different desktop switching effects, and I think what is causing the issue is the "Desktop Switch On-Screen Display" option. kwin crashes somewhat randomly when switching desktops. But it is fairly regularly. I ran "kwin_x11" in a Konsole and before it crashes I get messages like this; QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined QXcbConnection: XCB error: 3 (BadWindow), sequence: 64494, resource id: 130023438, major code: 18 (ChangeProperty), minor code: 0 QXcbConnection: XCB error: 3 (BadWindow), sequence: 1686, resource id: 130023438, major code: 18 (ChangeProperty), minor code: 0 QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined The X11 connection broke: No error (code 0) XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0" after 96363 requests (96363 known processed) with 0 events remaining. As this might help as well; >kwin_x11 QXcbConnection: XCB error: 3 (BadWindow), sequence: 172, resource id: 127926294, major code: 20 (GetProperty), minor code: 0 OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GTX 760/PCIe/SSE2 OpenGL version string: 4.6.0 NVIDIA 387.34 OpenGL shading language version string: 4.60 NVIDIA Driver: NVIDIA Driver version: 387.34 GPU class: Unknown OpenGL version: 4.6 GLSL version: 4.60 X server version: 1.19.5 Linux kernel version: 4.14.7 Requires strict binding: no GLSL shaders: yes Texture NPOT support: yes Virtual Machine: no Just by experiment I turned off the "Desktop Switch On-Screen Display" option and I don't seem to be crashing now. You can try and reproduce by turning that option on and switching desktops multiple times until kwin crashes. Once kwin crashes, I am able to run it again in a console and continue working.
Please add the backtrace of the crash.
I reproduce the issue. There is no easy way to produce a backtrace, because the kwin process exists with exit code 1. It does not crash. Note that in my case I use the NVidia Linux driver. That is probably relevant, because kwin seems to crash/exit because of a XCB error.
(In reply to Laurent RINEAU from comment #2) > I reproduce the issue. There is no easy way to produce a backtrace, because > the kwin process exists with exit code 1. It does not crash. I wanted to say "the kwin process exits with exit code 1".
Created attachment 111060 [details] Change how the timer is stoped Although I am also unable to provide a dump as kwin seems to exit gracefully (exit code is 1, however), the patch I am providing seems to fix the issue in my set-up.
By the way, I tried the solution in the patch because my console output also encompassed the following entries: The X11 connection broke: No error (code 0) XIO: fatal IO error 17 (File exists) on X server ":0" after 5926 requests (5926 known processed) with 0 events remaining. QObject::~QObject: Timers cannot be stopped from another thread QThread::wait: Thread tried to wait on itself QtDBus: cannot relay signals from parent QObject(0x5581a4545240 "") unless they are emitted in the object's thread QThread(0x5581a44a5360 ""). Current thread is QSGRenderThre ad(0x7f59d8016ee0 "").
Created attachment 111074 [details] kwin's backtrace when exit is called This is a backtrace of kwin in the moment when exit is called. Is this sufficient information?
The backtrace from comment #6 confirms what is written in comment #5: The X11 connection is terminated, possibly because KWin tries to call glXSwapBuffers() for a non-exposed or already deleted window. KWin cannot continue to work without the X11 connection, so it exit()s.
The actual termination happens in QtQuick. Thus this is a Qt issue.
I've noticed this happening in KDE 5.12.5, KDE Frameworks 5.46 (ArchLinux) To clarify, this is a Qt issue and we must wait for a fix in Qt?
Crash happens 100% of the time when I switch between virtual desktops while window is visible. This happens with default KDE 5.12.5 (LTS) which ships with openSUSE 15.0. This also happens with newer version (I updated both Qt and KDE packages just to check if the bug is still there): KDE Plasma 5.13.3 KDE Framework Version 5.48.0 Qt Version: 5.11.1 So this is upstream issue... Is there any upstream bug to track this? If someone knows, can you please post a link for the reference? If there is no upstream bug report created, one should probably be created.
As a refererence see https://bugzilla.opensuse.org/show_bug.cgi?id=1101560 for the same issue with switching desktops on current OpenSUSE Leap 15 (KDE 5.12.5, Frameworks 5.45.0, Qt 5.9.4), Kernel 4.12.14).
I am experiencing this problem on Kubuntu 18.04.1 LTS. It is really really easy to make kwin crash while switching virtual desktops, unfortunately making this feature unusable. NVIDIA Driver Version: 396.54 on GeForce GTX 1050 I will try to disable the "Desktop Switch On-Screen Display" effect as mentioned in the comments and report back if any difference. As of right now, I cannot use virtual desktops. Please let me know if I should reopen this or create a new bug for Kubuntu platform (as I see this ticket is specific to Arch)
See comment 11 and referenced bug issue https://bugzilla.opensuse.org/show_bug.cgi?id=1101560. The problem described there was solved with a libxkb patch, it was deployed for both OpenSUSE Leap 15.0 and SLES: ------------ openSUSE-RU-2018:3294-1: An update that has one recommended fix can now be installed. Category: recommended (moderate) Bug References: 1101560 CVE References: Sources used: openSUSE Leap 15.0 (src): libxcb-1.13-lp150.2.3.1 ------------
Confirming that in openSUSE Leap 15.0 libxcb-1.13-lp150.2.3.1 works. I re-enabled "Desktop Switch On-Screen Display" - no crashes. x11-video-nvidiaG04 package version: 390.87-lp150.10.2.