Bug 443745 - Discover crashes in FlatpakBackend::findSource() when going to the Installed page
Summary: Discover crashes in FlatpakBackend::findSource() when going to the Installed ...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Flatpak Backend (show other bugs)
Version: 5.23.0
Platform: Gentoo Packages Linux
: VHI crash
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords: regression
: 442856 443128 444183 444354 444542 444837 445288 445745 445815 445923 445977 446245 446480 446896 450401 451507 451929 452469 452999 453440 453548 453595 453787 455093 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-10-14 21:00 UTC by Alexey Min
Modified: 2022-10-13 01:17 UTC (History)
29 users (show)

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


Attachments
kcrash backtrace file (39.50 KB, text/vnd.kde.kcrash-report)
2021-12-07 15:38 UTC, Uberkeyser
Details
discover backtrace from coredumpctl gdb (4.37 KB, text/plain)
2022-09-01 00:39 UTC, Christopher Snowhill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Min 2021-10-14 21:00:32 UTC
Application: plasma-discover (5.23.0)

Qt Version: 5.15.2
Frameworks Version: 5.87.0
Operating System: Linux 5.14.12-gentoo x86_64
Windowing System: X11
Distribution: Gentoo/Linux
DrKonqi: 5.23.0 [KCrashBackend]

-- Information about the crash:
Gentoo does not have backend for distro packages; however, Discover can be used to search and install packages from Flatpak. Te bug can be reproduced every time. Steps:
- Launch discover
- wait until home screen loads (recommended apps)
- Click "Installed" label in the left nav column => crash

I have several flatpak remotes

 $ flatpak remotes
 Name                        Options
 flathub                     system
 flathub                     user
 org.telegram.desktop-origin user,no-enumerate

-- Backtrace:
Application: Discover Software Center (plasma-discover), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
[KCrash Handler]
#6  FlatpakBackend::findSource(_FlatpakInstallation*, QString const&) const (this=this@entry=0x55f51ef7f2e0, installation=installation@entry=0x55f51e54f850 [FlatpakInstallation], origin=...) at /usr/src/debug/kde-plasma/discover-5.23.0/discover-5.23.0/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:113
#7  0x00007f7ed0087420 in FlatpakBackend::getAppForInstalledRef(_FlatpakInstallation*, _FlatpakInstalledRef*) const (this=0x55f51ef7f2e0, installation=installation@entry=0x55f51e54f850 [FlatpakInstallation], ref=ref@entry=0x7f7e6c0149e0 [FlatpakInstalledRef]) at /usr/src/debug/kde-plasma/discover-5.23.0/discover-5.23.0/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:371
#8  0x00007f7ed0087dd8 in operator() (__closure=0x55f51feb5160) at /usr/src/debug/kde-plasma/discover-5.23.0/discover-5.23.0/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:1316
#9  QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, FlatpakBackend::search(const AbstractResourcesBackend::Filters&)::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:146
#10 QtPrivate::Functor<FlatpakBackend::search(const AbstractResourcesBackend::Filters&)::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:256
#11 QtPrivate::QFunctorSlotObject<FlatpakBackend::search(const AbstractResourcesBackend::Filters&)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x55f51feb5150, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:443
#12 0x00007f7efd2ea69b in QtPrivate::QSlotObjectBase::call(QObject*, void**) (this=0x55f51feb5150, r=0x55f51ef7f2e0, a=0x55f51feb51c8) at ../../include/QtCore/../../../qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qobjectdefs_impl.h:398
#13 0x00007f7efd31ded1 in QMetaCallEvent::placeMetaCall(QObject*) (this=0x55f51feb5180, object=0x55f51ef7f2e0) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qobject.cpp:615
#14 0x00007f7efd31ed45 in QObject::event(QEvent*) (this=0x55f51ef7f2e0, e=0x55f51feb5180) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qobject.cpp:1314
#15 0x00007f7efec4676f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55f51ef7f2e0, e=0x55f51feb5180) at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r11/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/widgets/kernel/qapplication.cpp:3632
#16 0x00007f7efd2d9477 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55f51ef7f2e0, event=0x55f51feb5180) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qcoreapplication.cpp:1064
#17 0x00007f7efd2d9e66 in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=0x55f51ef7f2e0, event=0x55f51feb5180) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qcoreapplication.cpp:1462
#18 0x00007f7efd2dab4e in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x55f51e4e5360) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qcoreapplication.cpp:1821
#19 0x00007f7efd2da4e0 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=0x0, event_type=0) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qcoreapplication.cpp:1680
#20 0x00007f7efd36c6b4 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x55f51e549110) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qeventdispatcher_glib.cpp:277
#21 0x00007f7efbaea34c in g_main_dispatch (context=0x7f7ef0005000) at ../glib-2.68.4/glib/gmain.c:3337
#22 0x00007f7efbaeb343 in g_main_context_dispatch (context=0x7f7ef0005000) at ../glib-2.68.4/glib/gmain.c:4055
#23 0x00007f7efbaeb53e in g_main_context_iterate (context=0x7f7ef0005000, block=1, dispatch=1, self=0x7f7ef0004d60) at ../glib-2.68.4/glib/gmain.c:4131
#24 0x00007f7efbaeb616 in g_main_context_iteration (context=0x7f7ef0005000, may_block=1) at ../glib-2.68.4/glib/gmain.c:4196
#25 0x00007f7efd36cde9 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55f51e54e5f0, flags=...) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qeventdispatcher_glib.cpp:423
#26 0x00007f7efd2d5fd5 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffd1623ba90, flags=...) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qeventloop.cpp:139
#27 0x00007f7efd2d62fb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffd1623ba90, flags=...) at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qeventloop.cpp:232
#28 0x00007f7efd2d9ca8 in QCoreApplication::exec() () at /usr/src/debug/dev-qt/qtcore-5.15.2-r10/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/corelib/kernel/qcoreapplication.cpp:1375
#29 0x00007f7efd7d691c in QGuiApplication::exec() () at /usr/src/debug/dev-qt/qtgui-5.15.2-r13/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/gui/kernel/qguiapplication.cpp:1867
#30 0x00007f7efec466e5 in QApplication::exec() () at /usr/src/debug/dev-qt/qtwidgets-5.15.2-r11/qtbase-a4f9e56975fa6ab4a1f63a9b34a4d77b1cfe4acd/src/widgets/kernel/qapplication.cpp:2824
#31 0x000055f51d85ff51 in main(int, char**) (argc=<optimized out>, argv=0x7ffd1623bb70) at /usr/src/debug/kde-plasma/discover-5.23.0/discover-5.23.0/discover/main.cpp:213
[Inferior 1 (process 6425) detached]

