Bug 483072 - Crash in KScreen::WaylandBackend::setConfig() when changing refresh rate
Summary: Crash in KScreen::WaylandBackend::setConfig() when changing refresh rate
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kscreen (other bugs)
Version First Reported In: 6.2.0
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords: wayland-only
: 493088 503491 503549 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-10 05:46 UTC by Justin Zobel
Modified: 2025-05-26 14:28 UTC (History)
9 users (show)

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


Attachments
drm_info (100.03 KB, application/octet-stream)
2024-05-15 00:45 UTC, Justin Zobel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Zobel 2024-03-10 05:46:16 UTC
Built from kdesrc-build just today.

Crash also caused session to be destroyed losing any unsaved data.

#0  __pthread_kill_implementation (no_tid=0, signo=11, threadid=<optimized out>) at pthread_kill.c:44
#1  __pthread_kill_internal (signo=11, threadid=<optimized out>) at pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at pthread_kill.c:89
#3  0x00007f346fa44256 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#4  0x00007f3473276a2d in KCrash::defaultCrashHandler (sig=11) at /home/justin/kde/src/kcrash/src/kcrash.cpp:586
#5  0x00007f346fa44300 in <signal handler called> () at /usr/lib/glibc-hwcaps/x86-64-v3/libc.so.6
#6  0x00007f346fdc7f4b in QtWaylandClient::QWaylandShmBuffer::QWaylandShmBuffer(QtWaylandClient::QWaylandDisplay*, QSize const&, QImage::Format, double) () at /usr/lib/libQt6WaylandClient.so.6
#7  0x00007f346fdc996f in QtWaylandClient::QWaylandShmBackingStore::getBuffer(QSize const&) () at /usr/lib/libQt6WaylandClient.so.6
#8  0x00007f346fdc8af7 in QtWaylandClient::QWaylandShmBackingStore::resize(QSize const&) () at /usr/lib/libQt6WaylandClient.so.6
#9  0x00007f346fdc9c8f in ??? () at /usr/lib/libQt6WaylandClient.so.6
#10 0x00007f3470549f4d in QtPrivate::QSlotObjectBase::call (this=0x557777bd0390, r=0x557777be49b0, a=0x7fffc9a2cda8) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobjectdefs_impl.h:433
#11 doActivate<false> (sender=0x5577770dec50, signal_index=3, argv=0x7fffc9a2cda8) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:4039
#12 0x00007f346fda3125 in QtWaylandClient::QWaylandDisplay::reconnect() () at /usr/lib/libQt6WaylandClient.so.6
#13 0x00007f346fda3a41 in QtWaylandClient::QWaylandDisplay::checkWaylandError() () at /usr/lib/libQt6WaylandClient.so.6
#14 0x00007f347053fe7b in QObject::event (this=0x5577770dec50, e=0x7f345c0044e0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:1437
#15 0x00007f347243bde3 in QApplicationPrivate::notify_helper (this=0x5577770d7e60, receiver=0x5577770dec50, e=0x7f345c0044e0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:3296
#16 0x00007f347243cf9f in QApplication::notify (this=0x7fffc9a2ec20, receiver=0x5577770dec50, e=0x7f345c0044e0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:2697
#17 0x00007f34704eda1d in QCoreApplication::notifyInternal2 (receiver=0x5577770dec50, event=0x7f345c0044e0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1121
#18 0x00007f34704eed6f in QCoreApplication::sendEvent (receiver=0x5577770dec50, event=<optimized out>) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1539
#19 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5577770d63e0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1901
#20 0x00007f34707d1d36 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1760
#21 postEventSourceDispatch (s=s@entry=0x557777174350) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:243
#22 0x00007f346f313d5a in g_main_dispatch (context=context@entry=0x7f3464000ef0) at ../glib/gmain.c:3476
#23 0x00007f346f316ef7 in g_main_context_dispatch_unlocked (context=0x7f3464000ef0) at ../glib/gmain.c:4284
#24 g_main_context_iterate_unlocked (context=context@entry=0x7f3464000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4349
#25 0x00007f346f317571 in g_main_context_iteration (context=0x7f3464000ef0, may_block=1) at ../glib/gmain.c:4414
#26 0x00007f34707d1412 in QEventDispatcherGlib::processEvents (this=0x5577770ddc00, flags=...) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#27 0x00007f34704f8cea in QEventLoop::processEvents (this=0x7fffc9a2d440, flags=...) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:100
#28 QEventLoop::exec (this=this@entry=0x7fffc9a2d440, flags=flags@entry=...) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:182
#29 0x00007f345bfddac1 in KScreen::WaylandBackend::setConfig (newconfig=..., this=0x5577780e72f0) at /usr/include/qt6/QtCore/qflags.h:74
#30 KScreen::WaylandBackend::setConfig (this=0x5577780e72f0, newconfig=...) at /home/justin/kde/src/libkscreen/backends/kwayland/waylandbackend.cpp:53
#31 0x00007f3434b2ea06 in KScreen::SetConfigOperation::start (this=0x55777ae47c00) at /home/justin/kde/src/libkscreen/src/setconfigoperation.cpp:117
#32 0x00007f347053fe7b in QObject::event (this=0x55777ae47c00, e=0x7f345c003f70) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:1437
#33 0x00007f347243bde3 in QApplicationPrivate::notify_helper (this=0x5577770d7e60, receiver=0x55777ae47c00, e=0x7f345c003f70) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:3296
#34 0x00007f347243cf9f in QApplication::notify (this=0x7fffc9a2ec20, receiver=0x55777ae47c00, e=0x7f345c003f70) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:2697
#35 0x00007f34704eda1d in QCoreApplication::notifyInternal2 (receiver=0x55777ae47c00, event=0x7f345c003f70) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1121
#36 0x00007f34704eed6f in QCoreApplication::sendEvent (receiver=0x55777ae47c00, event=<optimized out>) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1539
#37 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5577770d63e0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1901
#38 0x00007f34707d1d36 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1760
#39 postEventSourceDispatch (s=s@entry=0x557777174350) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:243
#40 0x00007f346f313d5a in g_main_dispatch (context=context@entry=0x7f3464000ef0) at ../glib/gmain.c:3476
#41 0x00007f346f316ef7 in g_main_context_dispatch_unlocked (context=0x7f3464000ef0) at ../glib/gmain.c:4284
#42 g_main_context_iterate_unlocked (context=context@entry=0x7f3464000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4349
#43 0x00007f346f317571 in g_main_context_iteration (context=0x7f3464000ef0, may_block=1) at ../glib/gmain.c:4414
#44 0x00007f34707d1412 in QEventDispatcherGlib::processEvents (this=0x5577770ddc00, flags=...) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#45 0x00007f34704f8cea in QEventLoop::processEvents (this=0x7fffc9a2da40, flags=...) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:100
#46 QEventLoop::exec (this=this@entry=0x7fffc9a2da40, flags=flags@entry=...) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:182
#47 0x00007f3434b2a23e in KScreen::ConfigOperation::exec (this=0x55777ae47c00) at /usr/include/qt6/QtCore/qflags.h:74
#48 0x00007f3434b88261 in KCMKScreen::doSave (this=0x557777c0fc90) at /home/justin/kde/src/kscreen/kcm/kcm.cpp:196
#49 0x00007f3434b8744c in KCMKScreen::save (this=0x557777c0fc90) at /home/justin/kde/src/kscreen/kcm/kcm.cpp:112
#50 0x00007f3473977f12 in KCModuleQml::save (this=0x557778179f00) at /home/justin/kde/src/kcmutils/src/kcmoduleqml.cpp:267
#51 0x00007f3473a08522 in ModuleView::moduleSave (this=0x5577773cc100, module=<optimized out>) at /home/justin/kde/src/systemsettings/core/ModuleView.cpp:414
#52 0x00007f3473a0ada6 in ModuleView::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7fffc9a2dd90) at /home/justin/kde/build/systemsettings/core/systemsettingsview_autogen/include/moc_ModuleView.cpp:274
#53 0x00007f3470549f79 in doActivate<false> (sender=0x55777758d320, signal_index=9, argv=0x7fffc9a2dd90) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:4051
#54 0x00007f3472574be0 in QAbstractButton::clicked (this=0x55777758d320, _t1=false) at src/widgets/Widgets_autogen/include/moc_qabstractbutton.cpp:408
#55 QAbstractButtonPrivate::emitClicked (this=0x557777693270) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/widgets/qabstractbutton.cpp:379
#56 0x00007f34725748c2 in QAbstractButtonPrivate::click (this=0x557777693270) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/widgets/qabstractbutton.cpp:372
#57 0x00007f34725764bf in QAbstractButton::mouseReleaseEvent (this=0x55777758d320, e=0x7fffc9a2e3c0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/widgets/qabstractbutton.cpp:974
#58 0x00007f3472497b44 in QWidget::event (this=0x55777758d320, event=0x7fffc9a2e3c0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qwidget.cpp:8959
#59 0x00007f34726581a7 in QPushButton::event (this=0x55777758d320, e=0x7fffc9a2e3c0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/widgets/qpushbutton.cpp:683
#60 0x00007f347243bde3 in QApplicationPrivate::notify_helper (this=0x5577770d7e60, receiver=0x55777758d320, e=0x7fffc9a2e3c0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:3296
#61 0x00007f347243ea19 in QApplication::notify (this=<optimized out>, receiver=0x55777758d320, e=0x7fffc9a2e3c0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:2782
#62 0x00007f34704eda1d in QCoreApplication::notifyInternal2 (receiver=0x55777758d320, event=0x7fffc9a2e3c0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1121
#63 0x00007f347243c5e0 in QApplicationPrivate::sendMouseEvent (receiver=0x55777758d320, event=0x7fffc9a2e3c0, alienWidget=0x55777758d320, nativeWidget=0x557777476d00, buttonDown=0x7f3472923f50 <qt_button_down>, lastMouseReceiver=..., spontaneous=<optimized out>, onlyDispatchEnterLeave=<optimized out>)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:2366
#64 0x00007f34724b03e7 in QWidgetWindow::handleMouseEvent (this=0x557777be49b0, event=0x7fffc9a2e750) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qwidgetwindow.cpp:653
#65 QWidgetWindow::event (this=0x557777be49b0, event=0x7fffc9a2e750) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qwidgetwindow.cpp:267
#66 0x00007f347243bde3 in QApplicationPrivate::notify_helper (this=0x5577770d7e60, receiver=0x557777be49b0, e=0x7fffc9a2e750) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:3296
#67 0x00007f347243cf9f in QApplication::notify (this=0x7fffc9a2ec20, receiver=0x557777be49b0, e=0x7fffc9a2e750) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:2697
#68 0x00007f34704eda1d in QCoreApplication::notifyInternal2 (receiver=0x557777be49b0, event=0x7fffc9a2e750) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1121
#69 0x00007f3470c99c89 in QGuiApplicationPrivate::processMouseEvent (e=0x7f345c002dc0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/gui/kernel/qguiapplication.cpp:2325
#70 0x00007f3470d0bbdc in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/gui/kernel/qwindowsysteminterface.cpp:1109
#71 0x00007f34711564c1 in userEventSourceDispatch (source=source@entry=0x55777713c5c0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/gui/platform/unix/qeventdispatcher_glib.cpp:38
#72 0x00007f346f313d5a in g_main_dispatch (context=context@entry=0x7f3464000ef0) at ../glib/gmain.c:3476
#73 0x00007f346f316ef7 in g_main_context_dispatch_unlocked (context=0x7f3464000ef0) at ../glib/gmain.c:4284
#74 g_main_context_iterate_unlocked (context=context@entry=0x7f3464000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4349
#75 0x00007f346f317571 in g_main_context_iteration (context=0x7f3464000ef0, may_block=1) at ../glib/gmain.c:4414
#76 0x00007f34707d1412 in QEventDispatcherGlib::processEvents (this=0x5577770ddc00, flags=...) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#77 0x00007f34704f8cea in QEventLoop::processEvents (this=0x7fffc9a2eb20, flags=...) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:100
#78 QEventLoop::exec (this=0x7fffc9a2eb20, flags=...) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:182
#79 0x00007f34704ee147 in QCoreApplication::exec () at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1442
#80 0x0000557776cebaef in main (argc=<optimized out>, argv=<optimized out>) at /home/justin/kde/src/systemsettings/app/main.cpp:175
Comment 1 Nate Graham 2024-03-12 00:06:22 UTC
What process crashed? systemsettings, or kwin_wayland?
Comment 2 Justin Zobel 2024-03-12 00:11:49 UTC
Systemsettings:

