As the title says. STEPS TO REPRODUCE 1. Open Workspace -> Desktop Behavior -> Virtual Desktops 2. Set rows > 1 3. Add a desktop VIA the Desktop Grid (Default hotkey: ctrl+F8) OBSERVED RESULT System Settings crashes with a segmentation fault EXPECTED RESULT System Settings does not crash with a segmentation fault ADDITIONAL INFORMATION Does not crash when Rows is 1. Does not crash when rows is > 1 but desktops added through the settings page.
Pleas attach a backtrace of the crash. https://community.kde.org/Get_Involved/Bug_Reporting#Crash_reports_must_include_backtraces
Created attachment 121050 [details] backtrace Here
Thank you! Thread 1 (Thread 0x7fa2955542c0 (LWP 1551)): [KCrash Handler] #6 0x00007fa258f5489d in std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=0xf00000001) at /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/g++-v8/bits/atomic_base.h:390 #7 QAtomicOps<int>::load<int> (_q_value=...) at /usr/include/qt5/QtCore/qatomic_cxx11.h:227 #8 QBasicAtomicInteger<int>::load (this=0xf00000001) at /usr/include/qt5/QtCore/qbasicatomic.h:103 #9 QtPrivate::RefCount::ref (this=0xf00000001) at /usr/include/qt5/QtCore/qrefcount.h:55 #10 QString::QString (other=..., this=0x7ffc8fb67218) at /usr/include/qt5/QtCore/qstring.h:958 #11 KWin::DesktopsModel::desktopCreated (this=0x55ea928c8ec0, id=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.15.5/work/kwin-5.15.5/kcmkwin/kwindesktop/desktopsmodel.cpp:503 #12 0x00007fa258f4a201 in KWin::DesktopsModel::qt_static_metacall (_o=_o@entry=0x55ea928c8ec0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=7, _a=_a@entry=0x7ffc8fb67390) at kcmkwin/kwindesktop/kcm_kwin_virtualdesktops_autogen/EWIEGA46WW/moc_desktopsmodel.cpp:183 #13 0x00007fa258f4a947 in KWin::DesktopsModel::qt_metacall (this=0x55ea928c8ec0, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7ffc8fb67390) at kcmkwin/kwindesktop/kcm_kwin_virtualdesktops_autogen/EWIEGA46WW/moc_desktopsmodel.cpp:315
Argh, this piece of code assumes that only kcm adds virtual desktops (during synchronization) // Remove dummy data. const QString dummyId = m_desktops.at(data.position); but that's not the case. It's also worth to point out that we can't just do if (uint(m_desktops.count()) < data.position) { // Replace the dummy virtual desktop with the actual one. emit dataChanged(idx, idx, { Id }); } else { beginInsertRows(); // Append the new virtual desktop. endInsertRows(); } because this will overwrite virtual desktops created by the user.
bug 409231 seems related/duplicate
*** Bug 409231 has been marked as a duplicate of this bug. ***
*** Bug 464975 has been marked as a duplicate of this bug. ***
This bug is a crash report that is over a year old without any activity, as our software is always changing, the information in this ticket is unlikely to still be useful. If this issue is still reproducible in a newer version of kwin (5.27.5 or 6.0) please reopen this ticket with a bumped version number or it will be closed in 30 days.
Can't reproduce my Bug 409231, so it's fixed for me. Thanks.