Bug 422973 - Setting DataSource interval manually causes segmentation fault
Summary: Setting DataSource interval manually causes segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: libplasma (show other bugs)
Version: 5.68.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-06-14 14:47 UTC by NSLW
Modified: 2020-07-07 08:26 UTC (History)
3 users (show)

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


Attachments
test case (1.58 KB, application/zip)
2020-06-14 14:47 UTC, NSLW
Details
KCrash log (3.97 KB, text/plain)
2020-06-14 14:48 UTC, NSLW
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NSLW 2020-06-14 14:47:32 UTC
Created attachment 129350 [details]
test case

SUMMARY

Running test case from attachment causes segmentation fault in plasmoidviewer and Plasma workspace. It hurts already published plasmoid that I wrote, which is called Workrave Applet.


STEPS TO REPRODUCE
1. download and unpack my test case
2. run install-and-run-plasmoid.sh in konsole

OBSERVED RESULT
Segmentation fault in KCrashHanlder


EXPECTED RESULT
No segmentation fault.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 32
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70
Qt Version: 5.13.2

ADDITIONAL INFO:
Test case works fine on
Linux/KDE Plasma: Fedora 32
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.68
Qt Version: 5.13.2
Comment 1 NSLW 2020-06-14 14:48:40 UTC
Created attachment 129351 [details]
KCrash log
Comment 2 NSLW 2020-07-04 20:05:29 UTC
No response from Marco, so adding Nate, who seems to be working on KDE Plasma Framework consistently.
Comment 3 David Edmundson 2020-07-04 22:39:27 UTC
Sorry for missing your bug report.

Thank you for the test case.
Comment 4 David Edmundson 2020-07-04 22:44:42 UTC
Valgrind log