Sun 2024-03-10 16:09:19 ACDT 1745848 1001 1004 SIGSEGV present  /home/justin/kde/usr/bin/systemsettings                                     14.4M
Sun 2024-03-10 16:09:20 ACDT 1746099 1001 1004 SIGABRT present  /usr/lib64/kf6/drkonqi                                                     806.7K
Sun 2024-03-10 16:09:20 ACDT 1746080 1001 1004 SIGABRT present  /usr/lib64/kf6/xdg-desktop-portal-kde                                      983.6K
Sun 2024-03-10 16:09:21 ACDT 1746146 1001 1004 SIGABRT present  /usr/lib64/kf6/xdg-desktop-portal-kde                                      981.8K

Then immediately after it, drkonqi and then xdg portal
Comment 3 Justin Zobel 2024-03-13 00:53:18 UTC
To add further context to this. I was changing two settings, screen layout and refresh rate.

I tried just today changing the screen layout on it's own and it works fine, no freeze/crash.

So the refresh rate change is what causes it.
Comment 4 Nate Graham 2024-03-13 17:58:09 UTC
Aha! That's helpful, thanks. Is it 100% reproducible that changing both at once causes a crash, but changing only one at a time does not?
Comment 5 Justin Zobel 2024-05-09 10:03:36 UTC
Crashes just when applying the refresh rate, have just tested. It freezes for (estimated) 20-30 seconds and then kills the whole session and I'm back at SDDM.
Comment 6 Nate Graham 2024-05-09 19:53:31 UTC
Thanks. And it's still happening with the same backtrace?
Comment 7 Justin Zobel 2024-05-09 23:30:51 UTC
I'm not sure if it's the same but I'll paste it just in case. I'd also just started a kdesrc-build so I cancelled it real quick and one ?? shows up in the backtrace, but hopefully it's still useful.

