klassy icon indicating copy to clipboard operation
klassy copied to clipboard

KWin segfault with Opaque Titlebar override enabled in Plasma 5.26 beta

Open luisbocanegra opened this issue 1 year ago • 12 comments

Describe the bug Updated to Plasma 5.26 beta [kde-unstable] on Arch and kwin is crashing when windows are created if Opaque Titlebar option in Window-Specific Override is enabled, did a rebuild from master, no luck.

To Reproduce

  1. Upgrade to Plasma 5.26 beta
  2. Create a Window-Specific Override for an app e.g systemsettings
  3. Enable the Opaque Titlebar option
  4. Save and open a new window of the targeted application
  5. KWin crashes
Application: KWin (kwin_x11), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f504b2c1fa0 in vtable for __cxxabiv1::__class_type_info () at /usr/lib/libstdc++.so.6
#5  0x00007f504be99b55 in KWin::GLTexture::bind() () at /usr/lib/libkwinglutils.so.14
#6  0x00007f504d923595 in KWin::SceneOpenGL::render(KWin::Item*, int, QRegion const&, KWin::WindowPaintData const&) () at /usr/lib/libkwin.so.5
#7  0x00007f4fec020eac in KWin::LightlyShadersEffect::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) (this=0x55605d081d30, w=0x55605c9e8300, mask=2, region=..., data=...) at /home/luis/programs/LightlyShaders/lightlyshaders.cpp:628
#8  0x00007f504d78f464 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#9  0x00007f504d78f464 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#10 0x00007f504d78f464 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#11 0x00007f504bee9a92 in KWin::CrossFadeEffect::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.14
#12 0x00007f504d78f464 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#13 0x00007f504bee9a92 in KWin::CrossFadeEffect::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.14
#14 0x00007f504d7fba6d in KWin::Scene::finalPaintWindow(KWin::EffectWindowImpl*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#15 0x00007f504d78f3ac in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#16 0x00007f504d78f3ac in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#17 0x00007f504d78f3ac in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#18 0x00007f504bed05e1 in KWin::AnimationEffect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.14
#19 0x00007f504d78f3ac in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#20 0x00007f504bed05e1 in KWin::AnimationEffect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.14
#21 0x00007f504d78f3ac in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#22 0x00007f504d7fe79e in KWin::Scene::paintWindow(KWin::WindowItem*, int, QRegion const&) () at /usr/lib/libkwin.so.5
#23 0x00007f504d7fea57 in KWin::Scene::paintSimpleScreen(int, QRegion const&) () at /usr/lib/libkwin.so.5
#24 0x00007f4fec01ee29 in KWin::LightlyShadersEffect::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) (this=0x55605d081d30, mask=0, region=..., data=...) at /home/luis/programs/LightlyShaders/lightlyshaders.cpp:424
#25 0x00007f504d78f2fb in KWin::EffectsHandlerImpl::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#26 0x00007f504d78f2fb in KWin::EffectsHandlerImpl::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#27 0x00007f504d78f2fb in KWin::EffectsHandlerImpl::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#28 0x00007f504d78f2fb in KWin::EffectsHandlerImpl::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#29 0x00007f504d78f2fb in KWin::EffectsHandlerImpl::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#30 0x00007f504d7fb8d4 in KWin::Scene::paintScreen(QRegion const&) () at /usr/lib/libkwin.so.5
#31 0x00007f504d920fdb in KWin::SceneOpenGL::paint(KWin::RenderTarget*, QRegion const&) () at /usr/lib/libkwin.so.5
#32 0x00007f504d7fd685 in  () at /usr/lib/libkwin.so.5
#33 0x00007f504d7502a9 in KWin::Compositor::paintPass(KWin::RenderLayer*, KWin::RenderTarget*, QRegion const&) () at /usr/lib/libkwin.so.5
#34 0x00007f504d754695 in KWin::Compositor::composite(KWin::RenderLoop*) () at /usr/lib/libkwin.so.5
#35 0x00007f504d75499d in KWin::X11Compositor::composite(KWin::RenderLoop*) () at /usr/lib/libkwin.so.5
#36 0x00007f504c31c361 in  () at /usr/lib/libQt5Core.so.5
#37 0x00007f504d704637 in KWin::RenderLoop::frameRequested(KWin::RenderLoop*) () at /usr/lib/libkwin.so.5
#38 0x00007f504d7584a8 in KWin::RenderLoopPrivate::dispatch() () at /usr/lib/libkwin.so.5
#39 0x00007f504c31c361 in  () at /usr/lib/libQt5Core.so.5
#40 0x00007f504c31e8bf in QTimer::timeout(QTimer::QPrivateSignal) () at /usr/lib/libQt5Core.so.5
#41 0x00007f504c30f4a6 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#42 0x00007f504b57ab1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#43 0x00007f504c2ebb68 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#44 0x00007f504c335d33 in QTimerInfoList::activateTimers() () at /usr/lib/libQt5Core.so.5
#45 0x00007f504c3361e2 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#46 0x00007f5045e996e3 in  () at /usr/lib/libQt5XcbQpa.so.5
#47 0x00007f504c2e430c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#48 0x00007f504c2eee39 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#49 0x000055605b619de0 in  ()
#50 0x00007f504adcc290 in  () at /usr/lib/libc.so.6
#51 0x00007f504adcc34a in __libc_start_main () at /usr/lib/libc.so.6
#52 0x000055605b61b205 in  ()
[Inferior 1 (process 2091668) detached]