==15021== Invalid read of size 8
==15021==    at 0x78754F8: QMapNodeBase::parent() const (qmap.h:95)
==15021==    by 0x78DD431: QMapNodeBase::nextNode() const (qmap.cpp:61)
==15021==    by 0x4986C67: QMapNode<unsigned int, Plasma::SignalRelay*>::nextNode() const (qmap.h:115)
==15021==    by 0x4984E6B: QMap<unsigned int, Plasma::SignalRelay*>::const_iterator::operator++() (qmap.h:491)
==15021==    by 0x49837CB: Plasma::DataContainer::checkForUpdate() (src/frameworks/plasma-framework/src/plasma/datacontainer.cpp:356)
==15021==    by 0x176A4F5D: ExecutableContainer::finished(int, QProcess::ExitStatus) (src/kde/workspace/plasma-workspace/dataengines/executable/executable.cpp:45)
==15021==    by 0x176A45B8: ExecutableContainer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_executable.cpp:79)
==15021==    by 0x7B2CB6B: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3898)
==15021==    by 0x7B2601E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3946)
==15021==    by 0x7A391F7: QProcess::finished(int, QProcess::ExitStatus) (moc_qprocess.cpp:339)
==15021==    by 0x7A36543: QProcessPrivate::_q_processDied() (qprocess.cpp:1184)
==15021==    by 0x7A38BD3: QProcess::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_qprocess.cpp:216)
==15021==  Address 0x12c3cb80 is 0 bytes inside a block of size 40 free'd
==15021==    at 0x483A9AB: free (vg_replace_malloc.c:538)
==15021==    by 0x78DE15A: QMapDataBase::freeNodeAndRebalance(QMapNodeBase*) (qmap.cpp:293)
==15021==    by 0x49860CF: QMapData<unsigned int, Plasma::SignalRelay*>::deleteNode(QMapNode<unsigned int, Plasma::SignalRelay*>*) (qmap.h:277)
==15021==    by 0x49846D5: QMap<unsigned int, Plasma::SignalRelay*>::remove(unsigned int const&) (qmap.h:912)
==15021==    by 0x498214F: Plasma::DataContainer::connectVisualization(QObject*, unsigned int, Plasma::Types::IntervalAlignment) (src/frameworks/plasma-framework/src/plasma/datacontainer.cpp:131)
==15021==    by 0x498764A: Plasma::DataEnginePrivate::connectSource(Plasma::DataContainer*, QObject*, unsigned int, Plasma::Types::IntervalAlignment, bool) (src/frameworks/plasma-framework/src/plasma/dataengine.cpp:558)
==15021==    by 0x4987369: Plasma::DataEngine::connectSource(QString const&, QObject*, unsigned int, Plasma::Types::IntervalAlignment) const (src/frameworks/plasma-framework/src/plasma/dataengine.cpp:131)
==15021==    by 0x14DD23E9: Plasma::DataSource::setupData() (src/frameworks/plasma-framework/src/declarativeimports/core/datasource.cpp:165)
==15021==    by 0x14DD2E19: Plasma::DataSource::setInterval(int) (src/frameworks/plasma-framework/src/declarativeimports/core/datasource.cpp:138)
==15021==    by 0x14DA54C0: Plasma::DataSource::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_datasource.cpp:328)
==15021==    by 0x14DA5BA0: Plasma::DataSource::qt_metacall(QMetaObject::Call, int, void**) (moc_datasource.cpp:391)
==15021==    by 0x7AE1A40: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (qmetaobject.cpp:316)
==15021==  Block was alloc'd at
==15021==    at 0x483977F: malloc (vg_replace_malloc.c:307)
==15021==    by 0x78DE1FD: qMapAllocate(int, int) (qmap.cpp:316)
==15021==    by 0x78DE266: QMapDataBase::createNode(int, int, QMapNodeBase*, bool) (qmap.cpp:329)
==15021==    by 0x49862F5: QMapData<unsigned int, Plasma::SignalRelay*>::createNode(unsigned int const&, Plasma::SignalRelay* const&, QMapNode<unsigned int, Plasma::SignalRelay*>*, bool) (qmap.h:222)
==15021==    by 0x499158F: QMap<unsigned int, Plasma::SignalRelay*>::insert(unsigned int const&, Plasma::SignalRelay* const&) (qmap.h:729)
==15021==    by 0x4991394: QMap<unsigned int, Plasma::SignalRelay*>::operator[](unsigned int const&) (qmap.h:679)
==15021==    by 0x499091F: Plasma::DataContainerPrivate::signalRelay(Plasma::DataContainer const*, QObject*, unsigned int, Plasma::Types::IntervalAlignment, bool) (src/frameworks/plasma-framework/src/plasma/private/datacontainer_p.cpp:38)
==15021==    by 0x49825B0: Plasma::DataContainer::connectVisualization(QObject*, unsigned int, Plasma::Types::IntervalAlignment) (src/frameworks/plasma-framework/src/plasma/datacontainer.cpp:183)
==15021==    by 0x498764A: Plasma::DataEnginePrivate::connectSource(Plasma::DataContainer*, QObject*, unsigned int, Plasma::Types::IntervalAlignment, bool) (src/frameworks/plasma-framework/src/plasma/dataengine.cpp:558)
==15021==    by 0x4987369: Plasma::DataEngine::connectSource(QString const&, QObject*, unsigned int, Plasma::Types::IntervalAlignment) const (src/frameworks/plasma-framework/src/plasma/dataengine.cpp:131)
==15021==    by 0x14DD253F: Plasma::DataSource::setConnectedSources(QStringList const&) (src/frameworks/plasma-framework/src/declarativeimports/core/datasource.cpp:57)
==15021==    by 0x14DA5513: Plasma::DataSource::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_datasource.cpp:332)
==15021== 
^C==15021==
Comment 5 Bug Janitor Service 2020-07-04 23:00:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/29
Comment 6 David Edmundson 2020-07-07 08:26:06 UTC
582d9ed3 in plasma-framework