Bug 384760 - absence of proper (current) titles in Task Manager where, for example, many windows are opened in rapid succession by Firefox or SeaMonkey
Summary: absence of proper (current) titles in Task Manager where, for example, many w...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: unspecified
Platform: Other FreeBSD
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D7871
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-16 06:30 UTC by Graham Perrin
Modified: 2017-09-29 19:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.11.0
mgraesslin: ReviewRequest+


Attachments
2017-09-16 04:49:10 screenshot of the bug affecting nine of fourteen windows of Firefox (136.71 KB, image/png)
2017-09-16 06:30 UTC, Graham Perrin
Details
Shot one of three: during Firefox restoration of a session (434.05 KB, image/png)
2017-09-22 02:46 UTC, Graham Perrin
Details
Shot two of three: during Firefox restoration of a session (33.78 KB, image/png)
2017-09-22 02:46 UTC, Graham Perrin
Details
Shot three of three (507.98 KB, image/png)
2017-09-22 02:47 UTC, Graham Perrin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin 2017-09-16 06:30:09 UTC
Created attachment 107875 [details]
2017-09-16 04:49:10 screenshot of the bug affecting nine of fourteen windows of Firefox

I should treat the 'Task Manager' component of this report as tentative, because: 

* symptoms of the bug are not limited to Task Manager

– in each affected window, there's an inappropriate suffix e.g. ' <2>' in the title bar (but not in the tab bar). 

In the first attachment, a screenshot, the title should be: 

> Memleax - Mozilla Firefox

===========
Symptoms
===========

Task Manager shows: 

> Mozilla Firefox <6>

Firefox shows: 

> Memleax - Mozilla Firefox <6>


I have more screenshots, from that incident and others. 


===========
Workaround
===========

None. 

If I'm lucky, the next launch of Firefox will restore its (dozen or so) windows in an order that causes a previously bugged window to be not bugged – but I never get a bug-free session (it's most common for me to find ten of twelve windows bugged). 

High impact, because I rely very heavily on dragging a tab of Firefox from one window to another, which is unreasonably difficult when most of the others are unidentifiable. 


===========
Environment
===========

KDE Plasma 5 from Area 51. 

The issue began following a pkg(8) upgrade that involved an update from 5.10.5 to 5.10.95. 

[grahamperrin@momh167-gjp4-hpelitebook8570p-freebsd] ~% date ; uname -v
Sat 16 Sep 2017 07:22:41 BST
FreeBSD 12.0-CURRENT #0 r320869: Mon Jul 10 13:57:55 UTC 2017 root@releng3.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC 

Whilst that -CURRENT is quite outdated, I doubt that the underlying build of the OS is a factor in this bug.
Comment 1 Eike Hein 2017-09-16 14:12:34 UTC
libtm calls KWindowInfo::visibleName which is somehow based on kwin's smart captioning.
Comment 2 Martin Flöser 2017-09-16 15:30:07 UTC
Please provide output of xprop for an affected window
Comment 3 Graham Perrin 2017-09-17 01:41:09 UTC
$ date
Sun 17 Sep 2017 02:39:16 BST
$ xprop -id 0x6a0011d WM_NAME _NET_WM_VISIBLE_ICON_NAME _NET_WM_VISIBLE_NAME
WM_NAME(STRING) = "Matrix.org"
_NET_WM_VISIBLE_ICON_NAME(UTF8_STRING) = "Matrix.org <4>"
_NET_WM_VISIBLE_NAME(UTF8_STRING) = "Mozilla Firefox <4>"
$
Comment 4 Martin Flöser 2017-09-17 07:15:16 UTC
I asked for the complete xprop output. Please don't remove anything, I need the complete output.
Comment 5 Graham Perrin 2017-09-18 02:35:35 UTC
$ date
Mon 18 Sep 2017 03:21:22 BST
$ xprop -id 0x6c0044e
_NET_WM_VISIBLE_ICON_NAME(UTF8_STRING) = "Matrix.org <11>"
_NET_WM_ICON_GEOMETRY(CARDINAL) = 2, 373, 184, 31
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
_KDE_NET_WM_FRAME_STRUT(CARDINAL) = 0, 0, 23, 0
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 23, 0
_NET_WM_DESKTOP(CARDINAL) = 11
_KDE_NET_WM_ACTIVITIES(STRING) = "100a8d50-9d9a-4576-a22f-15764382a834"
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ
_NET_WM_VISIBLE_NAME(UTF8_STRING) = "Mozilla Firefox <11>"
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                Initial state is Normal State.
                bitmap id # to use for icon: 0x6c00452
                bitmap id # of mask for icon: 0x6c00458
                window id # of group leader: 0x6c00001
