Bug 464357 - Discover crashed in Transaction::Transaction() when trying to install or uninstall any addon
Summary: Discover crashed in Transaction::Transaction() when trying to install or unin...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: unspecified
Platform: Neon Linux
: VHI crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: drkonqi, regression
Depends on:
Blocks:
 
Reported: 2023-01-16 01:01 UTC by guimarcalsilva
Modified: 2023-02-01 16:01 UTC (History)
2 users (show)

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


Attachments
New crash information added by DrKonqi (113.42 KB, text/plain)
2023-01-16 01:01 UTC, guimarcalsilva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description guimarcalsilva 2023-01-16 01:01:44 UTC
Application: plasma-discover (5.26.80)

Qt Version: 5.15.8
Frameworks Version: 5.102.0
Operating System: Linux 5.15.0-58-generic x86_64
Windowing System: Wayland
Distribution: KDE neon Unstable Edition
DrKonqi: 5.26.80 [CoredumpBackend]

-- Information about the crash:
I wanted to browse useful addons for Dolphin, so I went to the Dolphin page and clicked on Addons. To my surprise, FFMPEG Thumbnailer (ffmpegthumbs) was listed as not installed. When selecting it and hitting apply, Discover crashed. This happens everytime. After the crash, I checked and ffmpegthumbs is already installed, but the addons page showed it as not installed. I think that's the reason for the crash.

If you want to reproduce, try installing ffmpegthumbs manually from your distro's repos and then try to install it again in the Discover addons page for Dolphin.

The crash can be reproduced every time.

-- Backtrace (Reduced):
#6  std::__atomic_base<QThreadData*>::load(std::memory_order) const (__m=std::memory_order_relaxed, this=<error reading variable: Cannot access memory at address 0x4081b00000000008>) at /usr/include/c++/11/bits/atomic_base.h:836
#7  std::atomic<QThreadData*>::load(std::memory_order) const (__m=std::memory_order_relaxed, this=<error reading variable: Cannot access memory at address 0x4081b00000000008>) at /usr/include/c++/11/atomic:570
#8  QAtomicOps<QThreadData*>::loadRelaxed<QThreadData*>(std::atomic<QThreadData*> const&) (_q_value=<error reading variable: Cannot access memory at address 0x4081b00000000008>) at ../../include/QtCore/../../src/corelib/thread/qatomic_cxx11.h:239
#9  QBasicAtomicPointer<QThreadData>::loadRelaxed() const (this=<error reading variable: Cannot access memory at address 0x4081b00000000008>) at ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:248
#10 QObject::thread() const (this=this@entry=0x4081b00000000000) at kernel/qobject.cpp:1520


The reporter indicates this bug may be a duplicate of or related to bug 459542.

Reported using DrKonqi
Comment 1 guimarcalsilva 2023-01-16 01:01:47 UTC
Created attachment 155334 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 guimarcalsilva 2023-01-16 01:03:12 UTC
The fact Discover didn't list ffmpegthumbs as installed might be related to another bug report I made a while back: https://bugs.kde.org/show_bug.cgi?id=449771
Comment 3 Nate Graham 2023-01-17 21:06:38 UTC
Can also reproduce 100% for any app, when either installing or uninstalling addons.

Pasting full symbolicated backtrace inline for searchability:

#0  QObject::thread() const (this=this@entry=0x407c600000000000) at kernel/qobject.cpp:1520
#1  0x00007ffff58d8eaf in QObject::QObject(QObjectPrivate&, QObject*)
    (this=0x1d63dc0, dd=..., parent=0x407c600000000000) at kernel/qobject.cpp:937
#2  0x00007ffff7eb7c6b in Transaction::Transaction(QObject*, AbstractResource*, Transaction::Role, AddonList const&)
     (this=this@entry=0x1d63dc0, parent=<optimized out>, resource=0x407c600000000000, role=role@entry=Transaction::RemoveRole, addons=...)
    at /home/nate/kde/src/discover/libdiscover/Transaction/Transaction.cpp:22
#3  0x00007fff8828f876 in PKTransaction::PKTransaction(QVector<AbstractResource*> const&, Transaction::Role) (this=0x1d63dc0, apps=..., role=Transaction::RemoveRole)
    at /usr/include/qt5/QtCore/qvector.h:243
#4  0x00007fff882764f9 in PackageKitBackend::installApplication(AbstractResource*, AddonList const&)
    (this=0x7ffd00, app=<optimized out>, addons=<optimized out>)
    at /home/nate/kde/src/discover/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp:739
#5  0x00007ffff7ebfd1c in ResourcesModel::installApplication(AbstractResource*, AddonList const&)
     (this=<optimized out>, app=0x186c920, addons=...)
    at /home/nate/kde/src/discover/libdiscover/resources/ResourcesModel.cpp:226