Send to https://bugs.kde.org/enter_bug.cgi?product=Discover
Comment 1 Aleix Pol 2021-10-15 16:27:28 UTC
Sorry, I didn't see your bug report.
Here's the fix:
https://invent.kde.org/plasma/discover/-/commit/c3f27139f840731bb697bd368d8efd7cc6efe76b
Comment 2 Alexey Min 2021-10-19 15:23:01 UTC
Unfortunately I still se the same crash even with this patch applied. Sometimes right during application startup, sometimes during switching between views. Stack trace is the same as this. I may try to manually build discover from master and retest to be sure, but I don't know when I'll have time for this..
Comment 3 Nate Graham 2021-10-25 21:48:16 UTC
*** Bug 442856 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2021-10-25 21:48:50 UTC
*** Bug 444183 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2021-10-25 21:48:54 UTC
*** Bug 444354 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2021-10-26 16:49:05 UTC
*** Bug 443128 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2021-11-03 16:06:41 UTC
*** Bug 444542 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2021-11-03 16:07:19 UTC
Duplicate bug 444542 is from someone with 5.23.2; re-opening since this was supposed to be fixed in 5.23.1.
Comment 9 Nate Graham 2021-11-10 18:58:42 UTC
*** Bug 445288 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2021-11-23 18:15:25 UTC
*** Bug 445977 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2021-11-24 04:00:59 UTC
*** Bug 445815 has been marked as a duplicate of this bug. ***
Comment 12 LoneStar 2021-11-24 11:32:18 UTC
Just a belated update: 2 weeks I have downloaded and compiled discover-master from November 10th, and the issue is solved with that.
Comment 13 Jim 2021-11-24 17:37:46 UTC
The bug is still present in 5.23.3 on my Fedora 35 Workstation x86_64 kernel 5.14.18-300. Here is the output of plasma-discover:

