Bug 419107

Summary: Discover crashes when opening some app details page
Product: [Applications] Discover Reporter: Jonah Brüchert <jbb>
Component: Flatpak BackendAssignee: Dan Leinir Turthra Jensen <leinir>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, bugseforuns, jgrulich
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: gdb backtrace

Description Jonah Brüchert 2020-03-22 13:12:15 UTC
Created attachment 126941 [details]
gdb backtrace

SUMMARY

Discover crashes when opening an app details page of an app that is available from a local source, for example because one used flatpak-builder --install.
Since the crash references the IconUrlRole, discover might crash on every repository that doesn't have an icon, but I wasn't able to verify that.

gdb output of the crash:
Thread 1 "plasma-discover" received signal SIGSEGV, Segmentation fault.
0x00007fffc42fbb32 in FlatpakResource::sourceIcon (this=0xce8c70) at /home/jbb/kde/src/discover/libdiscover/backends/FlatpakBackend/FlatpakResource.cpp:573
573         const auto iconUrl = qobject_cast<FlatpakBackend*>(backend())->sources()->sourceById(origin())->data(FlatpakSourcesBackend::IconUrlRole).toString();


STEPS TO REPRODUCE
1. Compile an app locally with flatpak-builder --install
2. open the details page of that app in discover
3. See discover crash

OBSERVED RESULT

crash

EXPECTED RESULT

no crash, app details are displayed


SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.68.0
Qt Version: 5.15.0
Kernel Version: 5.4.0-4-amd64
OS-Type: 64-bit
Processor: 4 × Intel® Core™ i5-5200U CPU @ 2.20GHz
Memory: 7,8 GiB


ADDITIONAL INFORMATION
Comment 1 Aleix Pol 2020-03-23 11:30:01 UTC
Git commit 13e034256c7713f9a3e161585d6a762bf7e4b547 by Aleix Pol.
Committed on 23/03/2020 at 11:27.
Pushed by apol into branch 'Plasma/5.18'.

flatpak: fix crash

Source might not be available.

M  +7    -1    libdiscover/backends/FlatpakBackend/FlatpakResource.cpp

https://commits.kde.org/discover/13e034256c7713f9a3e161585d6a762bf7e4b547
Comment 2 Aleix Pol 2020-03-23 11:34:20 UTC
*** Bug 419057 has been marked as a duplicate of this bug. ***
Comment 3 Aleix Pol 2020-03-23 11:51:06 UTC
*** Bug 418815 has been marked as a duplicate of this bug. ***