Bug 485868 - dolphin won't open and causes a memory leak
Summary: dolphin won't open and causes a memory leak
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 24.02.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-20 22:42 UTC by DN
Modified: 2024-04-22 20:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
valgrind massif heap tracer output (92.85 KB, text/plain)
2024-04-21 14:56 UTC, DN
Details
icons used (39.16 KB, image/png)
2024-04-22 20:48 UTC, DN
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DN 2024-04-20 22:42:00 UTC
SUMMARY
dolphin won't open and causes a memory leak

STEPS TO REPRODUCE
1. open dolphin

OBSERVED RESULT
increased ram usage till point of system hang

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux arch 6.8.7-arch1-1
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
https://youtu.be/D9YcTGhf6GA

P.S. I will improve upon submit with logs and such a bit later
Comment 1 DN 2024-04-21 14:18:43 UTC
Valgrind (valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --log-file=dolphin.valgrind dolphin) shows 

total heap usage: 1,208,091 allocs, 1,206,005 frees, 145,449,170,123 bytes allocated

so over 100GB of memory used?
https://gist.github.com/Gotoro/81b279119d2125e184331c8c23e69d1e
Comment 2 DN 2024-04-21 14:56:05 UTC
Created attachment 168748 [details]
valgrind massif heap tracer output

This one shows spikes up to 5GB on dolphin open, if anybody can read valgrind massif output please do, I'll do so a bit later;
this one is for process PID 27662, the tracer produced two more, I'll attach them in a bit
Comment 3 DN 2024-04-21 22:06:17 UTC
okay, so this line in the trace of the valgrind's recorded 19th event (the peak of memory consumption)
->99.77% (5,243,953,552B) 0x61A98C3: QImageData::create(QSize const&, QImage::Format) (qimage.cpp:145)
asks for 5GB of memory using a function QImageData::create

the half of which comes from the KMainWindow::event function
->49.87% (2,621,440,000B) 0x5189FA2: KMainWindow::event(QEvent*) (kmainwindow.cpp:862) 

and other half comes from an unknown function
| ->49.87% (2,621,440,000B) 0x61A9C79: UnknownInlinedFun (qimage.cpp:799)
which leads down to QCoreApplication::notifyInternal2
->49/87% (2?621?440?000B) 0x6A06AE7^ QCoreApplication^^notifyInternal2(QObject*? QEvent*) (qcoreapplication/cpp^1134)

so possible culprits? I think these things come from qt framework so I need a second opinion on these.

To add to this the dolphin opens in the end (after a minute or so) and works as expected with normal memory consumption, it's in the beginning when it starts to consume all of system's memory
Comment 4 DN 2024-04-22 20:45:49 UTC
UPDATE: Changing icon theme pack seems to affect it. Currently I'm using one called Flatery-Dark, installed about 2 years ago. Changing to any other, like Breeze for example fixes the problem, dolphin opens pretty quick and as expected. Changing it back to Flatery-Dark reintroduces the problem. In my case, only this particular icon pack is what's causing the problem, so I'll change it for now I guess. 

I won't say it's resolved though as it's not apparent what's actually causing the problem. I came back to this machine about a few months of inactivity, updating it to the new KDE6 as it seems. Nothing else was changed about setup, only the update.

To add to this, I'm running this on X11 if somebody wants to investigate further, but I'm guessing the problem is pretty local in its nature as I don't see any duplicates of it. I can also provide this particular icon theme pack if someone asks for it.
Comment 5 DN 2024-04-22 20:48:50 UTC
Created attachment 168819 [details]
icons used
Comment 6 DN 2024-04-22 20:57:07 UTC
This here is the icon theme used, downloaded from the settings internal "Get New..." utility.
https://store.kde.org/p/1332404
The pack provides several colors to choose from, if I download Flatery-Indigo it actually downloads two packs - Flatery-Indigo and Flatery-Indigo-Dark.
Interestingly, only the Dark version(!) is what causes the behaviour, the "normal"  version works just fine.