Summary: | Dolphin Crashed | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-knotifications | Reporter: | Omar <elrefaei.omar> |
Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | elvis.angelaccio, fabian, hgcoin, kde, kdelibs-bugs, nate |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.50.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/knotifications/d4f51fdc1d53fbcb37a3c52dcbabe0e264b611ce | Version Fixed In: | |
Sentry Crash Report: |
Description
Omar
2018-09-16 06:51:31 UTC
Ops, please kindly ignore the "What I was doing when the application crashed" part, I reported this in the wrong bug. What did you do then? Delete a file or something like that? (In reply to Omar from comment #1) > Ops, please kindly ignore the "What I was doing when the application > crashed" part, I reported this in the wrong bug. (In reply to Kai Uwe Broulik from comment #2) > What did you do then? Delete a file or something like that? Also, is the issue reproducible? Git commit d4f51fdc1d53fbcb37a3c52dcbabe0e264b611ce by Harald Sitter. Committed on 09/10/2018 at 11:25. Pushed by sitter into branch 'master'. force-finish canberra notifications on close() Summary: `KNotification::close()` causes the manager to close the plugin for the notification and after that KNotification will call deleteLater() on itself. In the canberra variant of NotifyByAudio we handled this by calling ca_context_cancel to abort playback of the audio. This ultimately would still cause a finishCallback once the playback actually cancelled. The callback does arrive in an undefined amount of loop cycles later though. Put together this allowed for timing issues where deleteLater would run before the finishCallback arrived, giving finishCallback the risk of accessing a KNotification object past its lifetime and segfaulting. To prevent this from happening we'll finishNotification in the plugin's close(). This drops the notification out of the mapping hashes and tells the manager that we are done. finishCallback now returns immediately if it cannot find a mapping for a notification (i.e. it was close()d already). CHANGELOG: Fixed a crash caused by bad lifetime management of canberra-based audio notification Test Plan: added qdebugs. without patch close() and thus deleteLater() happens before finishCallback() but the callback still does its thing. with patch finishCallback is noop. Reviewers: broulik, jtamate Reviewed By: broulik, jtamate Subscribers: kde-frameworks-devel, jtamate Tags: #frameworks Differential Revision: https://phabricator.kde.org/D15638 M +11 -1 src/notifybyaudio_canberra.cpp https://commits.kde.org/knotifications/d4f51fdc1d53fbcb37a3c52dcbabe0e264b611ce *** Bug 401591 has been marked as a duplicate of this bug. *** |