[jim@localhost ~]$ plasma-discover
adding empty sources model QStandardItemModel(0x564bffc4ae40)
org.kde.plasma.libdiscover: Couldn't find a category for  "fwupd-backend"
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/private/PrivateActionToolButton.qml:74:5: QML Binding: Binding loop detected for property "value"
**
flatpak:ERROR:common/flatpak-variant-impl-private.h:3570:var_summary_index_get_subsummaries: assertion failed: (end <= v.size)
Bail out! flatpak:ERROR:common/flatpak-variant-impl-private.h:3570:var_summary_index_get_subsummaries: assertion failed: (end <= v.size)
KCrash: Application 'plasma-discover' crashing...
QSocketNotifier: Invalid socket 31 and type 'Read', disabling...
QSocketNotifier: Invalid socket 43 and type 'Read', disabling...
QSocketNotifier: Invalid socket 46 and type 'Read', disabling...
QSocketNotifier: Invalid socket 47 and type 'Read', disabling...
QSocketNotifier: Invalid socket 50 and type 'Read', disabling...
QSocketNotifier: Invalid socket 54 and type 'Read', disabling...
QSocketNotifier: Invalid socket 55 and type 'Read', disabling...
QSocketNotifier: Invalid socket 56 and type 'Read', disabling...
QSocketNotifier: Invalid socket 58 and type 'Read', disabling...
QSocketNotifier: Invalid socket 60 and type 'Read', disabling...
QSocketNotifier: Invalid socket 61 and type 'Read', disabling...
QSocketNotifier: Invalid socket 62 and type 'Read', disabling...
QSocketNotifier: Invalid socket 63 and type 'Read', disabling...
QSocketNotifier: Invalid socket 64 and type 'Read', disabling...
QSocketNotifier: Invalid socket 65 and type 'Read', disabling...
QSocketNotifier: Invalid socket 66 and type 'Read', disabling...
QSocketNotifier: Invalid socket 67 and type 'Read', disabling...
QSocketNotifier: Invalid socket 68 and type 'Read', disabling...
QSocketNotifier: Invalid socket 69 and type 'Read', disabling...
QSocketNotifier: Invalid socket 70 and type 'Read', disabling...
QSocketNotifier: Invalid socket 71 and type 'Read', disabling...
QSocketNotifier: Invalid socket 72 and type 'Read', disabling...
QSocketNotifier: Invalid socket 73 and type 'Read', disabling...
QSocketNotifier: Invalid socket 74 and type 'Read', disabling...
QSocketNotifier: Invalid socket 75 and type 'Read', disabling...
QSocketNotifier: Invalid socket 76 and type 'Read', disabling...
QSocketNotifier: Invalid socket 77 and type 'Read', disabling...
QSocketNotifier: Invalid socket 78 and type 'Read', disabling...
QSocketNotifier: Invalid socket 79 and type 'Read', disabling...
QSocketNotifier: Invalid socket 80 and type 'Read', disabling...
QSocketNotifier: Invalid socket 81 and type 'Read', disabling...
QSocketNotifier: Invalid socket 82 and type 'Read', disabling...
QSocketNotifier: Invalid socket 83 and type 'Read', disabling...
QSocketNotifier: Invalid socket 84 and type 'Read', disabling...
QSocketNotifier: Invalid socket 85 and type 'Read', disabling...
QSocketNotifier: Invalid socket 86 and type 'Read', disabling...
QSocketNotifier: Invalid socket 133 and type 'Write', disabling...
QSocketNotifier: Invalid socket 53 and type 'Read', disabling...
QSocketNotifier: Invalid socket 52 and type 'Read', disabling...
QSocketNotifier: Invalid socket 59 and type 'Read', disabling...
QSocketNotifier: Invalid socket 53 and type 'Write', disabling...
**
OSTree:ERROR:./libglnx/glnx-local-alloc.h:73:glnx_close_fd: assertion failed: (errno != EBADF)
Bail out! OSTree:ERROR:./libglnx/glnx-local-alloc.h:73:glnx_close_fd: assertion failed: (errno != EBADF)
Unable to start Dr. Konqi
kf.kio.slaves.file: readData() returned -1
[jim@localhost ~]$
Comment 14 Aleix Pol 2021-11-25 17:37:38 UTC
*** Bug 445745 has been marked as a duplicate of this bug. ***
Comment 15 Alessandro Astone 2021-11-25 17:59:16 UTC
Git commit 67cf4a37fab2eed05ef5f8c406e762d4e9824e84 by Alessandro Astone.
Committed on 25/11/2021 at 17:38.
Pushed by apol into branch 'Plasma/5.23'.

