This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/103247/

This review has been submitted with commit a4a4679d0e82d88392c2b6d9259ed441921914c4 by Aaron Seigo to branch master.

- Commit


On November 26th, 2011, 3:43 p.m., Jonathan Marten wrote:

Review request for Plasma.
By Jonathan Marten.

Updated Nov. 26, 2011, 3:43 p.m.

Description

The referenced bug describes a Plasma crash caused by a TaskSource (used by the "tasks" data engine) retaining a pointer to a Task.  When its associated window is closed, the Task is deleted but somehow the TaskSource is not.  This causes a dangling pointer crash when the TaskSource next gets the currentDesktopChanged() signal (and presumably also currentActivityChanged() if activities are in use).

The source should get deleted in DataEngine::removeSource() via deleteLater().  This does not seem to work - if a single shot timer is used instead (as also in commits 0f40b577 and 52783c6c), the TaskSource gets deleted correctly and the crash does not happen.

(This also resulted in a TaskSource memory leak).

Testing

Verified that the TaskSource destructor is never called by adding a kDebug() there.

Built kdelibs and kdeworkspace with this change, used for day-to-day work (when the crash used to happen quite regularly) and with the crash scenario described in the bug.  The TaskSource destructor is called as expected, and the crash does not happen.
Bugs: 286353

Diffs

  • plasma/dataengine.cpp (c33b103)

View Diff