Bug 473472 - Discover crashes in KNSResultsStream::setRequest() when refreshing updates
Summary: Discover crashes in KNSResultsStream::setRequest() when refreshing updates
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 6.0.0
Platform: Other Linux
: VHI crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 480826 480869 481147 481838 482795 483054 483499 483608 483871 483890 484035 484332 484424 484430 484730 484767 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-08-17 10:44 UTC by Nicolas Fella
Modified: 2024-04-05 03:26 UTC (History)
23 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.3


Attachments
Crash info (41.51 KB, text/vnd.kde.kcrash-report)
2024-02-29 16:03 UTC, fin-w
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2023-08-17 10:44:58 UTC
STEPS TO REPRODUCE
1. Go to Updates page
2. Click Refresh

#0  0x00007fff8810c84e in KNSCore::ResultsStream::fetch() (this=0x611f3b0) at /home/nico/kde6/src/knewstuff/src/core/resultsstream.cpp:62
#1  0x00007fff8817d0dd in KNSResultsStream::setRequest(KNSCore::Provider::SearchRequest const&) (this=<optimized out>, request=...) at /home/nico/kde6/src/discover/libdiscover/backends/KNSBackend/KNSBackend.cpp:105
#2  0x00007fff88178541 in operator() (__closure=0x6680d30) at /home/nico/kde6/src/discover/libdiscover/backends/KNSBackend/KNSBackend.cpp:468
#3  QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KNSBackend::search(const AbstractResourcesBackend::Filters&)::<lambda()> >::call (arg=<optimized out>, f=...)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:127
#4  QtPrivate::Functor<KNSBackend::search(const AbstractResourcesBackend::Filters&)::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:241
#5  QtPrivate::QFunctorSlotObject<KNSBackend::search(const AbstractResourcesBackend::Filters&)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *)
    (which=<optimized out>, this_=0x6680d20, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:409
#6  0x00007ffff4fcfe57 in QObject::event(QEvent*) (this=0x66808f0, e=0x6680dd0) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qobject.cpp:1391
#7  0x00007ffff75c0af8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x66808f0, e=0x6680dd0) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:3287
#8  0x00007ffff4f7cdb8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x66808f0, event=0x6680dd0) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1118
#9  0x00007ffff4f7cfbd in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1536
#10 0x00007ffff4f808d5 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x49f970) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1898
#11 0x00007ffff4f80c0d in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=<optimized out>, event_type=<optimized out>) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1757
#12 0x00007ffff522108f in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x749930) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:243
#13 0x00007ffff44a548c in g_main_dispatch (context=0x7fffdc000f10) at ../glib/gmain.c:3460
#14 g_main_context_dispatch (context=0x7fffdc000f10) at ../glib/gmain.c:4200
#15 0x00007ffff4503648 in g_main_context_iterate.isra.0 (context=0x7fffdc000f10, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4276
#16 0x00007ffff44a2b13 in g_main_context_iteration (context=0x7fffdc000f10, may_block=1) at ../glib/gmain.c:4343
#17 0x00007ffff522092f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x4a1280, flags=...) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#18 0x00007ffff4f899f3 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffd260, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/global/qflags.h:34
#19 0x00007ffff4f8569d in QCoreApplication::exec() () at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/corelib/global/qflags.h:74
#20 0x00007ffff59f917d in QGuiApplication::exec() () at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/gui/kernel/qguiapplication.cpp:1908
#21 0x00007ffff75c0a69 in QApplication::exec() () at /usr/src/debug/qt6-qtbase-6.5.2-1.fc38.x86_64/src/widgets/kernel/qapplication.cpp:2566
#22 0x0000000000416ca3 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/nico/kde6/src/discover/discover/main.cpp:225

discover commit 65d89ac70dcd1f58bbe137d6fdcc94b111389a94
Qt 6.5.2
Comment 1 Nate Graham 2023-08-17 19:11:56 UTC
Looks quite similar to Bug 473332.
Comment 2 Nicolas Fella 2023-11-14 01:01:28 UTC
also happens when going to the "Installed" page
Comment 3 Amir Khan 2024-01-15 17:39:45 UTC
I can confirm that Discover sometimes but not always hangs a few seconds after opening on my system too, which is:
KDENeon Testing branch, updated on morning (GMT timezone) of 15 Jan 2024, running in a VirtualBox VM on a Windows 11 host.

Discover version 5.27.10

KDE Plasma Version 5.27.10
KDE Frameworks Version 5.114.0
Qt Version: 5.15.11
Kernel version: 6.5.0-generic (64-bit)
Graphics Platform: X11


Steps to reproduce:
1. Open the app by selecting "updates" from the Plasma panel.
2. Select install all updates.

Sometimes it hangs at 0% task  completed when requesting to install all updates and the update needs to be cancelled. Other times it presents a dialog for confirmation and then to enter credentials to enable the installation, but then finds an error part-way through installation. After closing the error dialog, Discover seems to become operable again.

Sometimes all updates install and Discover does not hang at all.
Comment 4 Amir Khan 2024-01-17 11:20:22 UTC
Further update:

When Discover hung in same context as above, running sudo pkcon update in Konsole showed there was an update conflict:

Error reported by pkcon:
Fatal error: Error while installing package: trying to overwrite '/usr/bin/kde-geo-uri-handler', which is also in packange libkf5guiaddons-bin 5.113.0+p22.04+vstable+git20240107.0113-0

I am wondering if an underlying update conflict causes Discovery to hang at times?
Comment 5 Antonio Rojas 2024-02-04 08:04:49 UTC
*** Bug 480826 has been marked as a duplicate of this bug. ***
Comment 6 cggoody5 2024-02-04 18:54:07 UTC
same for me too. it happens when you try to look in installed programs or in the search bar.

it closes automatically.

its missing tons of dependencies.

qt6core
qt6plugins.
qt6widgets
libkfgnewstuffcore
plasma-discover.
Comment 7 cggoody5 2024-02-04 18:55:34 UTC
i mean libkf6newstuffcore, lol.
Comment 8 Antonio Rojas 2024-02-04 21:01:10 UTC
*** Bug 480869 has been marked as a duplicate of this bug. ***
Comment 9 Antonio Rojas 2024-02-09 23:14:10 UTC
*** Bug 481147 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2024-02-26 22:26:32 UTC
*** Bug 481838 has been marked as a duplicate of this bug. ***
Comment 11 fin-w 2024-02-29 16:01:19 UTC
I'm getting a seg fault crash if I'm in the updates page and I try to refresh, I assume it's related. Seems perhaps only when there are no changes? After applying updates, before rebooting again, if I click the refresh button Discover starts looking for updates, hard drive access goes high and Discover freezes, then closes and I'm prompted to file a bug report.

The crash info is attached here.
Comment 12 fin-w 2024-02-29 16:03:33 UTC
Created attachment 166204 [details]
Crash info
Comment 13 Nicolas Fella 2024-03-08 10:47:28 UTC
*** Bug 482795 has been marked as a duplicate of this bug. ***
Comment 14 Antonio Rojas 2024-03-12 17:01:01 UTC
*** Bug 483054 has been marked as a duplicate of this bug. ***
Comment 15 Christophe Marin 2024-03-18 13:02:10 UTC
*** Bug 483871 has been marked as a duplicate of this bug. ***
Comment 16 Christophe Marin 2024-03-18 13:02:42 UTC
*** Bug 483608 has been marked as a duplicate of this bug. ***
Comment 17 Christophe Marin 2024-03-18 13:04:14 UTC
*** Bug 483499 has been marked as a duplicate of this bug. ***
Comment 18 Christophe Marin 2024-03-18 13:04:55 UTC
*** Bug 483890 has been marked as a duplicate of this bug. ***
Comment 19 Christophe Marin 2024-03-20 09:29:25 UTC
*** Bug 484035 has been marked as a duplicate of this bug. ***
Comment 20 Aleix Pol 2024-03-25 00:03:43 UTC
Git commit 8e80d1c0f5c1dd888a327b0d9a2cfcabb0b143ea by Aleix Pol.
Committed on 23/03/2024 at 01:34.
Pushed by sitter into branch 'master'.

resultsstream: Delay the entry loading into the event look

Otherwise we fetch them before the client might finish the load before
loadEntries end and d->properties might mutate.

M  +5    -1    src/core/resultsstream.cpp

https://invent.kde.org/frameworks/knewstuff/-/commit/8e80d1c0f5c1dd888a327b0d9a2cfcabb0b143ea
Comment 21 Harald Sitter 2024-03-25 00:34:38 UTC
*** Bug 484332 has been marked as a duplicate of this bug. ***
Comment 22 Harald Sitter 2024-03-25 00:34:52 UTC
*** Bug 484424 has been marked as a duplicate of this bug. ***
Comment 23 Antonio Rojas 2024-03-30 17:55:35 UTC
*** Bug 484767 has been marked as a duplicate of this bug. ***
Comment 24 yurapostates 2024-03-30 18:10:44 UTC
I'm reporter of bug 484767 which was marked as duplicate. I have Discover version 6.0.3 and this bug has NOT been resolved. I still get crashes when I search for any package.
Comment 25 Antonio Rojas 2024-03-30 21:50:39 UTC
*** Bug 484332 has been marked as a duplicate of this bug. ***
Comment 26 yurapostates 2024-03-30 21:56:42 UTC
OK I looked into Bug 484332 and after updating my Arch knewstuff package the issue was also fixed for me as well. Sry for changing the bug status.
Comment 27 Harald Sitter 2024-04-02 04:58:07 UTC
*** Bug 484730 has been marked as a duplicate of this bug. ***
Comment 28 Harald Sitter 2024-04-05 03:26:52 UTC
*** Bug 484430 has been marked as a duplicate of this bug. ***