Summary: | Plasma failed after uninstalling widget | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | André Rodrigues <andrerferraz> |
Component: | general | Assignee: | David Edmundson <kde> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | bhush94, peter.ullinger, plasma-bugs |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.7.2 | ||
Target Milestone: | 1.0 | ||
Platform: | Slackware | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kpackage/cfb69e21fb0aad92f403487b4c8a75b2b0bc8041 | Version Fixed In: | |
Sentry Crash Report: |
Description
André Rodrigues
2016-10-14 00:25:23 UTC
Better trace Thread 1 (Thread 0x7f2edc01cf40 (LWP 26890)): [KCrash Handler] #6 0x00007f2ed939df46 in std::__atomic_base<int>::operator++ (this=0x7f2ed8892c33 <QQmlGuard<QObject>::setObject(QObject*)+59>) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/bits/atomic_base.h:296 #7 0x00007f2ed939df15 in QAtomicOps<int>::ref<int> (_q_value=...) at /opt/qt5/include/QtCore/qatomic_cxx11.h:265 #8 0x00007f2ed939def5 in QBasicAtomicInteger<int>::ref (this=0x7f2ed8892c33 <QQmlGuard<QObject>::setObject(QObject*)+59>) at /opt/qt5/include/QtCore/qbasicatomic.h:110 #9 0x00007f2ed939ecc4 in QWeakPointer<QObject>::QWeakPointer (this=0x7ffdf7952d30, other=...) at /opt/qt5/include/QtCore/qsharedpointer_impl.h:583 #10 0x00007f2ed939ec53 in QWeakPointer<QObject>::operator= (this=0x6074098, other=...) at /opt/qt5/include/QtCore/qsharedpointer_impl.h:596 #11 0x00007f2ed939d6af in QPointer<KPackage::PackageStructure>::operator= (this=0x6074098) at /opt/qt5/include/QtCore/qpointer.h:53 #12 0x00007f2ed939ad3a in KPackage::PackagePrivate::operator= (this=0x6074090, rhs=...) at /home/david/projects/kde5/src/frameworks/kpackage/src/kpackage/package.cpp:854 #13 0x00007f2ed939accd in KPackage::PackagePrivate::PackagePrivate (this=0x6074090, other=...) at /home/david/projects/kde5/src/frameworks/kpackage/src/kpackage/package.cpp:834 #14 0x00007f2ed939fe96 in QExplicitlySharedDataPointer<KPackage::PackagePrivate>::clone (this=0x7ffdf7950b50) at /opt/qt5/include/QtCore/qshareddata.h:248 #15 0x00007f2ed939fdf9 in QExplicitlySharedDataPointer<KPackage::PackagePrivate>::detach_helper (this=0x7ffdf7950b50) at /opt/qt5/include/QtCore/qshareddata.h:254 #16 0x00007f2ed939b8df in QExplicitlySharedDataPointer<KPackage::PackagePrivate>::detach (this=0x7ffdf7950b50) at /opt/qt5/include/QtCore/qshareddata.h:147 #17 0x00007f2ed9398437 in KPackage::Package::setPath (this=0x7ffdf7950b48, path=...) at /home/david/projects/kde5/src/frameworks/kpackage/src/kpackage/package.cpp:456 #18 0x00007f2ed93ab17f in KPackage::PackageJob::PackageJob(KPackage::Package*, QObject*)::$_0::operator()(QString const&) const (this=0x77d2ea0, installPath=...) at /home/david/projects/kde5/src/frameworks/kpackage/src/kpackage/private/packagejob.cpp:46 #19 0x00007f2ed93ab131 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QString const&>, void, KPackage::PackageJob::PackageJob(KPackage::Package*, QObject*)::$_0>::call(KPackage::PackageJob::PackageJob(KPackage::Package*, QObject*)::$_0&, void**) (f=..., arg=0x5d49550) at /opt/qt5/include/QtCore/qobjectdefs_impl.h:137 #20 0x00007f2ed93ab101 in QtPrivate::Functor<KPackage::PackageJob::PackageJob(KPackage::Package*, QObject*)::$_0, 1>::call<QtPrivate::List<QString const&>, void>(KPackage::PackageJob::PackageJob(KPackage::Package*, QObject*)::$_0&, void*, void**) (f=..., arg=0x5d49550) at /opt/qt5/include/QtCore/qobjectdefs_impl.h:194 #21 0x00007f2ed93ab0ad in QtPrivate::QFunctorSlotObject<KPackage::PackageJob::PackageJob(KPackage::Package*, QObject*)::$_0, 1, QtPrivate::List<QString const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x77d2e90, r=0x7bb6050, a=0x5d49550, ret=0x0) at /opt/qt5/include/QtCore/qobject_impl.h:168 #22 0x00007f2ed519a587 in QtPrivate::QSlotObjectBase::call (this=0x77d2e90, r=0x7bb6050, a=0x5d49550) at ../../include/QtCore/../../../../qt5/qtbase/src/corelib/kernel/qobject_impl.h:101 #23 0x00007f2ed518f9f1 in QMetaCallEvent::placeMetaCall (this=0x67331b0, object=0x7bb6050) at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:500 #24 0x00007f2ed5190ae2 in QObject::event (this=0x7bb6050, e=0x67331b0) at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:1263 #25 0x00007f2ed5c7c460 in QApplicationPrivate::notify_helper (this=0x2443500, receiver=0x7bb6050, e=0x67331b0) at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3741 #26 0x00007f2ed5c7984a in QApplication::notify (this=0x7ffdf7954690, receiver=0x7bb6050, e=0x67331b0) at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3101 #27 0x00007f2ed5156568 in QCoreApplication::notifyInternal2 (receiver=0x7bb6050, event=0x67331b0) at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:988 #28 0x00007f2ed515a5d4 in QCoreApplication::sendEvent (receiver=0x7bb6050, event=0x67331b0) at ../../include/QtCore/../../../../qt5/qtbase/src/corelib/kernel/qcoreapplication.h:231 #29 0x00007f2ed5157987 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x2439980) at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1636 #30 0x00007f2ed5157304 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1490 #31 0x00007f2ed51d2c2c in postEventSourceDispatch (s=0x2497900) at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:276 #32 0x00007f2ecd603e67 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #33 0x00007f2ecd6040d0 in ?? () from /usr/lib/libglib-2.0.so.0 #34 0x00007f2ecd60417c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #35 0x00007f2ed51d33e3 in QEventDispatcherGlib::processEvents (this=0x24a2f30, flags=...) at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:423 #36 0x00007f2ec9092b1e in QPAEventDispatcherGlib::processEvents (this=0x24a2f30, flags=...) at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp:121 #37 0x00007f2ed5152f4a in QEventLoop::processEvents (this=0x7ffdf7953ed0, flags=...) at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:134 #38 0x00007f2ed5153246 in QEventLoop::exec (this=0x7ffdf7953ed0, flags=...) at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:212 #39 0x00007f2ed5156cb2 in QCoreApplication::exec () at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1261 #40 0x00007f2ed55996c6 in QGuiApplication::exec () at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:1653 #41 0x00007f2ed5c79225 in QApplication::exec () at /run/media/david/15cbf614-32ad-44e8-9fdc-466f76304ed7/projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2917 #42 0x00000000004224c3 in main (argc=1, argv=0x7ffdf7954798) at /home/david/projects/kde5/src/kde/workspace/plasma-workspace/shell/main.cpp:166 Git commit cfb69e21fb0aad92f403487b4c8a75b2b0bc8041 by David Edmundson. Committed on 16/10/2016 at 12:13. Pushed by davidedmundson into branch 'master'. Fix dangling pointer in KPackageJob A KPackage::Package object uses qexplicitlyshareddata, and it designed to be kept on the stack and copied. However, PackageJob takes a pointer to a package, which it later updates, which is expected to exist for the lifecycle of the job. This means Package p = PackageLoader::self()->loadPackage(..); p.install(); will crash. Given that, I don't think this is an application error, and but a library bug. Both plasmashell installation and uninstallation have this problem: Related: bug 369935 As Package is not a QObject we can't just use a QWeakPointer, and we can't just copy the Package in the packagejob as we need to detatch and update the \*original\* KPackage instance. Also to match behaviour we need to do this without changing any other KPackage instances sharing the same shareddata. Not a neat fix at all, but there aren't many options that work without breaking API or behaviour. REVIEW: 129187 M +31 -1 autotests/plasmoidpackagetest.cpp M +1 -0 autotests/plasmoidpackagetest.h M +9 -0 src/kpackage/package.cpp M +20 -0 src/kpackage/private/package_p.h M +12 -1 src/kpackage/private/packagejob.cpp http://commits.kde.org/kpackage/cfb69e21fb0aad92f403487b4c8a75b2b0bc8041 *** Bug 371992 has been marked as a duplicate of this bug. *** |