Bug 368718 - KNotification::event() leaks memory
Summary: KNotification::event() leaks memory
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-knotifications
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: Martin Klapetek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-12 22:18 UTC by Jasem Mutlaq
Modified: 2020-12-11 17:33 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jasem Mutlaq 2016-09-12 22:18:33 UTC
Calling KNotification::event(...) to play a sound leaks memory. KStars calls it for some event about once a second, after a while, the memory consumption steadily increases with each call to KNotification::event(...).

When editing KDE Notifications and turning off "Play Sound" for the event triggered, the memory leak stops. So it is definitely related to playing sounds and handling its resources.

KStars does not delete any pointers returned by KNotification::event() as it is supposed to be deleted automatically upon completion of event.

Reproducible: Always

Steps to Reproduce:
1. Trigger any notification sound
2. Watch memory as notification is triggered repeatedly
3.

Actual Results:  
Memory leaks

Expected Results:  
No leaks
Comment 1 Nicolas Fella 2020-11-23 00:35:30 UTC
I worked on a similar issue in the taskbar notification backend: https://invent.kde.org/frameworks/knotifications/-/merge_requests/19

I didn't notice any leaks related to sound while doing that. Is this still an issue for you?
Comment 2 Bug Janitor Service 2020-12-08 04:34:01 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Jasem Mutlaq 2020-12-08 04:54:06 UTC
We now just advise users to turn sound notifications off. So can't tell.