Bug 397003

Summary: Big memory allocation if no backend is available
Product: [Applications] Discover Reporter: Jaime Torres <jtamate>
Component: discoverAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version: 5.13.3   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 5.14.0
Sentry Crash Report:
Attachments: The place where the memory is created

Description Jaime Torres 2018-07-31 07:04:30 UTC
Compile discover with kdesrc-build
execute "source /usr/local/kde-latest/prefix.sh"
execute /usr/local/kde-latest/bin/plasma-discover

I got a message:
error loading "packagekit-backend" "Cannot load library /usr/lib64/qt5/plugins/discover/packagekit-backend.so: (/usr/lib64/qt5/plugins/discover/packagekit-backend.so: undefined symbol: _ZN18OdrsReviewsBackend16staticMetaObjectE)" QJsonObject({"IID":"org.kde.muon.AbstractResourcesBackendFactory","MetaData":{},"className":"PackageKitBackendFactory","debug":false,"version":330497})
error loading "flatpak-backend" "Cannot load library /usr/lib64/qt5/plugins/discover/flatpak-backend.so: (/usr/lib64/qt5/plugins/discover/flatpak-backend.so: undefined symbol: _ZN18OdrsReviewsBackend16staticMetaObjectE)" QJsonObject({"IID":"org.kde.muon.AbstractResourcesBackendFactory","MetaData":{},"className":"FlatpakBackendFactory","debug":false,"version":330497})
falling back applications backend to -1
StaticXmlProvider: neither uploadurl nor nouploadurl given

And then a few:
invalid kns backend! "/usr/local/kde-latest/etc/xdg/XXX.knsrc" because: "All categories are missing"
Discarding invalid backend "XXX.knsrc"
falling back applications backend to -1
....
And then an OOM.
Comment 1 Aleix Pol 2018-07-31 14:34:37 UTC
You seem to be loading the plugins on the system, not the ones you just installed.

Also if you could do a heaptrack run that would maybe help detect where you're hitting the OOM? I've never seen it before.
Comment 2 Jaime Torres 2018-08-01 06:44:28 UTC
Created attachment 114248 [details]
The place where the memory is created
Comment 3 Aleix Pol 2018-08-02 13:42:06 UTC
Git commit 05d10118d3611dd1db79ae9efe6538811e3139af by Aleix Pol.
Committed on 02/08/2018 at 13:40.
Pushed by apol into branch 'master'.

Don't load categories for invalid backends

M  +3    -0    libdiscover/Category/CategoryModel.cpp

https://commits.kde.org/discover/05d10118d3611dd1db79ae9efe6538811e3139af