Also of note, when the crash and session being killed happens, all other apps crash on their way out:
Fri 2024-05-10 08:57:01 ACST    7098 1000 1000 SIGSEGV present  /home/justin/kde/usr/bin/marknote                                                     9.7M
Fri 2024-05-10 08:57:01 ACST   10922 1000 1000 SIGABRT present  /home/justin/kde/usr/lib64/libexec/xdg-desktop-portal-kde                          1007.3K
Fri 2024-05-10 08:57:01 ACST   10584 1000 1000 SIGSEGV present  /home/justin/kde/usr/bin/systemsettings                                              13.9M
Fri 2024-05-10 08:57:02 ACST   10989 1000 1000 SIGABRT present  /usr/lib64/kf6/drkonqi                                                              811.0K
Fri 2024-05-10 08:57:02 ACST   11018 1000 1000 SIGABRT present  /usr/lib64/kf6/xdg-desktop-portal-kde                                               987.8K
Fri 2024-05-10 08:57:02 ACST   11105 1000 1000 SIGABRT present  /usr/lib64/kf6/drkonqi                                                              810.4K
Fri 2024-05-10 08:57:02 ACST   11103 1000 1000 SIGABRT present  /usr/lib64/kf6/xdg-desktop-portal-kde                                               988.2K
Fri 2024-05-10 08:57:02 ACST    7014 1000 1000 SIGSEGV present  /home/justin/kde/usr/bin/neochat                                                     57.0M
Fri 2024-05-10 08:57:03 ACST   11151 1000 1000 SIGABRT present  /usr/lib64/kf6/xdg-desktop-portal-kde                                               987.6K
Fri 2024-05-10 08:57:03 ACST   11182 1000 1000 SIGABRT present  /usr/lib64/kf6/drkonqi                                                              811.3K
Fri 2024-05-10 08:57:03 ACST   11200 1000 1000 SIGABRT present  /usr/lib64/kf6/xdg-desktop-portal-kde                                               988.4K
Fri 2024-05-10 08:57:03 ACST   11236 1000 1000 SIGABRT present  /usr/lib64/kf6/xdg-desktop-portal-kde                                               987.4K


