https://bugs.kde.org/show_bug.cgi?id=462277
Bug ID: 462277 Summary: When a window is closed, kwin does not free the memory for its icon Classification: Plasma Product: kwin Version: 5.25.3 Platform: Archlinux OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: kwin-bugs-n...@kde.org Reporter: kishor...@gmail.com Target Milestone: --- Created attachment 154051 --> https://bugs.kde.org/attachment.cgi?id=154051&action=edit kwin support information SUMMARY When a window is opened, kwin seems to allocate some memory to store its icon. However, this memory is not freed when the window is closed. heaptrack output: https://drive.google.com/file/d/1xkhCrdzyPWCX6wtRDGubhhkyOfE-jeaN/view?usp=sharing (it is too big to attach here, 5 MB) STEPS TO REPRODUCE 1. `heaptrack kwin_x11 --replace` 2. Run the following loop in bash: ``` while true do sleep 5 dolphin & sleep 5 killall dolphin -u kishore done ``` 3. Wait for some time 4. Kill kwin. 5. `heaptrack_gui $name_of_output_file` OBSERVED RESULT Kwin's memory usage grows linearly with time (heaptrack output attached). The backtrace to which heaptrack associates most of the memory is: ``` readIcon in libKF5WindowSystem.so.5 NETWinInfo::update(QFlags<NET::Property>, QFlags<NET::Property2>) in libKF5WindowSystem.so.5 KWin::WinInfo::WinInfo(KWin::X11Window*, unsigned int, unsigned int, QFlags<NET::Property>, QFlags<NET::Property2>) in libkwin.so.5 KWin::X11Window::manage(unsigned int, bool) in libkwin.so.5 KWin::Workspace::createX11Window(unsigned int, bool) in libkwin.so.5 KWin::Workspace::workspaceEvent(xcb_generic_event_t*) in libkwin.so.5 QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) in libQt5Core.so.5 QXcbConnection::handleXcbEvent(xcb_generic_event_t*) in libQt5XcbQpa.so.5 QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) in libQt5XcbQpa.so.5 <unresolved function> in libQt5XcbQpa.so.5 g_main_context_dispatch in libglib-2.0.so.0 <unresolved function> in libglib-2.0.so.0 g_main_context_iteration in libglib-2.0.so.0 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) in libQt5Core.so.5 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) in libQt5Core.so.5 QCoreApplication::exec() in libQt5Core.so.5 main in kwin_x11 ``` EXPECTED RESULT Memory usage should reach steady state after some time. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.26.3 KDE Frameworks Version: 5.100.0 Qt Version: 5.15.7 Kernel Version: 5.15.79-1-lts (64-bit) Graphics Platform: X11 Graphics Processor: virgl Manufacturer: QEMU ADDITIONAL INFORMATION A. I'm not sure if the same thing happens on Wayland. B. I installed debug symbols for kwin and kwindowsystem. C. kwin support information (`qdbus org.kde.KWin /KWin supportInformation`) is attached D. heaptrack output: https://drive.google.com/file/d/1xkhCrdzyPWCX6wtRDGubhhkyOfE-jeaN/view?usp=sharing (it is too big to attach here, 5 MB) -- You are receiving this mail because: You are watching all bug changes.