#6  0x00007ffff7eda86a in ApplicationAddonsModel::applyChanges() (this=<optimized out>)
    at /home/nate/kde/src/discover/libdiscover/ApplicationAddonsModel.cpp:117
#7  0x00007ffff7edab85 in ApplicationAddonsModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
    (_o=_o@entry=0x104c0e0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=3, _a=_a@entry=0x7fffffffa300)
    at /home/nate/kde/build/discover/libdiscover/DiscoverCommon_autogen/include/moc_ApplicationAddonsModel.cpp:111
#8  0x00007ffff7edb4c3 in ApplicationAddonsModel::qt_metacall(QMetaObject::Call, int, void**)
    (this=0x104c0e0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffffffa300)
    at /home/nate/kde/build/discover/libdiscover/DiscoverCommon_autogen/include/moc_ApplicationAddonsModel.cpp:186
#9  0x00007ffff66e9933 in QQmlObjectOrGadget::metacall(QMetaObject::Call, int, void**) const
    (this=0x7fffffffa550, 
    this@entry=0x7fffffffa3a0, type=type@entry=QMetaObject::InvokeMetaMethod, index=<optimized out>, 
    index@entry=58, argv=argv@entry=0x7fffffffa300) at qml/qqmlobjectorgadget.cpp:51
#10 0x00007ffff65c057d in CallMethod
   
     (callType=QMetaObject::InvokeMetaMethod, callArgs=0x7fff9a3c0580, engine=0x74b050, argTypes=0x0, argCount=0, returnType=43, index=<optimized out>, object=...)
    at jsruntime/qv4qobjectwrapper.cpp:1318
#11 CallPrecise(QQmlObjectOrGadget const&, QQmlPropertyData const&, QV4::ExecutionEngine*, QV4::CallData*, QMetaObject::Call)
    (object=..., data=..., engine=engine@entry=0x74b050, callArgs=callArgs@entry=0x7fff9a3c0580, callType=callType@entry=QMetaObject::InvokeMetaMethod) at jsruntime/qv4qobjectwrapper.cpp:1572