systemsettings Backtrace:

#0  __pthread_kill_implementation (no_tid=0, signo=11, threadid=<optimized out>) at pthread_kill.c:44
#1  __pthread_kill_internal (signo=11, threadid=<optimized out>) at pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at pthread_kill.c:89
#3  0x00007f95d0e5a256 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#4  0x00007f95d5455122 in KCrash::defaultCrashHandler (sig=11) at /home/justin/kde/src/kcrash/src/kcrash.cpp:593
#5  0x00007f95d0e5a300 in <signal handler called> () at /usr/lib/glibc-hwcaps/x86-64-v3/libc.so.6
#6  0x00007f95d0d05f7b in QtWaylandClient::QWaylandShmBuffer::QWaylandShmBuffer(QtWaylandClient::QWaylandDisplay*, QSize const&, QImage::Format, double) ()
    at /usr/lib/libQt6WaylandClient.so.6
#7  0x00007f95d0d0799f in QtWaylandClient::QWaylandShmBackingStore::getBuffer(QSize const&) () at /usr/lib/libQt6WaylandClient.so.6
#8  0x00007f95d0d06b27 in QtWaylandClient::QWaylandShmBackingStore::resize(QSize const&) () at /usr/lib/libQt6WaylandClient.so.6
#9  0x00007f95d0d07cbf in ??? () at /usr/lib/libQt6WaylandClient.so.6
#10 0x00007f95d174be4d in QtPrivate::QSlotObjectBase::call (this=0x560531fe7600, r=0x560532402c00, a=0x7ffcc91311c8)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qobjectdefs_impl.h:433
#11 doActivate<false> (sender=0x560531d41e20, signal_index=3, argv=0x7ffcc91311c8)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qobject.cpp:4039
#12 0x00007f95d0ce1127 in QtWaylandClient::QWaylandDisplay::reconnect() () at /usr/lib/libQt6WaylandClient.so.6
#13 0x00007f95d0ce1a81 in QtWaylandClient::QWaylandDisplay::checkWaylandError() () at /usr/lib/libQt6WaylandClient.so.6
#14 0x00007f95d1741d7b in QObject::event (this=0x560531d41e20, e=0x7f95c0002010)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qobject.cpp:1437
#15 0x00007f95d363bf53 in QApplicationPrivate::notify_helper (this=0x560531d3ad40, receiver=0x560531d41e20, e=0x7f95c0002010)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/kernel/qapplication.cpp:3296
#16 0x00007f95d363d10f in QApplication::notify (this=0x7ffcc9133200, receiver=0x560531d41e20, e=0x7f95c0002010)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/kernel/qapplication.cpp:2697
#17 0x00007f95d16ef90d in QCoreApplication::notifyInternal2 (receiver=0x560531d41e20, event=0x7f95c0002010)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qcoreapplication.cpp:1121
#18 0x00007f95d16f0c5f in QCoreApplication::sendEvent (receiver=0x560531d41e20, event=<optimized out>)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qcoreapplication.cpp:1539
#19 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x560531d38930)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qcoreapplication.cpp:1901
#20 0x00007f95d19d3f06 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qcoreapplication.cpp:1760
#21 postEventSourceDispatch (s=s@entry=0x560531d95080)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qeventdispatcher_glib.cpp:243
#22 0x00007f95d051249a in g_main_dispatch (context=context@entry=0x7f95c8000f00) at ../glib/gmain.c:3344
#23 0x00007f95d0515677 in g_main_context_dispatch_unlocked (context=0x7f95c8000f00) at ../glib/gmain.c:4152
#24 g_main_context_iterate_unlocked (context=context@entry=0x7f95c8000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../glib/gmain.c:4217
#25 0x00007f95d0515cf1 in g_main_context_iteration (context=0x7f95c8000f00, may_block=1) at ../glib/gmain.c:4282
#26 0x00007f95d19d35e2 in QEventDispatcherGlib::processEvents (this=0x560531d40a10, flags=...)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#27 0x00007f95d16fabda in QEventLoop::processEvents (this=0x7ffcc9131870, flags=...)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qeventloop.cpp:100
#28 QEventLoop::exec (this=0x7ffcc9131870, flags=...)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qeventloop.cpp:182
#29 0x00007f95a2fc792b in KScreen::WaylandBackend::setConfig (this=0x560533deeb60, newconfig=...)
    at /home/justin/kde/src/libkscreen/backends/kwayland/waylandbackend.cpp:64
