Bug 457691 - Memory leaks until the whole computer stops when I try to open the folder selector in Locations KCM
Summary: Memory leaks until the whole computer stops when I try to open the folder sel...
Status: RESOLVED NOT A BUG
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: 5.25.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-09 19:29 UTC by Patrick Silva
Modified: 2022-08-10 00:02 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2022-08-09 19:29:12 UTC
SUMMARY
Can reproduce with two user accounts on my system.


STEPS TO REPRODUCE
1. open Locations KCM
2. click on the rightmost button to open the folder selector
3. 

OBSERVED RESULT
the folder selector does not open, xdg-desktop-portal-kde process causes high cpu usage, memory leaks until the whole computer stops. The memory leak stops when I kill xdg-desktop-portal-kde process.

EXPECTED RESULT
folder selector opens and nothing else

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Graphics Platform: Wayland
Comment 1 Nicolas Fella 2022-08-09 23:04:05 UTC
well this is odd. This shouldn't involve portals at all, unless PLASMA_INTEGRATION_USE_PORTAL is set, which it should not be.

Can you double check whether that environment variable is set?
Comment 2 Patrick Silva 2022-08-09 23:25:59 UTC
A few days ago I added this env variable to enable KDE open/save dialogs in Qt6 apps:
QT_QPA_PLATFORMTHEME=flatpak

I have just removed it, rebooted, and the problem is no longer reproducible.
Comment 3 Nicolas Fella 2022-08-09 23:29:52 UTC
Well that explains it :D

Forcing the platformtheme that way is going to cause a lot of trouble, especially for plasmashell/systemsettings
Comment 4 Nicolas Fella 2022-08-09 23:41:00 UTC
Of course when an actually Flatpak'd app invokes the folder picker it should work, but I can't reproduce the problem by running "QT_QPA_PLATFORMTHEME=flatpak systemsettings"