Bug 504841 - Discover crashes on teardown in PackageKitResource::~PackageKitResource() if closed while still loading an app
Summary: Discover crashes on teardown in PackageKitResource::~PackageKitResource() if ...
Status: CONFIRMED
Alias: None
Product: Discover
Classification: Applications
Component: PackageKit (other bugs)
Version First Reported In: 6.4.80
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 505570 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-05-27 02:04 UTC by Nate Graham
Modified: 2025-06-13 16:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/198420/events/53b7d0427844498099225391d8f9af9e/


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2025-05-27 02:04:41 UTC
Current git master, Qt 6.9, Fedora 42.


STEPS TO REPRODUCE
1. `plasma-discover appstream://org.kde.dolphin.desktop`
2. Before it finishes loading, close the window with Ctrl+Q, Alt+F4, or by clicking the close button


OBSERVED RESULT
Crash 100% of the time:


#0  __pthread_kill_implementation
    (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f00388811e3 in __pthread_kill_internal (threadid=<optimized out>, signo=11)
    at pthread_kill.c:89
#2  0x00007f0038827afe in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x00007f003c08e88a in KCrash::defaultCrashHandler (sig=11)
    at /home/nate/kde/src/kcrash/src/kcrash.cpp:605
#4  0x00007f0038827c30 in <signal handler called> () at /lib64/libc.so.6
#5  AggregatedResultsStream::resourceDestruction (this=0x111ba600, obj=0x10bc1150)
    at /home/nate/kde/src/discover/libdiscover/resources/ResourcesModel.cpp:286
#6  0x00007f0038f6033a in QtPrivate::QSlotObjectBase::call
    (this=0xf4466d0, r=0x111ba600, a=0x7ffd7bb503c0)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobjectdefs_impl.h:461
#7  doActivate<false> (sender=0x10bc1150, signal_index=0, argv=argv@entry=0x7ffd7bb503c0)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobject.cpp:4138
#8  0x00007f0038f56d09 in QMetaObject::activate
    (sender=sender@entry=0x0, m=m@entry=0x7f003948cc40, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffd7bb503c0)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobject.cpp:4198
#9  0x00007f0038f56dc7 in QMetaObject::activate<void, QObject*>
    (sender=0x0, mo=0x7f003948cc40, local_signal_index=0, ret=0x0)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobjectdefs.h:306
#10 QObject::destroyed (this=this@entry=0x10bc1150, _t1=<optimized out>, _t1@entry=0x10bc1150)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/redhat-linux-build/src/corelib/kernel/moc_qobject.cpp:186
#11 0x00007f0038f5c79e in QObject::~QObject (this=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobject.cpp:1042
#12 0x00007effb878df10 in PackageKitResource::~PackageKitResource (this=0x10bc1150)
    at /home/nate/kde/src/discover/libdiscover/backends/PackageKitBackend/PackageKitResource.h:20
#13 AppPackageKitResource::~AppPackageKitResource (this=0x10bc1150)
    at /home/nate/kde/src/discover/libdiscover/backends/PackageKitBackend/AppPackageKitResource.h:13
#14 AppPackageKitResource::~AppPackageKitResource (this=0x10bc1150)
    at /home/nate/kde/src/discover/libdiscover/backends/PackageKitBackend/AppPackageKitResource.h:13
#15 0x00007f0038f57a02 in QObjectPrivate::deleteChildren (this=this@entry=0xe7885f0)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobject.cpp:2223
#16 0x00007f0038f5c7d4 in QObject::~QObject (this=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobject.cpp:1140
#17 0x00007effb8768a1e in PackageKitBackend::~PackageKitBackend (this=0xe783f40)
    at /home/nate/kde/src/discover/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp:246
#18 0x00007f003c40603e in qDeleteAll<QList<AbstractResourcesBackend*>::const_iterator>
    (begin=..., end=...) at /usr/include/qt6/QtCore/qalgorithms.h:27
#19 qDeleteAll<QList<AbstractResourcesBackend*> > (c=...)
    at /usr/include/qt6/QtCore/qalgorithms.h:35
#20 ResourcesModel::~ResourcesModel (this=0xe6c14a0)
    at /home/nate/kde/src/discover/libdiscover/resources/ResourcesModel.cpp:112
#21 0x00007f003c40612e in ResourcesModel::~ResourcesModel (this=0xe6c14a0)
    at /home/nate/kde/src/discover/libdiscover/resources/ResourcesModel.cpp:113
#22 0x00007f0038f50eec in QObject::event (this=<optimized out>, e=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qobject.cpp:1416
#23 0x00007f003b83d7af in QApplicationPrivate::notify_helper
    (this=<optimized out>, receiver=0xe6c14a0, e=0xeeaaed0)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/widgets/kernel/qapplication.cpp:3301
#24 0x00007f0038ef5fa8 in QCoreApplication::notifyInternal2 (receiver=0xe6c14a0, event=0xeeaaed0)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1106
#25 0x00007f0038ef620d in QCoreApplication::sendEvent
    (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1546
#26 0x00007f0038ef9cd6 in QCoreApplicationPrivate::sendPostedEvents
    (receiver=0x0, event_type=52, data=0xdef5ec0)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1879
#27 0x00007f0038efa032 in QCoreApplicationPrivate::execCleanup (this=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/kernel/qcoreapplication.cpp:1468
#28 0x00007f0038eff246 in QCoreApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/corelib/tools/qscopedpointer.h:110
#29 0x00007f0039adac3d in QGuiApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/gui/kernel/qguiapplication.cpp:1993
#30 0x00007f003b83d719 in QApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.9.0-2.fc42.x86_64/src/widgets/kernel/qapplication.cpp:2568
#31 0x0000000000403ed0 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/nate/kde/src/discover/discover/main.cpp:231


ADDITIONAL INFORMATION
Only affects the PackageKit backend; cannot reproduce with `plasma-discover --backends flatpak  appstream://org.kde.dolphin.desktop`
Comment 1 Roke Julian Lockhart Beedell 2025-06-13 16:00:52 UTC
*** Bug 505570 has been marked as a duplicate of this bug. ***