Bug 394726

Summary: Discover freezes after searching snaps
Product: [Applications] Discover Reporter: Øystein Steffensen-Alværvik <epost.kde>
Component: Snap BackendAssignee: Aleix Pol <aleixpol>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.12.5   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Backtrace - search for 'ktorrent'
Backtrace - search for 'zotero'
Proper backtrace

Description Øystein Steffensen-Alværvik 2018-05-26 20:43:30 UTC
Created attachment 112890 [details]
Backtrace - search for 'ktorrent'

(If this does not belong in component discover please reassign).

**Problem**
Discover freezes and increases memory consumption (at one point it used ~5GB before I killed it). 

NOTE: My system has the flatpak-backend installed and a repository from flathub (dl.flathub.org) – which Discover correctly recognises. System is KDE NEON 5.12.5. Qt 5.10

**Steps to reproduce (what I do that triggers this)**
– Launch Discover
– Immediately search for a flatpak app that is not installed – I search for 'keepass', 'zotero' and 'ktorrent'
– Choose the first result (which for me is a flatpak app of the search string)
– Sometimes I get to the app's info description, sometimes I don't – either way Discover becomes unresponsive

The apps that freeze Discover come from flathub (keepassxc, zotero) and kdeapps (ktorrent)

Reproducible most times.

I manage to reproduce this while launching Discover with GDB. Here are the 'backtraces':

When I search for 'keepass' and choose KeePassXC from the list gdb produces thousands of these lines:



(process:12040): Snapd-WARNING **: Ignoring unexpected response

(process:12040): GLib-CRITICAL **: g_byte_array_remove_range: assertion 'index_ + length <= array->len' failed


Attaching the others as text files if that's okay.
Comment 1 Øystein Steffensen-Alværvik 2018-05-26 20:44:02 UTC
Created attachment 112891 [details]
Backtrace - search for 'zotero'
Comment 2 Aleix Pol 2018-05-27 22:46:12 UTC
I cannot really reproduce here. I'd be really interested in your backtrace, what you provided though is just a gdb run.

You can find more information here on how to get such backtrace:
https://wiki.ubuntu.com/Backtrace

Basically you need to do the same and when it freezes you Ctrl+C and write "backtrace full". The text you will get is possibly where the program got stuck.
Comment 3 Øystein Steffensen-Alværvik 2018-05-28 11:05:12 UTC
Created attachment 112925 [details]
Proper backtrace
Comment 4 Aleix Pol 2018-06-01 01:04:56 UTC
This is an issue in snapd-glib:
https://bugs.launchpad.net/bugs/1740865