_GTK_THEME_VARIANT(UTF8_STRING) = 
WM_WINDOW_ROLE(STRING) = "browser"
XdndAware(ATOM) = BITMAP
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 43982996
_NET_WM_ICON(CARDINAL) =        Icon (16 x 16):
                        
              ░░░░      
            ░▒░░░░░     
          ░▒▒░▒░░░▒░    
          ▒░░░▒▒▒▒▒▒    
         ░░░░░░░▒▒▒▒░   
         ░▒░░░▒▒▒▒▒▒░ ░ 
         ▒▒░▒▒▒▒▒▓▓▓  ░ 
         ▒▒▒▒▒▓▒▒▓▓▓  ░ 
         ▒▒▒▒░░░▒▒▓▒  ░ 
         ░▒▒▒▒▒▓▓▓▓░░░░ 
          ▒▒▒▒▒▒▒▒░░░▒  
           ▒▒▒▒▒▒░░░▒░  
           ░▒▒▒▒▒▒▒▒░   
            ░▒▒▒▒▒▒░    
               ░░       

        Icon (32 x 32):
                                        
                      ░░░░              
                  ░░░░░░░░░░░░          
                ░░░░░░░░░░░░░░          
               ░░▒▒▒░░░░░░░░░░░  ░      
            ░ ░▒▒▒▒░░░░░░░░░░░░▒  ░     
           ░▒▒▒▒░░░░░░░░░░░▒▒▒▒░░  ░    
           ▒▒▒░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒    ░   
           ▒░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒░       
           ░░░░░░░░▒░░░▒▒▒▒▒▒▒▒▒▒       
          ░░░░░░░░░▒▒▒░▒▒▒▒▒▒▒▒▒▒░      
          ░░░░░░░░░░░ ░▒▒▒▒▒▒▒▒▒▒▒      
         ░▒▒░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒      
         ░▒▒▒░░░░░░░▒▒▒▒▒▒▒▒▒▒▓▓▒░    ░ 
         ░▒▒▒░░░░▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▒     ▒ 
         ░▒▒▒░░░▒▒▒▓▒▒▒▒▒▒▓▓▓▓▓▓▒    ░▒                                                                                                                                                                                                                                      
         ░▒▒▒▒░▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▒    ░░                                                                                                                                                                                                                                      
         ░▒▒▒▒▒▒▒░░▒▒▓▓▒▒▒▒▓▓▓▓▓▒    ░  
         ░▒▒▒▒▒▒▒░░░░▒░░░░░▓▓▓▓▒░░   ░  
          ▒▒▒▒▒▒▒▒░░░░░░▒▒▒▓▓▓▓▒░░ ░░░  
          ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓░░░░░░░  
          ░▒▒▒▒▒▒▒░░▒▓▓▓▓▓▓▓▓▓▒░░░░░░░  
           ▒▒▒▒▒▒▒▒▒░▒▒▓▓▓▓▓▒▒░░░░░░▒░  
           ░▒▒▒▒▒▒▒▒▒░▒▒▒▒▒▒░░░░░░░▒▒   
            ▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░▒░   
             ▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░▒▒░    
             ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░     
              ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░      
               ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒       
                ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒░        
                  ░▒▒▒▒▒▒▒▒▒▒░          
                                        

        Icon (48 x 48):
                                                        
                                                        
                              ░░░░                      
                         ░░░░░░░░░░░░░░                 
                       ░░░░░░░░░░░░░░░░░░               
                     ░░░░░░░░░░░░░░░░░░░  ░             
                   ░░░░░░░░░░░░░░░░░░░░░▒░              
              ░   ░░░▒▒▒▒▒░░░░░░░░░░░░░░░▒░  ░░         
              ░░ ░░▒▒▒▒▒░░░░░░░░░░░░░░░░░░▒░   ░        
             ░░▒░▒▒▒▒▒▒░░░░▒░░░░░░░░▒▒▒▒▒▒░▒░   ░       
             ░▒▒▒▒░░░░░░░░▒▒▒░░░░░░▒▒▒▒▒▒▒░ ░░  ░░      
             ▒▒▒░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░     ░      
             ▒▒░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░           
             ▒░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒           
             ░░░░░░░░░░░░▒▒░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒░          
            ░░░░░░░░░░░░░▒▒▒░▒░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒          
           ░░░░░░░░░░░░░░▒▒░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒          
           ░░░░░░░░░░░░░░░░░ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓░         
           ░░▒▒░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░         
          ░░▒▒▒░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▒ ▒     ░░  
          ░░▒▒▒▒░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▒ ░     ░▒  
          ░▒▒▒▒▒░░░░░░▒▒▒▒░▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▒       ▒▒  
          ░▒▒▒▒▒░░░░░▒▒▒▓▓▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▒       ▒░  
          ░▒▒▒▒▒▒░░░▒▒▒▒▓▓▓▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▒       ▒░  
          ░▒▒▒▒▒▒▒░▒▒▒▒░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒      ░░   
          ░▒▒▒▒▒▒▒▒▒▒▒░░░▒▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▓▒░     ░░   
          ░▒▒▒▒▒▒▒▒▒▒▒░░░░░▒▒▒▒░░░░░▒▓▓▓▓▓▓▒░░     ░░   
           ▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░▓▓▓▓▓▓░░░     ░░   
           ░▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▓▓▓▓▓▓▓░░░  ░░░░░   
           ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▒ ░░ ░░░░░    
            ▒▒▒▒▒▒▒▒▒▒▒░▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░    
            ▒▒▒▒▒▒▒▒▒▒▒▒░░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░▒▒    
             ▒▒▒▒▒▒▒▒▒▒▒▒░░▒▓▓▓▓▓▓▓▓▓▓▓▒▓░░░░░░░░░▒▒    
             ▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▓▓▓▓▓▓▓▒░░░░░░░░░░▒▒░    
              ▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▒░░░░░░░░░░░▒▓▒     
              ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░▒▒░     
               ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░▒▒▒▒░      
                ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░▒▒▒▒░       
                ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░        
                 ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░         
                  ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░          
                   ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▒▒░          
                    ░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░           
                     ░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░             
                        ░░░▒▒▒▒▒▒▒▒▒▒░░░                
                                                        
                                                        
                                                        