#12 0x00007ffff65c3910 in CallOverloaded
    (callType=<optimized out>, propertyCache=<optimized out>, callArgs=<optimized out>, engine=<optimized out>, data=<optimized out>, object=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:1644
#13 QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, int) const
    (this=<optimized out>, thisObject=<optimized out>, argv=<optimized out>, argc=<optimized out>)
    at jsruntime/qv4qobjectwrapper.cpp:2132
#14 0x00007ffff65e090d in QV4::FunctionObject::call(QV4::Value const*, QV4::Value const*, int) const
    (argc=<optimized out>, argv=<optimized out>, thisObject=<optimized out>, this=<optimized out>)
    at ../../include/QtQml/5.15.7/QtQml/private/../../../../../src/qml/jsruntime/qv4functionobject_p.h:202
#15 QV4::Moth::VME::interpret(QV4::CppStackFrame*, QV4::ExecutionEngine*, char const*)
    (frame=0x407c600000000000, engine=0x74b050, code=0x4c23610 "��[��\177")
   p:757
#16 0x00007ffff65e4077 in QV4::Moth::VME::exec(QV4::CppStackFrame*, QV4::ExecutionEngine*) (frame=frame@entry=0x7fffffffa810, engine=engine@entry=0x74b050) at jsruntime/qv4vme_moth.cpp:466
#17 0x00007ffff6575586 in QV4::Function::call(QV4::Value const*, QV4::Value const*, int, QV4::ExecutionContext const*)
    (this=this@entry=0x4c23a30, thisObject=<optimized out>, argv=argv@entry=0x7fff9a3c0500, argc=<optimized out>, context=<optimized out>) at jsruntime/qv4function.cpp:69
#18 0x00007ffff67043b1 in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*) (this=this@entry=0xe7c630, callData=callData@entry=0x7fff9a3c04d0, isUndefined=isUndefined@entry=0x0)
    at qml/qqmljavascriptexpression.cpp:212
#19 0x00007ffff66b4d3f in QQmlBoundSignalExpression::evaluate(void**) (this=<optimized out>, a=<optimized out>)
    at ../../include/QtQml/5.15.7/QtQml/private/../../../../../src/qml/jsruntime/qv4jscall_p.h:95
#20 0x00007ffff66b64c8 in QQmlBoundSignal_callback(QQmlNotifierEndpoint*, void**) (e=0xe7c5e0, a=0x0)
    at ../../include/QtQml/5.15.7/QtQml/private/../../../../../src/qml/qml/qqmlboundsignalexpressionpointer_p.h:69
#21 0x00007ffff66e93ff in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (endpoint=<optimized out>, a=0x0) at qml/qqmlnotifier.cpp:104
#22 0x00007ffff58db900 in doActivate<false>(QObject*, int, void**) (sender=0x2e3c990, signal_index=64, argv=0x0) at kernel/qobject.cpp:3811
#23 0x00007fffe2b840b1 in QQuickAbstractButtonPrivate::handleRelease(QPointF const&) (this=0x2e3ca50, point=...)
    at /usr/src/debug/qt5-qtquickcontrols2-5.15.7-1.fc37.x86_64/src/quicktemplates2/qquickabstractbutton.cpp:182
#24 0x00007fffe2b9e9e9 in QQuickControl::mouseReleaseEvent(QMouseEvent*) (this=<optimized out>, event=0x7fffffffc830)
    at /usr/src/debug/qt5-qtquickcontrols2-5.15.7-1.fc37.x86_64/src/quicktemplates2/qquickcontrol.cpp:2181
#25 0x00007ffff7096d68 in QQuickItem::event(QEvent*) (this=0x2e3c990, ev=0x7fffffffc830) at items/qquickitem.cpp:8287
#26 0x00007ffff75aed12 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x2e3c990, e=0x7fffffffc830) at kernel/qapplication.cpp:3637
#27 0x00007ffff58a8278 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x2e3c990, event=0x7fffffffc830) at kernel/qcoreapplication.cpp:1064
#28 0x00007ffff70b1e2e in QQuickWindowPrivate::deliverMouseEvent(QQuickPointerMouseEvent*) (this=this@entry=0x7322d0, pointerEvent=0x7fff84019a10) at items/qquickwindow.cpp:2025
#29 0x00007ffff70b34e1 in QQuickWindowPrivate::deliverPointerEvent(QQuickPointerEvent*) (this=0x7322d0, event=0x7fff84019a10) at items/qquickwindow.cpp:2617
#30 0x00007ffff5d764f5 in QWindow::event(QEvent*) (this=0x7cf000, ev=<optimized out>) at kernel/qwindow.cpp:2450
#31 0x00007ffff75aed12 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x7cf000, e=0x7fffffffc830) at kernel/qapplication.cpp:3637
#32 0x00007ffff58a8278 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x7cf000, event=0x7fffffffc830) at kernel/qcoreapplication.cpp:1064
#33 0x00007ffff5d6ae7d in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (e=0x7fffd4009aa0) at kernel/qguiapplication.cpp:2278
#34 0x00007ffff5d4a02c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=...) at kernel/qwindowsysteminterface.cpp:1169
#35 0x00007fffe3d5f3f4 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5WaylandClient.so.5
#36 0x00007ffff4586cbf in g_main_dispatch (context=0x7fffdc005010) at ../glib/gmain.c:3444
#37 g_main_context_dispatch (context=0x7fffdc005010) at ../glib/gmain.c:4162
#38 0x00007ffff45dc598 in g_main_context_iterate.constprop.0 (context=0x7fffdc005010, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4238
#39 0x00007ffff4583f40 in g_main_context_iteration (context=0x7fffdc005010, may_block=1) at ../glib/gmain.c:4303
#40 0x00007ffff58f938a in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x4b1660, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#41 0x00007ffff58a6cca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffcbc0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#42 0x00007ffff58aed92 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#43 0x00007ffff5d5fbe0 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1863
#44 0x00007ffff75aec89 in QApplication::exec() () at kernel/qapplication.cpp:2829
#45 0x0000000000416262 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/nate/kde/src/discover/discover/main.cpp:224
Comment 4 Bug Janitor Service 2023-02-01 13:38:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/462
Comment 5 David Redondo 2023-02-01 16:00:32 UTC
Git commit fb7921b24911e266a8af58ff02091f2e2fc0bbc7 by David Redondo.
Committed on 01/02/2023 at 13:35.
Pushed by davidre into branch 'master'.

PackageKit: PackageState takes the packageName not the appstreamId

When we try to look up addons later by package name we would
find nothing and crash
FIXED-IN:5.27

M  +1    -1    libdiscover/backends/PackageKitBackend/AppPackageKitResource.cpp

https://invent.kde.org/plasma/discover/commit/fb7921b24911e266a8af58ff02091f2e2fc0bbc7
Comment 6 David Redondo 2023-02-01 16:01:13 UTC
Git commit 48e3618f1cc31f3775f0a19b2fe5815ed73977aa by David Redondo.
Committed on 01/02/2023 at 16:01.
Pushed by davidre into branch 'Plasma/5.27'.

PackageKit: PackageState takes the packageName not the appstreamId

When we try to look up addons later by package name we would
find nothing and crash
FIXED-IN:5.27


(cherry picked from commit fb7921b24911e266a8af58ff02091f2e2fc0bbc7)

M  +1    -1    libdiscover/backends/PackageKitBackend/AppPackageKitResource.cpp

https://invent.kde.org/plasma/discover/commit/48e3618f1cc31f3775f0a19b2fe5815ed73977aa