Bug 467841

Summary: PlasmaDesktopTheme::syncWindow() uses a lot of memory
Product: [Frameworks and Libraries] frameworks-qqc2-desktop-style Reporter: liuxy6
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, josh, kde, liuxy6, noahadvs, notmart
Priority: NOR    
Version First Reported In: 5.104.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.0,5.112.0
Sentry Crash Report:

Description liuxy6 2023-03-27 04:26:41 UTC
SUMMARY
I've observed that plasmashell sometimes keeps allocating more and more memory - over 20GB in a few minutes, but normally it should use less than 500MB.

Most of the memory is allocated by this line in `PlasmaDesktopTheme::syncWindow()`.

            connect(qw, &QQuickWindow::sceneGraphInitialized, this, &PlasmaDesktopTheme::syncWindow).

I tried adding `Qt::UniqueConnection` to this connection, and so far the problem has not reappeared, and no other problems have been observed.


STEPS TO REPRODUCE
1. start plasmashell
2. switch to another tty
3. wait for some time (about 30 minutes)


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.27.3
(available in About System)
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
X11

ADDITIONAL INFORMATION