#30 0x00007f95a3b90dae in KScreen::SetConfigOperation::start (this=0x5605353c0fa0) at /home/justin/kde/src/libkscreen/src/setconfigoperation.cpp:117
#31 0x00007f95a3b89682 in KScreen::ConfigOperation::qt_static_metacall (_o=0x5605353c0fa0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x560535886378)
    at /home/justin/kde/build/libkscreen/src/KF6Screen_autogen/include/moc_configoperation.cpp:133
#32 0x00007f95d1741d7b in QObject::event (this=0x5605353c0fa0, e=0x560535886330)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qobject.cpp:1437
#33 0x00007f95d363bf53 in QApplicationPrivate::notify_helper (this=0x560531d3ad40, receiver=0x5605353c0fa0, e=0x560535886330)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/kernel/qapplication.cpp:3296
#34 0x00007f95d363d10f in QApplication::notify (this=0x7ffcc9133200, receiver=0x5605353c0fa0, e=0x560535886330)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/kernel/qapplication.cpp:2697
#35 0x00007f95d16ef90d in QCoreApplication::notifyInternal2 (receiver=0x5605353c0fa0, event=0x560535886330)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qcoreapplication.cpp:1121
#36 0x00007f95d16f0c5f in QCoreApplication::sendEvent (receiver=0x5605353c0fa0, event=<optimized out>)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qcoreapplication.cpp:1539
#37 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x560531d38930)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qcoreapplication.cpp:1901
#38 0x00007f95d19d3f06 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qcoreapplication.cpp:1760
#39 postEventSourceDispatch (s=s@entry=0x560531d95080)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qeventdispatcher_glib.cpp:243
#40 0x00007f95d051249a in g_main_dispatch (context=context@entry=0x7f95c8000f00) at ../glib/gmain.c:3344
#41 0x00007f95d0515677 in g_main_context_dispatch_unlocked (context=0x7f95c8000f00) at ../glib/gmain.c:4152
#42 g_main_context_iterate_unlocked (context=context@entry=0x7f95c8000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../glib/gmain.c:4217
#43 0x00007f95d0515cf1 in g_main_context_iteration (context=0x7f95c8000f00, may_block=1) at ../glib/gmain.c:4282
#44 0x00007f95d19d35e2 in QEventDispatcherGlib::processEvents (this=0x560531d40a10, flags=...)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#45 0x00007f95d16fabda in QEventLoop::processEvents (this=0x7ffcc9131f00, flags=...)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qeventloop.cpp:100
#46 QEventLoop::exec (this=0x7ffcc9131f00, flags=...)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qeventloop.cpp:182
#47 0x00007f95a3b8937b in KScreen::ConfigOperation::exec (this=0x5605353c0fa0) at /home/justin/kde/src/libkscreen/src/configoperation.cpp:112
#48 0x00007f95a3f8e2b9 in KCMKScreen::doSave (this=0x560532b64bd0) at /home/justin/kde/src/kscreen/kcm/kcm.cpp:196
#49 0x00007f95a3f8d4a4 in KCMKScreen::save (this=0x560532b64bd0) at /home/justin/kde/src/kscreen/kcm/kcm.cpp:112
#50 0x00007f95d5645ee7 in KCModuleQml::save (this=0x560533f16030) at /home/justin/kde/src/kcmutils/src/kcmoduleqml.cpp:267
#51 0x0000560530dcf7f5 in ModuleView::moduleSave (this=0x5605323b5f80, module=0x560533f16030) at /home/justin/kde/src/systemsettings/app/ModuleView.cpp:409
#52 0x0000560530dcf7a5 in ModuleView::moduleSave (this=0x5605323b5f80) at /home/justin/kde/src/systemsettings/app/ModuleView.cpp:400
#53 0x0000560530dd12bc in ModuleView::qt_static_metacall (_o=0x5605323b5f80, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7ffcc91322f0)
    at /home/justin/kde/build/systemsettings/app/systemsettings_autogen/include/moc_ModuleView.cpp:274
