Bug 365181 - Task Manager thumbnails for grouped tasks lead to incorrect windows
Summary: Task Manager thumbnails for grouped tasks lead to incorrect windows
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager widgets (show other bugs)
Version: 5.7.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
: 365717 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-07-07 08:00 UTC by madcatx
Modified: 2016-07-15 18:24 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 madcatx 2016-07-07 08:00:22 UTC
I have discovered this quite annoying issue ever since updating to Plasma 5.7. The issue can be easily observed like this:

1. Enable task grouping in Task Manager plasmoid
2. Launch an application (I use Dolphin  to reliably reproduce the isse)
3. RIghtlick on its entry in the taskbak, select "Start a new instance"
4. Start up a few instances and open different folders in them to tell the windows apart easily
5. Hover the mouse over the grouped Dolphin entry, wait for the thumbnails to appear
6. Click on any thumbnail, chances are that it will activate an incorrect window

Leftclicking on the task entry and selecting a window from the menu works OK.

Reproducible: Always
Comment 1 Eike Hein 2016-07-07 20:22:11 UTC
I can't reproduce this unfortunately. Can you provide any more clues?
Comment 2 Eike Hein 2016-07-07 20:25:19 UTC
Ah hold on, I just realized what's up there.
Comment 3 Eike Hein 2016-07-07 20:35:03 UTC
Git commit 313aede08506b87358e0d770911c562d3ac6f234 by Eike Hein.
Committed on 07/07/2016 at 20:32.
Pushed by hein into branch 'Plasma/5.7'.

Return LegacyWinIdList for groups in final proxy sort order.

TaskGroupingProxyModel appends; the proxy may sort differently
(e.g. alphabetically by default). The win id list was returned
in TGPM sort order, which meant the tooltips had the thumbnails
in the wrong order, and clicking them would activate the wrong
window.

M  +16   -0    libtaskmanager/tasksmodel.cpp
M  +2    -0    libtaskmanager/tasksmodel.h

http://commits.kde.org/plasma-workspace/313aede08506b87358e0d770911c562d3ac6f234
Comment 4 madcatx 2016-07-08 09:02:25 UTC
Thanks for looking into this so quickly. I tried the patch this morning but it seems to crash the whole plasma with the backtrace below, I am missing something here?

file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/ToolTipDelegate.qml:82: TypeError: Cannot read property 'DesktopEntry' of undefined

Thread 1 "plasmashell" received signal SIGSEGV, Segmentation fault.
0x00007fff3b0cf79c in TaskManager::TasksModel::data (this=0x29a4040, proxyIndex=..., role=268)
    at /home/madcat/abs/plasma-workspace/src/plasma-workspace-5.7.0/libtaskmanager/tasksmodel.cpp:823
823     {
(gdb) bt
#0  0x00007fff3b0cf79c in TaskManager::TasksModel::data (this=0x29a4040, proxyIndex=..., role=268)
    at /home/madcat/abs/plasma-workspace/src/plasma-workspace-5.7.0/libtaskmanager/tasksmodel.cpp:823
#1  0x00007fff3b0cf7de in QModelIndex::data (arole=268, this=0x7fffffff8470) at /usr/include/qt/QtCore/qabstractitemmodel.h:426
#2  TaskManager::TasksModel::data (this=0x29a4040, proxyIndex=..., role=268)
    at /home/madcat/abs/plasma-workspace/src/plasma-workspace-5.7.0/libtaskmanager/tasksmodel.cpp:824
#3  0x00007fff3b0cf7de in QModelIndex::data (arole=268, this=0x7fffffff8470) at /usr/include/qt/QtCore/qabstractitemmodel.h:426
#4  TaskManager::TasksModel::data (this=0x29a4040, proxyIndex=..., role=268)
    at /home/madcat/abs/plasma-workspace/src/plasma-workspace-5.7.0/libtaskmanager/tasksmodel.cpp:824
#5  0x00007fff3b0cf7de in QModelIndex::data (arole=268, this=0x7fffffff8470) at /usr/include/qt/QtCore/qabstractitemmodel.h:426
#6  TaskManager::TasksModel::data (this=0x29a4040, proxyIndex=..., role=268)
    at /home/madcat/abs/plasma-workspace/src/plasma-workspace-5.7.0/libtaskmanager/tasksmodel.cpp:824
#7  0x00007fff3b0cf7de in QModelIndex::data (arole=268, this=0x7fffffff8470) at /usr/include/qt/QtCore/qabstractitemmodel.h:426
#8  TaskManager::TasksModel::data (this=0x29a4040, proxyIndex=..., role=268)
    at /home/madcat/abs/plasma-workspace/src/plasma-workspace-5.7.0/libtaskmanager/tasksmodel.cpp:824
#9  0x00007fff3b0cf7de in QModelIndex::data (arole=268, this=0x7fffffff8470) at /usr/include/qt/QtCore/qabstractitemmodel.h:426
Comment 5 Eike Hein 2016-07-08 22:06:24 UTC
I  committed another revision shortly after that fixed the crash.
Comment 6 madcatx 2016-07-09 18:02:17 UTC
Great, with both patches applied the issue seems to be gone. Thanks!

(This is probably another matter but I noticed that clicking on the thumbnail does not activate the window when there is only one window in the group. This was not the case in 5.6, was this an intentional change?)
Comment 7 Eike Hein 2016-07-10 06:26:49 UTC
> (This is probably another matter but I noticed that clicking on the thumbnail does not activate the window when there is only one window in the group. This was not the case in 5.6, was this an intentional change?)

No, this is probably a bug. I'll have a look, thanks!
Comment 8 Eike Hein 2016-07-10 08:27:35 UTC
^ Fixed by 901e76e4b0fb in plasma-desktop.git
Comment 9 Eike Hein 2016-07-15 18:24:16 UTC
*** Bug 365717 has been marked as a duplicate of this bug. ***