Bug 385950

Summary: Crashes running a simple qml file
Product: [Frameworks and Libraries] frameworks-qqc2-desktop-style Reporter: Albert Astals Cid <aacid>
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED WORKSFORME    
Severity: normal CC: aspotashev, kde
Priority: NOR    
Version First Reported In: 5.39.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: The main.qml file that makes it crash

Description Albert Astals Cid 2017-10-19 15:02:06 UTC
Created attachment 108455 [details]
The main.qml file that makes it crash

$ qmlscene main.qml 
QObject::connect: invalid null parameter
Segmentation fault

the backtrace i have here is 
(gdb) bt
#0  0x00007fffd29ae9b1 in Kirigami::PlatformTheme::palette() const () from /usr/lib/libKF5Kirigami2.so.5
#1  0x00007fffd2bca640 in KQuickStyleItem::resolvePalette() () from /usr/lib/qt/qml/org/kde/qqc2desktopstyle/private/libqqc2desktopstyleplugin.so
#2  0x00007fffd2bca10c in KQuickStyleItem::initStyleOption() () from /usr/lib/qt/qml/org/kde/qqc2desktopstyle/private/libqqc2desktopstyleplugin.so
#3  0x00007fffd2bcae3d in KQuickStyleItem::sizeFromContents(int, int) () from /usr/lib/qt/qml/org/kde/qqc2desktopstyle/private/libqqc2desktopstyleplugin.so
#4  0x00007fffd2bcc14e in KQuickStyleItem::updateSizeHint() () from /usr/lib/qt/qml/org/kde/qqc2desktopstyle/private/libqqc2desktopstyleplugin.so
#5  0x00007fffd2bcda3e in KQuickStyleItem::setElementType(QString const&) () from /usr/lib/qt/qml/org/kde/qqc2desktopstyle/private/libqqc2desktopstyleplugin.so
#6  0x00007fffd2bd16d0 in KQuickStyleItem::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/qt/qml/org/kde/qqc2desktopstyle/private/libqqc2desktopstyleplugin.so
#7  0x00007ffff73df7a2 in ?? () from /usr/lib/libQt5Qml.so.5

Basically
  m_theme = static_cast<Kirigami::PlatformTheme *>(qmlAttachedPropertiesObject<Kirigami::PlatformTheme>(this, true));
is returning null
Comment 1 Albert Astals Cid 2018-02-20 15:10:13 UTC
Seems this works fine on 5.43