#54 0x00007f95d174be79 in doActivate<false> (sender=0x5605324de2f0, signal_index=9, argv=0x7ffcc91322f0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qobject.cpp:4051
#55 0x00007f95d3774b90 in QAbstractButton::clicked (this=0x5605324de2f0, _t1=false) at src/widgets/Widgets_autogen/include/moc_qabstractbutton.cpp:408
#56 QAbstractButtonPrivate::emitClicked (this=0x5605323f15f0)
--Type <RET> for more, q to quit, c to continue without paging--c
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/widgets/qabstractbutton.cpp:379
#57 0x00007f95d3774872 in QAbstractButtonPrivate::click (this=0x5605323f15f0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/widgets/qabstractbutton.cpp:372
#58 0x00007f95d377646f in QAbstractButton::mouseReleaseEvent (this=0x5605324de2f0, e=0x7ffcc9132920)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/widgets/qabstractbutton.cpp:974
#59 0x00007f95d3697c44 in QWidget::event (this=0x5605324de2f0, event=0x7ffcc9132920)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/kernel/qwidget.cpp:8985
#60 0x00007f95d3858597 in QPushButton::event (this=0x5605324de2f0, e=0x7ffcc9132920)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/widgets/qpushbutton.cpp:683
#61 0x00007f95d363bf53 in QApplicationPrivate::notify_helper (this=0x560531d3ad40, receiver=0x5605324de2f0, e=0x7ffcc9132920)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/kernel/qapplication.cpp:3296
#62 0x00007f95d363eb89 in QApplication::notify (this=<optimized out>, receiver=0x5605324de2f0, e=0x7ffcc9132920)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/kernel/qapplication.cpp:2782
#63 0x00007f95d16ef90d in QCoreApplication::notifyInternal2 (receiver=0x5605324de2f0, event=0x7ffcc9132920)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qcoreapplication.cpp:1121
#64 0x00007f95d363c750 in QApplicationPrivate::sendMouseEvent
    (receiver=0x5605324de2f0, event=0x7ffcc9132920, alienWidget=0x5605324de2f0, nativeWidget=0x56053206b4f0, buttonDown=0x7f95d3b24880 <qt_button_down>, lastMouseReceiver=..., spontaneous=<optimized out>, onlyDispatchEnterLeave=<optimized out>)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/kernel/qapplication.cpp:2366
