Summary: | Plasma crashes if screenshot notification disappears while drag-'n-dropping image | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Dakota Sullivan <dakota.sullivan> |
Component: | general | Assignee: | David Edmundson <kde> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | bugseforuns, kde, plasma-bugs |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.11.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/plasma-workspace/86fe986934742ea2a877bf8cb8393c6f0591ef58 | Version Fixed In: | 5.12.0 |
Sentry Crash Report: |
Description
Dakota Sullivan
2018-01-08 15:02:34 UTC
There's code that prevents it from auto-closing while dragging but I can see a situation where it would still close. If you have a notification shown ontop of the screenshot one, then the top one closes, the notification moves up and that restarts the timer and then it will close and blow up. I can trigger the crash without another notification showing up, but I am running three screens all which have notification widgets in their panels, and it doesn't matter which screen I drag from. Can you test a patch? https://phabricator.kde.org/D9735 That did not fix the issue. I was able to modify /usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationPopup.qml and change the layout direction after restarting Plasma, but applying your changes appeared to have no effect. Something else to note is that the notification item disappears even while I have my mouse hovering on top of it. Okay, that is then very weird and shouldn't be. hmm. Using the layout direction for debugging I can confirm that the "onContainsMouseChanged" and "onDraggingChanged" event handlers and "containsMouse" and "dragging" variables are working as far as I can tell. The issue seems to be something inside the notificationTimer where it doesn't stop properly. I did some more testing and it turns out I can only cause this when I have two or more System Tray plasmoids. I am guessing it has something to do with duplicate timers, but I am pretty new to KDE so I don't know how to fix this. You are right, this makes absolute sense. The data engine is shared between all applet. Since there can only be one hovered popup at a time, it will eventually time out and signal deletion of the message which will close the popup regardless. I made a more elaborate patch that makes the applet's aware of each other being dragged: https://phabricator.kde.org/D9754 Git commit 86fe986934742ea2a877bf8cb8393c6f0591ef58 by Kai Uwe Broulik. Committed on 11/01/2018 at 13:01. Pushed by broulik into branch 'master'. [Notifications] Use custom DragHelper instead of Qt's Drag attached property Qt's Drag attached property doesn't like it at all when it gets deleted during drag. (QTBUG-65701) Even though we try very hard to keep the popup open, when you have multiple notification applets, their dialogs don't know each other but access a shared data engine. This means that, since there can only we one hovered dialog at a time, another notification applet might still dismiss the notification and have our dialog close. By using a singleton NotificationHelper we 1.) decouple the Drag from the item and 2.) share the "is dragging" state between applets. FIXED-IN: 5.12.0 Differential Revision: https://phabricator.kde.org/D9754 M +24 -15 applets/notifications/package/contents/ui/ThumbnailStrip.qml M +1 -0 applets/notifications/plugin/CMakeLists.txt A +84 -0 applets/notifications/plugin/draghelper.cpp [License: GPL (v2+)] A +53 -0 applets/notifications/plugin/draghelper.h [License: GPL (v2+)] M +10 -0 applets/notifications/plugin/notificationshelperplugin.cpp https://commits.kde.org/plasma-workspace/86fe986934742ea2a877bf8cb8393c6f0591ef58 Git commit ade1817522f62cf7f7d552e9954ba5eb8faa9c0b by Kai Uwe Broulik. Committed on 11/01/2018 at 13:03. Pushed by broulik into branch 'master'. [Notifications] Don't restart hide timer on reposition while dragging We checked for dragging in onContainsMouseChanged but not here. Differential Revision: https://phabricator.kde.org/D9735 M +1 -1 applets/notifications/package/contents/ui/NotificationPopup.qml https://commits.kde.org/plasma-workspace/ade1817522f62cf7f7d552e9954ba5eb8faa9c0b |