System details:

  • Operating System: Arch Linux
  • KDE Plasma Version: 5.25.90
  • KDE Frameworks Version: 5.98.0
  • Qt Version: 5.15.6
  • Graphics Platform: X11

luisbocanegra avatar Sep 20 '22 10:09 luisbocanegra

I have been trying to debug this, but have absolutely no idea what they have changed for the 5.26 beta that is causing this. I am finding the 5.26 beta unstable in general (crashing in general, even if an opaque override isn't set), and notice the backtraces don't even mention Klassy.

Debug help here would be greatly appreciated.

paulmcauley avatar Oct 03 '22 13:10 paulmcauley

I'm having a crash but on Wayland. The whole screen locks up (for only one display in multi monitor set ups, curiously) and all I can do to solve it is kill kwin process entirely or reboot. Upon checking journalctl, this appeared for me:

Oct 10 14:13:27 lenovoSUSE kwin_wayland[2312]:kwin_wayland_drm: an error occurred while swapping buffers "EGL_BAD_SURFACE"

I'm trying to figure out if there is something on driver side that may be causing it but the trigger comes from Klassy. If I have transparency activated, any window that, at some point, makes it opaque, it makes the session lock up. I did some tests here and it appears the same symptoms of the issue above happen. If I set to opaque in the Window Specific Overrides for any window, when these applications are launched, the error above occurs. However, I noticed the exact same behavior happening when I try launching Inkscape, which didn't have an override.

I'm on openSUSE Tumbleweed with Liquorix Kernel 5.19.14-lqx1-3-liquorix.

ryu-ketsueki avatar Oct 10 '22 19:10 ryu-ketsueki

I'm having a crash but on Wayland. The whole screen locks up (for only one display in multi monitor set ups, curiously)

I have the same problem since plasma-5.26. I thought it was plasma and filed a bug report.

edpil02 avatar Oct 11 '22 13:10 edpil02

I'm having a crash but on Wayland. The whole screen locks up (for only one display in multi monitor set ups, curiously)

I have the same problem since plasma-5.26. I thought it was plasma and filed a bug report.

It is also Plasma as there were no problems in 5.25. I can't believe they have released a final 5.26 with whatever this change is! :(

Do you have a link to your bug report?

paulmcauley avatar Oct 11 '22 15:10 paulmcauley

Yes :

https://bugs.kde.org/show_bug.cgi?id=459814

edpil02 avatar Oct 11 '22 15:10 edpil02

I think you are right for changes in 5.26. My crashs seems to happen with some gtk applications especially firefox. I changed klassy for breeze , screens problems seems to be solved but other issues remains.

edpil02 avatar Oct 11 '22 16:10 edpil02

I think I'm having the same freezing issue. I didn't see this bug report, so I created one at bugs.kde.org.

Here's a link to that report, if you're interested, @paulmcauley https://bugs.kde.org/show_bug.cgi?id=460486

namesarebloat avatar Oct 15 '22 15:10 namesarebloat

I think I'm having the same freezing issue. I didn't see this bug report, so I created one at bugs.kde.org.

Here's a link to that report, if you're interested, @paulmcauley https://bugs.kde.org/show_bug.cgi?id=460486

Could you reopen your bug report? Something has changed in Plasma 5.26 and need to narrow down what it is.

paulmcauley avatar Oct 15 '22 15:10 paulmcauley

Same issue here using Klassy on wayland.

Seems to happen mostly with Firefox or Thunderbird. It is not 100% reproducible, sometimes it happens right after boot when first launching, sometimes after some time when i try to open a new window.

I am also getting the kwin_wayland_drm: an error occurred while swapping buffers "EGL_BAD_SURFACE" error like in the 459814 report.

P.S.: This issue might be related to 459778 – Screen occasionally freezes when launching application

GithubUser5462 avatar Oct 15 '22 23:10 GithubUser5462

Same issue here using Klassy on KDE Wayland. Using the default 'Breeze' decorations doesn't seem to cause the issue.

Randomly happens when opening Sublime Text/Merge and sometimes even just KWrite and Kate, but not necessarily all the time. I can do the Ctrl+Alt+F1-F12 shortcut to reboot it safely but the TTY where Plasma shell is running is completely frozen. Keyboard and mouse inputs still work fine and wakes up the screen when it's about to go to standby.

Also getting kwin_wayland_drm: an error occurred while swapping buffers "EGL_BAD_SURFACE" on journalctl when it happens.

I'm on Fedora 36 with zawertun's KDE Plasma COPR running kernel 5.19.16. Also happens on openSUSE Tumbleweed with Plasma 5.26.0 and kernel 6.0.1 when I tested it. If it helps, I'm running on Intel UHD Graphics.

If it also helps, KWin recently got a feature where applications running in "legacy mode" (or, XWayland) can scale by themselves. The feature is on by default. Haven't tested if this is what causes the issue though as it randomly happens for me.

https://www.phoronix.com/news/Plasma-5.26-Crisper-XWayland

TenSeventy7 avatar Oct 18 '22 01:10 TenSeventy7

Seems to be a plasma bug. A patch is tested.

https://bugs.kde.org/show_bug.cgi?id=459778

edpil02 avatar Oct 18 '22 04:10 edpil02

After updating to plasma 5.26.2 the crash only happens if window shadows are enabled

Application: KWin (kwin_x11), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fbf66ffc007 in QRegion::~QRegion() () at /usr/lib/libQt5Gui.so.5
#5  0x00007fbf66f9fc2e in  () at /usr/lib/libQt5Gui.so.5
#6  0x00007fbf66fa4e1e in QRasterPaintEngine::~QRasterPaintEngine() () at /usr/lib/libQt5Gui.so.5
#7  0x00007fbf66d85910 in QImageData::~QImageData() () at /usr/lib/libQt5Gui.so.5
#8  0x00007fbf66d867ec in QImage::~QImage() () at /usr/lib/libQt5Gui.so.5
#9  0x00007fbf687857fd in KDecoration2::DecorationShadow::~DecorationShadow() () at /usr/lib/libkdecorations2.so.5
#10 0x00007fbf68284500 in KWin::Shadow::init(KDecoration2::Decoration*) () at /usr/lib/libkwin.so.5
#11 0x00007fbf682bfc73 in KWin::Window::updateShadow() () at /usr/lib/libkwin.so.5
#12 0x00007fbf668bd381 in  () at /usr/lib/libQt5Core.so.5
#13 0x00007fbf6877715a in KDecoration2::Decoration::shadowChanged(QSharedPointer<KDecoration2::DecorationShadow> const&) () at /usr/lib/libkdecorations2.so.5
#14 0x00007fbf58293aa1 in Breeze::Decoration::updateShadow(bool, bool, bool) () at /usr/lib/qt/plugins/org.kde.kdecoration2/klassydecoration.so
#15 0x00007fbf668bd381 in  () at /usr/lib/libQt5Core.so.5
#16 0x00007fbf666cce47 in QVariantAnimation::valueChanged(QVariant const&) () at /usr/lib/libQt5Core.so.5
#17 0x00007fbf666d35ac in  () at /usr/lib/libQt5Core.so.5
#18 0x00007fbf666d0463 in QAbstractAnimation::setCurrentTime(int) () at /usr/lib/libQt5Core.so.5
#19 0x00007fbf666d05cc in  () at /usr/lib/libQt5Core.so.5
#20 0x00007fbf666cb9a3 in QUnifiedTimer::updateAnimationTimers(long long) () at /usr/lib/libQt5Core.so.5
#21 0x00007fbf666cee02 in QAnimationDriver::advanceAnimation(long long) () at /usr/lib/libQt5Core.so.5
#22 0x00007fbf668b04c6 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#23 0x00007fbf65f78b1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#24 0x00007fbf6688cb88 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#25 0x00007fbf668d6d53 in QTimerInfoList::activateTimers() () at /usr/lib/libQt5Core.so.5
#26 0x00007fbf668d7202 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#27 0x00007fbf6092e613 in  () at /usr/lib/libQt5XcbQpa.so.5
#28 0x00007fbf6688532c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#29 0x00007fbf6688fe59 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#30 0x000056325f72de4d in  ()
#31 0x00007fbf6583c290 in  () at /usr/lib/libc.so.6
#32 0x00007fbf6583c34a in __libc_start_main () at /usr/lib/libc.so.6
#33 0x000056325f72f235 in  ()
[Inferior 1 (process 396147) detached]

luisbocanegra avatar Oct 26 '22 15:10 luisbocanegra