This is probably a spectacle issue but it is very important as it increases plasma memory endlessly Steps to reproduce: 1. The user drags the screenshot from spectacle onto the plasma taskmanager 2. the user doesnt release the image, he just moves the mouse over the taskmanager with the dragged image 3. Observing through ksysguard the plasmashell app its memory increases endlessly and it is not released afterwards
When I do this (only tried with Task Manager in plasmoidviewer, though) Spectacle crashes after hovering the fourth or fifth icon by having its X connection die.
In my system even with plasmawindowed (I think plasmoidviewer is a plasma 4 thing) I get the same behavior
Plasmoidviewer is in plasma-sdk
Created attachment 105755 [details] high memory from taskmanager
the issue has been confirmed also from other users because it appeared first in Latte and we tracked it down also to plasma taskmanager. This means that it can be either from libtaskmanager or libtaskmanagerbackend that Latte uses also or from taskmanager implementation that Latte follows in many parts.
(In reply to Kai Uwe Broulik from comment #3) > Plasmoidviewer is in plasma-sdk nice, I didnt know that
DeclarativeMimeData* DeclarativeDragDropEvent::mimeData() definitely has a bug. In theory as the object is created from an invokable from QML it gets QML ownership, which means the JS intepretter will delete it. But if that's the case, we shouldn't be tracking it blindly as a member var, because potentially that's a dangly pointer. or it's not getting QML ownership, and then it's just leaking like crazy, which would be unexpected to me, but it'd match this bug report.
Edit: realised something just after I hit save changes. "This applies only to explicit invocations of Q_INVOKABLE methods or slots, but not to property getter invocations." and this is a property, hence leaking. We can either delete when the event is deleted or use JS ownership.
> In theory as the object is created from an invokable from QML It's exposed as a property, so this doesn't apply, instead we get > or it's not getting QML ownership, and then it's just leaking like crazy,
Git commit 695f24fb522a5ae6fe2530cbd72d3966b234b025 by David Edmundson. Committed on 31/05/2017 at 09:08. Pushed by davidedmundson into branch 'master'. Don't leak MimeData object Summary: A DeclarativeDropArea creates a new DeclarativeDragDropEvent on every enter/move/leave event. The getter method for the mimeData property creates a new MimeData QObject wrapper, which then leaks. Use of the mimeData object outside of the event shouldn't be expected to work, and a quick grep couldn't find any usage. Test Plan: Dragged some things Reviewers: #plasma, mart, hein Reviewed By: #plasma, mart, hein Subscribers: hein, plasma-devel, #frameworks Tags: #plasma, #frameworks Differential Revision: https://phabricator.kde.org/D6017 M +2 -2 src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp M +2 -3 src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h https://commits.kde.org/kdeclarative/695f24fb522a5ae6fe2530cbd72d3966b234b025