flatpak: Do not discard remotes with different installations as duplicates

One remote may offer both `user` and `system` installations.

M  +2    -2    libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp

https://invent.kde.org/plasma/discover/commit/67cf4a37fab2eed05ef5f8c406e762d4e9824e84
Comment 16 Uberkeyser 2021-11-26 12:10:04 UTC
Why has this been flagged as resolved/fixed? Please be advised it has not been fixed in 5.23.1. Or for what it matters, at least five other bug reports that have been merged into this have not been resolved with 5.23.1. Bugs 444542 445288 445745 445815 and 445977 are all based on versions later than 5.23.1.
Comment 17 Bharadwaj Raju 2021-11-26 12:49:10 UTC
The fix has been merged and will be included in the *next* 5.23 bugfix release, that is 5.23.4.
Comment 18 Nate Graham 2021-11-29 18:28:21 UTC
*** Bug 445923 has been marked as a duplicate of this bug. ***
Comment 19 Aleix Pol 2021-12-02 02:39:08 UTC
*** Bug 446245 has been marked as a duplicate of this bug. ***
Comment 20 Nate Graham 2021-12-04 20:00:46 UTC
*** Bug 446480 has been marked as a duplicate of this bug. ***
Comment 21 Nate Graham 2021-12-04 20:01:35 UTC
The reporter of duplicate bug 446480 experience a crash with the same backtrace on Plasma 5.23.4; re-opening since that's the version this was supposed to be fixed in.
Comment 22 MitraX 2021-12-06 19:35:16 UTC
I can confirm the issue on my side, too.

KDE neon User - Plasma 25th Anniversary Edition
plasmashell 5.23.4
Qt: 5.15.3
KDE Frameworks: 5.88.0
kf5-config: 1.0
Comment 23 johnathan 2021-12-07 05:59:45 UTC
confirmed. i was on 5.23.3 or 4 i think and yesterday had an update.

today i am unable to open discover and click on updates as it shows 5 but crashes everytime. 
info center is also crashing 100% time i try to open it.
system settings is also crashing 100% of the time.

dolphin is working, firefox is working and so is okular and bash commands so the big update yesterday is what is the culprit from my side.
Comment 24 Uberkeyser 2021-12-07 15:38:21 UTC
Created attachment 144304 [details]
kcrash backtrace file

