Bug 491235 - Open/Save file dialog causes applications to freeze and consume huge amount of RAM
Summary: Open/Save file dialog causes applications to freeze and consume huge amount o...
Status: RESOLVED DOWNSTREAM
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Open/save dialogs (show other bugs)
Version: 6.4.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-03 21:54 UTC by Oleg
Modified: 2024-08-05 21:33 UTC (History)
2 users (show)

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


Attachments
Kate freezes and bloats RAM after clicking "Open file" (1.28 MB, video/mp4)
2024-08-03 21:54 UTC, Oleg
Details
QtProject.conf (91.52 KB, image/png)
2024-08-05 18:51 UTC, Oleg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg 2024-08-03 21:54:43 UTC
Created attachment 172261 [details]
Kate freezes and bloats RAM after clicking "Open file"

SUMMARY
Open/Save file dialog causes applications to freeze for a few seconds and consume a huge amount of RAM. For example, if I try to open a file in Kate it takes 3 seconds to show a dialog during which Kate freezes and the application start to consume 2+ GiB of RAM. It also takes 3–5 seconds to close application afterward.

STEPS TO REPRODUCE
1. Launch Kate (or any other applications that use kio framework: gwenview, ark, krita etc.)
2. Invoke open/save file dialog

OBSERVED RESULT
Application will freeze for a few seconds and consume 2+ GiB of RAM

EXPECTED RESULT
It should open instantly and don't consume such huge amounts of RAM.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.10.2-2-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz
Memory: 15.6 ГиБ of RAM
Graphics Processor: AMD Radeon RX 6700 XT

ADDITIONAL INFORMATION
There's no such issue with portal file dialog.
Comment 1 Nate Graham 2024-08-05 18:10:17 UTC
Does it also happen in a new clean user account with no customization?
Comment 2 Oleg 2024-08-05 18:24:59 UTC
(In reply to Nate Graham from comment #1)
> Does it also happen in a new clean user account with no customization?

No, it doesn't
Comment 3 Nate Graham 2024-08-05 18:33:47 UTC
This would suggest that one of the customizations in your primary user account is to blame. First guess is the custom window close effect. Try turning that off and see if the problem goes away. If it doesn't, then try disabling other things until you figure it out.

If the thing causing it is in our code, we'll take a look again. If not, please report it to the developer whose code is to blame. :)
Comment 4 Oleg 2024-08-05 18:41:41 UTC
(In reply to Nate Graham from comment #3)
> This would suggest that one of the customizations in your primary user
> account is to blame. First guess is the custom window close effect. Try
> turning that off and see if the problem goes away. If it doesn't, then try
> disabling other things until you figure it out.
> 
> If the thing causing it is in our code, we'll take a look again. If not,
> please report it to the developer whose code is to blame. :)

Is there a way I can debug KDE applications to see what's going on? I notice freezing applications have huge read/write speeds to storage during freeze, wonder what's they're accessing which cause them to behave such way.
Comment 5 Oleg 2024-08-05 18:51:17 UTC
Created attachment 172314 [details]
QtProject.conf

I found the source of the issue. I had a file called `QtProject.conf` located in `~/.config` which was ~900 MiB and looked like this. After deleting it everything went to normal. Any idea what would've caused this?
Comment 6 Nate Graham 2024-08-05 21:33:51 UTC
I don't sorry. This doesn't sound like a KDE issue though. Glad you figured it out!