Bug 462447

Summary: Discover doesn't open
Product: [Applications] Discover Reporter: Nicolas Fella <nicolas.fella>
Component: discoverAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: grave CC: aleixpol, nate
Priority: VHI Keywords: regression
Version First Reported In: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: console output
Flamegraph

Description Nicolas Fella 2022-11-30 16:56:28 UTC
SUMMARY
Since very recently discover doesn't open at all


STEPS TO REPRODUCE
1. run plasma-discover

OBSERVED RESULT
Lots of console output, high CPU usage, no window appears

EXPECTED RESULT
Discover opens

SOFTWARE/OS VERSIONS
KDE Plasma Version: master
KDE Frameworks Version: master
Qt Version: 5.15.7-kde

Discover commit 1cb558bd65459d66ecc40e30665c13e425113533

ADDITIONAL INFORMATION
Comment 1 Nicolas Fella 2022-11-30 16:56:44 UTC
OS: Fedora 37
Comment 2 Nicolas Fella 2022-11-30 17:04:30 UTC
Created attachment 154173 [details]
console output
Comment 3 Nicolas Fella 2022-11-30 17:07:20 UTC
Created attachment 154174 [details]
Flamegraph
Comment 5 Nate Graham 2022-11-30 22:07:07 UTC
Works for me FWIW. I don't have the rpm-ostree-backend backend installed or built, though.

Does it work it you use `plasma-discover --backends` to launch it with every backend except that one?
Comment 6 Aleix Pol 2022-12-01 02:05:12 UTC
Could reproduce and put together a fix.
Comment 7 Bug Janitor Service 2022-12-01 02:10:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/432
Comment 8 Aleix Pol 2022-12-01 15:36:44 UTC
Git commit c3a1d430489a833b0dcb016f5344b37fec5c2583 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 01/12/2022 at 15:27.
Pushed by apol into branch 'master'.

Fix loading backends

Since now the loading of all backends happens as a block, the
ResourcesModel constructor was a big beast. This would make tons of
things happen before ResourcesModel::s_self was ever set.
This changes it so the constructor only sets the minimum necessary
things and the rest is done in a next call that will now happen just
once again.

M  +6    -5    libdiscover/resources/ResourcesModel.cpp
M  +1    -1    libdiscover/resources/ResourcesModel.h

https://invent.kde.org/plasma/discover/commit/c3a1d430489a833b0dcb016f5344b37fec5c2583