Sadly for me the issue did *not* go away with V. 5.23.4 neither.
I attached another kcrash backtrace. Let me know what I can do to help.
Comment 25 Uberkeyser 2021-12-07 15:46:53 UTC
(In reply to johnathan from comment #23)
> info center is also crashing 100% time i try to open it.
> system settings is also crashing 100% of the time.

For me (on KDE neon) those 'newer' KDE apps caused crashes right after the update too. But a while later another packet update (for Qt-Quick) showed up in apt/pkcon, after which that issue was fixed. (but unfortunately not the issue at hand, i.e. Discover)
So you might want to check your packet manager for another update that might have just showed up(?)
Comment 26 Nate Graham 2021-12-14 19:03:20 UTC
*** Bug 446896 has been marked as a duplicate of this bug. ***
Comment 27 Aleix Pol 2022-01-20 14:04:06 UTC
Could reproduce, sending a fix.
Comment 28 Aleix Pol 2022-01-20 14:12:33 UTC
Git commit c46e703eb766d06a1e2ed7a20674bd918b7e8da2 by Aleix Pol.
Committed on 20/01/2022 at 14:12.
Pushed by apol into branch 'master'.

flatpak: Don't treat the lack of metadata as fatal

We need remotes for listing as well as for searching.
Also don't mention it to the user, they probably don't have much they
can do besides knowing it's a problem or reporting to the remote's
maintainer.

M  +0    -2    libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
M  +1    -3    libdiscover/backends/FlatpakBackend/FlatpakRefreshAppstreamMetadataJob.cpp
M  +0    -1    libdiscover/backends/FlatpakBackend/FlatpakRefreshAppstreamMetadataJob.h

https://invent.kde.org/plasma/discover/commit/c46e703eb766d06a1e2ed7a20674bd918b7e8da2
Comment 29 Aleix Pol 2022-01-20 14:14:24 UTC
Git commit f40986d23b2f11824f4e9f071d185ba8c6477480 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 20/01/2022 at 14:14.
Pushed by apol into branch 'Plasma/5.24'.

flatpak: Don't treat the lack of metadata as fatal

We need remotes for listing as well as for searching.
Also don't mention it to the user, they probably don't have much they
can do besides knowing it's a problem or reporting to the remote's
maintainer.


(cherry picked from commit c46e703eb766d06a1e2ed7a20674bd918b7e8da2)

M  +0    -2    libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
M  +1    -3    libdiscover/backends/FlatpakBackend/FlatpakRefreshAppstreamMetadataJob.cpp
M  +0    -1    libdiscover/backends/FlatpakBackend/FlatpakRefreshAppstreamMetadataJob.h

https://invent.kde.org/plasma/discover/commit/f40986d23b2f11824f4e9f071d185ba8c6477480
Comment 30 Nate Graham 2022-02-16 19:25:11 UTC
*** Bug 450401 has been marked as a duplicate of this bug. ***
Comment 31 Nate Graham 2022-02-16 19:25:40 UTC
Got a report from 5.24 where this was supposed to be fixed with the same backtrace; re-opening.
Comment 32 Alex 2022-02-20 13:50:02 UTC
(In reply to Nate Graham from comment #31)
> Got a report from 5.24 where this was supposed to be fixed with the same
> backtrace; re-opening.

Dear sir, I observe this issue for a long time, it also occurs on 5.24.1
Is there any workaround available?

Thanks
Comment 33 Nate Graham 2022-03-19 23:22:49 UTC
*** Bug 451507 has been marked as a duplicate of this bug. ***
Comment 34 Nate Graham 2022-03-19 23:24:19 UTC
Seems to be 100% reproducible for those who hit it (myself included), and it renders the Installed page non-functional; raising to VHI.
Comment 35 Nate Graham 2022-03-26 15:42:55 UTC
*** Bug 451929 has been marked as a duplicate of this bug. ***
Comment 36 Aleix Pol 2022-04-01 18:29:53 UTC
I could only reproduce it when passing an external flatpakref file and the following MR fixes this:
https://invent.kde.org/plasma/discover/-/merge_requests/285

I'd appreciate some testing, if it doesn't address the problem for you, please share with me your "flatpak remotes" output.
Comment 37 Uberkeyser 2022-04-02 12:12:10 UTC
> I'd appreciate some testing, 

I am sorry, I can't test as the problem was resolved otherwise for me: I had to reinstall KDE Neon (for a different reason) and the problem did not occur on the new system.
But I can confirm that on the old system I did use an external flatpak ref to a  temporary daily build testing flatpak, which I later removed after that software was merged into a stable flatpak (org.kde.KStyle.Kvantum). I always suspected that this may be related to the Discover issue at hand, though I could not find any 'hard evidences' for this theory in the logfiles.
Comment 38 Eric Armbruster 2022-04-03 14:41:27 UTC
Just tested whether I can still reproduce this bug on 5.24.3 and yes I can (just got the crash again).

Then compiled discover with Aleix's fix. Started discover like ten times and opened the update page each time. This is where things usually go downwards for me. Not this time. Works like a charm. No crashes so far. Very nice!
Comment 39 Aleix Pol 2022-04-12 00:49:13 UTC
Git commit 07d702ba43eee554bb0ab52a89e7bae96a04f4dd by Aleix Pol.
Committed on 08/04/2022 at 23:05.
Pushed by apol into branch 'master'.

flatpak: Centralise remote integration in FlatpakBackend

* Ensure remotes are integrated as sources when an installation
transaction adds them
* Make sure we have a source available as soon as we know a remote is
present, so it can be used.

M  +140  -43   libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
M  +3    -0    libdiscover/backends/FlatpakBackend/FlatpakBackend.h
M  +4    -0    libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.cpp
M  +1    -1    libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.h
M  +12   -0    libdiscover/backends/FlatpakBackend/FlatpakResource.h
M  +11   -94   libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp
M  +1    -5    libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.h
M  +4    -4    libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
M  +4    -2    libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h

https://invent.kde.org/plasma/discover/commit/07d702ba43eee554bb0ab52a89e7bae96a04f4dd
Comment 40 Aleix Pol 2022-04-12 00:54:46 UTC
Git commit 2ad3446a4abada3ba39c1ae1a6c57bef6328d8e8 by Aleix Pol.
Committed on 12/04/2022 at 00:53.
Pushed by apol into branch 'Plasma/5.24'.

flatpak: Centralise remote integration in FlatpakBackend

* Ensure remotes are integrated as sources when an installation
transaction adds them
* Make sure we have a source available as soon as we know a remote is
present, so it can be used.

M  +140  -42   libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
M  +3    -0    libdiscover/backends/FlatpakBackend/FlatpakBackend.h
M  +4    -0    libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.cpp
M  +1    -1    libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.h
M  +12   -0    libdiscover/backends/FlatpakBackend/FlatpakResource.h
M  +11   -94   libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp
M  +1    -5    libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.h
M  +4    -4    libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
M  +4    -2    libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h

https://invent.kde.org/plasma/discover/commit/2ad3446a4abada3ba39c1ae1a6c57bef6328d8e8
Comment 41 Nate Graham 2022-04-12 02:12:06 UTC
*** Bug 452469 has been marked as a duplicate of this bug. ***
Comment 42 nashtr@gmail.comn 2022-04-14 22:44:31 UTC
This is definitely NOT fixed. I even had a bunch of updates through dnf last night, Discover still crashes fetching updates.
Comment 43 Nate Graham 2022-04-14 22:54:27 UTC
The fix is in version 5.24.5, which hasn't been released yet. So unless you compile Discover from source or your distro has manually backported the fix, you don't have it yet.
Comment 44 Nate Graham 2022-04-25 18:53:43 UTC
*** Bug 452999 has been marked as a duplicate of this bug. ***
Comment 45 Nate Graham 2022-05-05 23:44:48 UTC
*** Bug 453440 has been marked as a duplicate of this bug. ***
Comment 46 Aleix Pol 2022-05-09 00:00:16 UTC
*** Bug 453548 has been marked as a duplicate of this bug. ***
Comment 47 Nate Graham 2022-05-10 15:44:21 UTC
*** Bug 453595 has been marked as a duplicate of this bug. ***
Comment 48 Nate Graham 2022-05-16 16:54:03 UTC
*** Bug 453787 has been marked as a duplicate of this bug. ***
Comment 49 Nate Graham 2022-05-16 16:54:26 UTC
*** Bug 444837 has been marked as a duplicate of this bug. ***
Comment 50 Nate Graham 2022-06-10 14:40:22 UTC
*** Bug 455093 has been marked as a duplicate of this bug. ***
Comment 51 Christopher Snowhill 2022-08-31 06:52:26 UTC
Still happening with 5.25.4, with the only Flatpak source added being flathub, on Arch.
Comment 52 Nate Graham 2022-08-31 12:48:38 UTC
Can you attach a backtrace of the crash you're experiencing so we can verify that it's the same one that was supposed to be fixed here, or a different one?
Comment 53 Christopher Snowhill 2022-09-01 00:39:50 UTC
Created attachment 151750 [details]
discover backtrace from coredumpctl gdb

Sorry about that, I should have attached this in the first place. Not sure if it's the same crash, and if it's not, I'll open a new report.
Comment 54 Nate Graham 2022-09-01 14:25:57 UTC
Darn, it does look like the same crash indeed. Re-opening.
Comment 55 Nate Graham 2022-09-09 17:16:53 UTC
*** Bug 458531 has been marked as a duplicate of this bug. ***
Comment 56 Bug Janitor Service 2022-09-13 01:19:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/370
Comment 57 Aleix Pol 2022-09-13 10:21:33 UTC
Git commit af103a8bec349bc7ac0c2ae55905bbbb6a0421e7 by Aleix Pol.
Committed on 13/09/2022 at 01:18.
Pushed by apol into branch 'master'.

flatpak: The unreachable is reachable

Instead of making findSource() unreachable, return a null instance and
move on with life.

The case that it's crashing for the reported bug was already if'd out,
so we just assert() on the other use-case where it actually does make
sense.

M  +2    -1    libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp

https://invent.kde.org/plasma/discover/commit/af103a8bec349bc7ac0c2ae55905bbbb6a0421e7
Comment 58 Patrick Silva 2022-10-11 16:04:38 UTC
This crash is still reproducible on Plasma 5.26.

Operating System: Arch Linux
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Graphics Platform: Wayland
Comment 59 Aleix Pol 2022-10-13 01:17:32 UTC
It's literally impossible that it happens the same way because the code is different now.

Please report a new one with its backtrace and steps to reproduce.