_NET_WM_OPAQUE_REGION(CARDINAL) = 
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 113247312, 113247313
_NET_WM_USER_TIME(CARDINAL) = 77229022
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x6c0044f
WM_CLIENT_LEADER(WINDOW): window id # 0x6c00001
_NET_WM_PID(CARDINAL) = 97535
WM_LOCALE_NAME(STRING) = "en_GB.UTF-8"
WM_CLIENT_MACHINE(STRING) = "momh167-gjp4-hpelitebook8570p-freebsd"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified minimum size: 300 by 168
                program specified base size: 300 by 168
                window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "Navigator", "Firefox"
WM_ICON_NAME(STRING) = "Matrix.org"
_NET_WM_ICON_NAME(UTF8_STRING) = "Matrix.org"
WM_NAME(STRING) = "Matrix.org"
_NET_WM_NAME(UTF8_STRING) = "Matrix.org"
$
Comment 6 Martin Flöser 2017-09-18 16:40:45 UTC
Possible patch at https://phabricator.kde.org/D7871
Comment 7 Graham Perrin 2017-09-22 02:42:32 UTC
Thanks for the speedy response! 

Apologies for the terseness of <https://bugs.kde.org/show_bug.cgi?id=384760#c3> above, things such as xprop were entirely new to me and I was wary of adding noise (the icons and so on). 

As far as I can tell, the patch does fix this bug. 

Tested: <http://meatwad.mouf.net/rubick/poudriere/packages/head-amd64-kde/All/plasma5-kwin-5.10.95_1.txz> from Area 51 for KDE on FreeBSD. Screenshots to follow. 

----

Was the 'rapid succession' truly a factor in exposing this bug?
Comment 8 Graham Perrin 2017-09-22 02:46:03 UTC
Created attachment 107944 [details]
Shot one of three: during Firefox restoration of a session
Comment 9 Graham Perrin 2017-09-22 02:46:26 UTC
Created attachment 107945 [details]
Shot two of three: during Firefox restoration of a session
Comment 10 Graham Perrin 2017-09-22 02:47:15 UTC
Created attachment 107946 [details]
Shot three of three
Comment 11 Martin Flöser 2017-09-23 09:51:12 UTC
Git commit ab7b6757bf323a07d950bff0d44a5db93a04cd09 by Martin Flöser.
Committed on 23/09/2017 at 09:50.
Pushed by graesslin into branch 'Plasma/5.11'.

Properly update the visible (icon) name when the caption changes

Summary:
It was possible that we performed an early exit when the caption changes
and this results in the visible name being wrong. E.g if we have two
windows called foo, the second one has the visible name "foo <2>". After
changing that to "bar" the bug resulted in it still being the foo
variant instead of getting cleared.
FIXED-IN: 5.11.0

Test Plan: Created new test case exposing the problem

Reviewers: #kwin, #plasma, hein

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7871

M  +74   -0    autotests/integration/x11_client_test.cpp
M  +2    -1    client.cpp

https://commits.kde.org/kwin/ab7b6757bf323a07d950bff0d44a5db93a04cd09