#65 0x00007f95d36b0317 in QWidgetWindow::handleMouseEvent (this=0x560532402c00, event=0x7ffcc9132cb0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/kernel/qwidgetwindow.cpp:653
#66 QWidgetWindow::event (this=0x560532402c00, event=0x7ffcc9132cb0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/kernel/qwidgetwindow.cpp:267
#67 0x00007f95d363bf53 in QApplicationPrivate::notify_helper (this=0x560531d3ad40, receiver=0x560532402c00, e=0x7ffcc9132cb0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/kernel/qapplication.cpp:3296
#68 0x00007f95d363d10f in QApplication::notify (this=0x7ffcc9133200, receiver=0x560532402c00, e=0x7ffcc9132cb0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/widgets/kernel/qapplication.cpp:2697
#69 0x00007f95d16ef90d in QCoreApplication::notifyInternal2 (receiver=0x560532402c00, event=0x7ffcc9132cb0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qcoreapplication.cpp:1121
#70 0x00007f95d1e99ef9 in QGuiApplicationPrivate::processMouseEvent (e=0x5605358a0050)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/gui/kernel/qguiapplication.cpp:2325
#71 0x00007f95d1f0bfcc in QWindowSystemInterface::sendWindowSystemEvents (flags=...)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/gui/kernel/qwindowsysteminterface.cpp:1109
#72 0x00007f95d2357161 in userEventSourceDispatch (source=source@entry=0x560531de82f0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/gui/platform/unix/qeventdispatcher_glib.cpp:38
#73 0x00007f95d051249a in g_main_dispatch (context=context@entry=0x7f95c8000f00) at ../glib/gmain.c:3344
#74 0x00007f95d0515677 in g_main_context_dispatch_unlocked (context=0x7f95c8000f00) at ../glib/gmain.c:4152
#75 g_main_context_iterate_unlocked (context=context@entry=0x7f95c8000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../glib/gmain.c:4217
#76 0x00007f95d0515cf1 in g_main_context_iteration (context=0x7f95c8000f00, may_block=1) at ../glib/gmain.c:4282
#77 0x00007f95d19d35e2 in QEventDispatcherGlib::processEvents (this=0x560531d40a10, flags=...)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#78 0x00007f95d16fabda in QEventLoop::processEvents (this=0x7ffcc9133080, flags=...)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qeventloop.cpp:100
#79 QEventLoop::exec (this=0x7ffcc9133080, flags=...)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qeventloop.cpp:182
#80 0x00007f95d16f0037 in QCoreApplication::exec ()
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.6.3/src/corelib/kernel/qcoreapplication.cpp:1442
#81 0x0000560530da28b6 in main (argc=1, argv=0x7ffcc91334e8) at /home/justin/kde/src/systemsettings/app/main.cpp:175
Comment 8 Nate Graham 2024-05-14 22:36:17 UTC
Looks like the same backtrace. Can you attach the output of `drm_info`?
Comment 9 Justin Zobel 2024-05-15 00:45:07 UTC
Created attachment 169489 [details]
drm_info
Comment 10 Nate Graham 2024-05-15 04:20:11 UTC
Thanks. Any ideas, Xaver and Vlad?
Comment 11 Vlad Zahorodnii 2024-05-15 11:31:36 UTC
Does kwin crash when you change the refresh rate?
Comment 12 Justin Zobel 2024-05-16 00:26:41 UTC
Comment #7 includes the list of things that crash when this happens.
Comment 13 David Edmundson 2025-05-15 15:15:20 UTC
>Thanks. Any ideas, Xaver and Vlad?

