Bug 457691

Summary: Memory leaks until the whole computer stops when I try to open the folder selector in Locations KCM
Product: [Plasma] xdg-desktop-portal-kde Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: aleixpol, jgrulich, nate, nicolas.fella
Priority: NOR    
Version First Reported In: 5.25.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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"