Bug 431592

Summary: systemsettings always crashes in Kirigami::BasicTheme::syncCustomColorsToQML() when closed
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Silvan Calarco <silvan.calarco>
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED NOT A BUG    
Severity: crash CC: nate
Priority: NOR Keywords: drkonqi
Version: 5.78.0   
Target Milestone: Not decided   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Silvan Calarco 2021-01-14 11:30:37 UTC
Application: systemsettings5 (5.20.5)

Qt Version: 5.15.2
Frameworks Version: 5.78.0
Operating System: Linux 5.4.77mamba-x86_64 x86_64
Windowing system: X11
Distribution: openmamba GNU/Linux 2020.12 for x86_64 (rolling)

-- Information about the crash:
- What I was doing when the application crashed:

1) open System Settings (systemsettings5)
2) do anything or just nothing
3) close systemsettings window by pressing [X] on the top-right corner
4) crash

Problem happens since some releases (maybe in the last 2-3 months) and also applies to other KDE Plasma applications.
All backtraces have libkirigami2 functions on top, so it seems the culprit.
Themes and styles are all set to Breeze.

The crash can be reproduced every time.

-- Backtrace:
Application: Impostazioni di sistema (systemsettings5), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fe3cf9bb958 in QObject::property(char const*) const () from /usr/lib64/libQt5Core.so.5
#5  0x00007fe3a9b45e6d in Kirigami::BasicThemeDeclarative::instance (this=this@entry=0x7fe3a9b566e0 <Kirigami::(anonymous namespace)::Q_QGS_privateBasicThemeDeclarativeSelf::innerFunction()::holder>, theme=0x7fff227992b0, theme@entry=0x562121f0df70) at /usr/src/debug/kirigami2-5.78.0-1mamba.x86_64/src/libkirigami/basictheme.cpp:65
#6  0x00007fe3a9b4d2ff in Kirigami::BasicTheme::syncCustomColorsToQML (this=0x562121f0df70) at /usr/src/debug/kirigami2-5.78.0-1mamba.x86_64/src/libkirigami/basictheme.cpp:27
#7  0x00007fe3cf9bfbb6 in ?? () from /usr/lib64/libQt5Core.so.5
#8  0x00007fe3a9b40ce2 in operator() (__closure=0x562121ce1690) at /usr/src/debug/kirigami2-5.78.0-1mamba.x86_64/src/libkirigami/platformtheme.cpp:202
#9  QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, Kirigami::PlatformThemePrivate::emitCompressedColorChanged()::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:146
#10 QtPrivate::Functor<Kirigami::PlatformThemePrivate::emitCompressedColorChanged()::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:256
#11 QtPrivate::QFunctorSlotObject<Kirigami::PlatformThemePrivate::emitCompressedColorChanged()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x562121ce1680, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:443
#12 0x00007fe3cf9b5601 in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#13 0x00007fe3d06a715f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007fe3cf9895da in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#15 0x00007fe3cf98c011 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5
#16 0x00007fe3cf9e14a3 in ?? () from /usr/lib64/libQt5Core.so.5
#17 0x00007fe3cb8be7b7 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#18 0x00007fe3cb8beb38 in ?? () from /usr/lib64/libglib-2.0.so.0
#19 0x00007fe3cb8bebef in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#20 0x00007fe3cf9e0b2f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#21 0x00007fe3cf987f9b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#22 0x00007fe3cf990210 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#23 0x0000562120783d2c in ?? ()
#24 0x00007fe3cf1f8152 in __libc_start_main (main=0x5621207834e0, argc=1, argv=0x7fff22799ad8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff22799ac8) at ../csu/libc-start.c:314
#25 0x00005621207846ee in _start ()
[Inferior 1 (process 9186) detached]

Possible duplicates by query: bug 422963, bug 415191, bug 414876, bug 414731, bug 414592.

Reported using DrKonqi
Comment 1 Nate Graham 2021-01-14 20:54:59 UTC
How odd. What color scheme are you using?
Comment 2 Silvan Calarco 2021-01-15 08:51:14 UTC
I'm using the default Breeze color scheme but also setting other schemes does not help.
Looking at the code below from src/libkirigami/basictheme.cpp I wonder what causes the crash in the last line, maybe some component is missing from installation but can't find a solution so far.

    //NOTE: for now is important this import stays at 2.0
    c.setData(R"(
import QtQuick 2.6
import org.kde.kirigami 2.0 as Kirigami

QtObject {
    property QtObject theme: Kirigami.Theme
}
)", QUrl(QStringLiteral("basictheme.cpp")));

    QObject *obj = c.create();
    m_declarativeBasicTheme = obj->property("theme").value<QObject *>();
Comment 3 Silvan Calarco 2021-02-08 16:08:40 UTC
Problem was caused by the lack of qqc2-desktop-style.
After installing the package the crash no longer occurs.