The problematic part is


>std::expected<void, QString> WaylandBackend::setConfig(const KScreen::ConfigPtr &newconfig)
>    QEventLoop loop;

We're processing things new things whilst processing our existing mouse click. It's like turning a gun on ourselves, we can dodge the bullets (fix the crash), but we're better off not having a gun in the first place.
Comment 14 David Edmundson 2025-05-15 15:56:13 UTC
KScreen::configOperation has an async front end. So fixing might not be too bad.
Comment 15 Bug Janitor Service 2025-05-19 10:51:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libkscreen/-/merge_requests/250
Comment 16 David Edmundson 2025-05-23 07:08:31 UTC
Git commit d566f4f1f9c0bf7f27166874d1dceeae7427c10c by David Edmundson.
Committed on 23/05/2025 at 05:14.
Pushed by davidedmundson into branch 'master'.

Allow for async in-process backends

The public facing API of kscreen allows for async operations.
For DBus-based out of process backends, this is a call to another
process.

Both in-process and out-of-process backends share the same abstraction
to apply the configuration. This is fine for X11 where it's out of
process, but causes the wayland implementation to spawn a nested event
loop. Nested event loops are bad.

This change introduces a path for backends to provide an async reponse
to set config operation, and map that to the existing async public
interface.

The wayland backend uses an additional QObject to scope the signals to
cleanup and auto-disconnect when either signal fires.

M  +2    -2    backends/fake/fake.cpp
M  +1    -1    backends/fake/fake.h
M  +40   -14   backends/kwayland/waylandbackend.cpp
M  +1    -1    backends/kwayland/waylandbackend.h
M  +3    -3    backends/xrandr/xrandr.cpp
M  +1    -1    backends/xrandr/xrandr.h
M  +7    -2    src/abstractbackend.h
M  +2    -1    src/backendlauncher/backenddbuswrapper.cpp
M  +12   -2    src/setconfigoperation.cpp

https://invent.kde.org/plasma/libkscreen/-/commit/d566f4f1f9c0bf7f27166874d1dceeae7427c10c
Comment 17 Vlad Zahorodnii 2025-05-23 17:08:29 UTC
Git commit 6d225cd516f9bd883f12042d7e7a5dbbe90a2665 by Vlad Zahorodnii.
Committed on 23/05/2025 at 17:08.
Pushed by vladz into branch 'Plasma/6.4'.

Allow for async in-process backends

The public facing API of kscreen allows for async operations.
For DBus-based out of process backends, this is a call to another
process.

Both in-process and out-of-process backends share the same abstraction
to apply the configuration. This is fine for X11 where it's out of
process, but causes the wayland implementation to spawn a nested event
loop. Nested event loops are bad.

This change introduces a path for backends to provide an async reponse
to set config operation, and map that to the existing async public
interface.

The wayland backend uses an additional QObject to scope the signals to
cleanup and auto-disconnect when either signal fires.


(cherry picked from commit d566f4f1f9c0bf7f27166874d1dceeae7427c10c)

Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>

M  +2    -2    backends/fake/fake.cpp
M  +1    -1    backends/fake/fake.h
M  +40   -14   backends/kwayland/waylandbackend.cpp
M  +1    -1    backends/kwayland/waylandbackend.h
M  +3    -3    backends/qscreen/qscreenbackend.cpp
M  +1    -1    backends/qscreen/qscreenbackend.h
M  +3    -3    backends/xrandr/xrandr.cpp
M  +1    -1    backends/xrandr/xrandr.h
M  +7    -2    src/abstractbackend.h
M  +2    -1    src/backendlauncher/backenddbuswrapper.cpp
M  +12   -2    src/setconfigoperation.cpp

https://invent.kde.org/plasma/libkscreen/-/commit/6d225cd516f9bd883f12042d7e7a5dbbe90a2665
Comment 18 David Edmundson 2025-05-26 12:37:50 UTC
*** Bug 503491 has been marked as a duplicate of this bug. ***
Comment 19 David Edmundson 2025-05-26 12:38:00 UTC
*** Bug 493088 has been marked as a duplicate of this bug. ***
Comment 20 Zamundaaa 2025-05-26 14:28:20 UTC
*** Bug 503549 has been marked as a duplicate of this bug. ***