Solved High memory usage with Qt 6.0.0
-
I'm experiencing very high memory usage with Qt 6.0.0 over time.
In a few weeks the program uses almost 1 GB of memory. The only patch I have is for https://bugreports.qt.io/browse/QTBUG-89176 because without it, Qt 6.0.0 frequently crashes.
Compiled with Qt 5.15.2, the program uses steadily around 200 MB.
LeakSanitizer is showing no leaks (just few alsa and fontfconfig ones that have always been there, but nothing related to my code or Qt).
I can reproduce the same on both openSUSE LP 15.2 and tumbleweed.
Using Valgrind, I can see some leaks, but I suspect they are false-positives, and I see the same thing with Qt 5.15.2. I also have problems with Valgrind crashing. I normally use LeakSanitizer because Valgrind is so slow.
I suspect that Qt 6 is allocating some memory that isn't freed but is still ref'ed and free'ed on exit.
Have anyone else seen this?
The program only uses base, but all modules.
I want to open a bug report to Qt, but I don't think I have enough to go on.
If anyone want to help me, the project is open on GitHub here: https://github.com/strawberrymusicplayer/strawberry -
This is a regression in commit b97001aa1cbd21008ebc48fe61b15fbcacb14875
Reported here https://bugreports.qt.io/browse/QTBUG-89998