* Cinnamon version (cinnamon --version) = Cinnamon 4.2.3
* I am not using the daily builds PPA.
* Distribution = Linux Mint 19.2
* 32 or 64 bit = 64 bit
* Attach /home/<username>/.xsession-errors, or /var/log/syslog
* Graphics hardware *and* driver used
Device-1: Intel HD Graphics 530 vendor: ASRock driver: i915 v: kernel bus ID: 00:02.0
chip ID: 8086:1912
Device-2: NVIDIA GM206 [GeForce GTX 950] vendor: Micro-Star MSI driver: nvidia
v: 390.116 bus ID: 04:00.0 chip ID: 10de:1402
Display: x11 server: X.Org 1.19.6 driver: modesetting,nvidia
unloaded: fbdev,nouveau,vesa resolution: 1920x1080~60Hz, 1920x1080~60Hz, 1920x1080~60Hz
OpenGL: renderer: GeForce GTX 950/PCIe/SSE2 v: 4.6.0 NVIDIA 390.116 direct render: Yes
Issue
Sometimes when I have opened multiple instances of an app and then when I try to close an instance the panel does not remove the icon for that recently closed instance and instead keeps the icon but the icon is now in a broken state. That icon still shows the window title when hovering over it but does not show the thumbnail because it does not refer to an existing process anymore.
Once the icon gets into that state every time I left-click on the icon I get the following error in my ~/.xsession-errors log:
(cinnamon:2233): Cjs-WARNING **: 15:14:49.816: JS ERROR: TypeError: window.get_workspace(...) is null
activateWindow@/usr/share/cinnamon/js/ui/main.js:1479:76
anonymous/onAppButtonRelease/handleMinimizeToggle@/usr/share/cinnamon/applets/[email protected]/appGroup.js:737:17
onAppButtonRelease@/usr/share/cinnamon/applets/[email protected]/appGroup.js:754:17
anonymous/AppGroup/<@/usr/share/cinnamon/applets/[email protected]/appGroup.js:157:103
When I right-click on the icon and select Close, it always waits for a handful of seconds and then displays the dialog to force quit the process which does nothing because the process is no longer running. Interestingly, when I drag-and-drop any of the panel icons to rearrange them the panel cleans up the broken icons and removes them.
Steps to reproduce
Unfortunately I have not been able to find steps to reliably reproduce this issue yet. But I do experience this issue multiple times a day. For my "Grouped Window List" settings, I have changed the following settings
Expected behaviour
When I close an instance of an app the icon which represented it in the panel should always be removed.
Other information
/var/log/syslogExample
https://pasteboard.co/IsVJaPH.png
When interacting with these (ie. mouse clicking on it) xsession-errors have these entries appear:
(cinnamon:4266): Cjs-CRITICAL **: 10:14:47.058: Object Cinnamon.GenericContainer (0x55cd0b255770), has been already deallocated - impossible to access to it. This might be caused by the fact that the object has been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs
== Stack trace for context 0x55ccffcc54c0 ==
#0 0x55cd00625d70 i /usr/share/cinnamon/js/ui/panel.js:2507 (0x7f10cda255e8 @ 360)
#1 0x7ffeef94cfe0 b self-hosted:918 (0x7f10ceae6670 @ 394)
(cinnamon:4266): Cjs-CRITICAL **: 10:14:47.406: Object Cinnamon.GenericContainer (0x55cd0b255770), has been already deallocated - impossible to access to it. This might be caused by the fact that the object has been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs
== Stack trace for context 0x55ccffcc54c0 ==
#0 0x7ffeef94c7b0 b /usr/share/cinnamon/js/ui/panel.js:2507 (0x7f10cda255e8 @ 360)
#1 0x7ffeef94cfe0 b self-hosted:918 (0x7f10ceae6670 @ 394)
Same env as reporter has, except for GFX card:
$ inxi -G
Graphics: Device-1: NVIDIA GP107 [GeForce GTX 1050 Ti] driver: nvidia v: 430.26
Display: x11 server: X.Org 1.19.6 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa
resolution: 2560x1440~60Hz, 2560x1440~60Hz
OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 430.26
Just a hint for workaround for @mattvalley
To make these annoying "dead containers" gone, restart Cinnamon, you will not loose your session: Alt + F2 and type r + Enter.
Or if you do a right click on the panel -> Error Search -> Restart Cinnamon
I'm lucky that this is a confirmed bug.
@cstamas and @MartinX3 - Thank you for providing workarounds. I will try using them until there is a fix for this issue.
More info:
a) cannot say for sure, but this seems related to Java apps? I think it is Intellij IDEA that leaves these "empty" app icons, but am unsure (cannot prove, just a feeling)
b) once this happens, the icons get totally "mixed": I have 4 workspaces, and from that moment on, some app icons (slack via flathub) starts to be shown on ALL workspaces, despite app is on one workspace only (is not "show on all workspaces" but panel behaves like that)
Firefox has this problem at my side.
It seems to happen with window stacks.
I finally narrowed this issue down to closing instances of apps which are minimized.
As far as I can tell it's not related to java apps. I was able to reliably reproduce the issue both on my current setup with Linux Mint 19.2 and on a fresh install of it with various apps like nemo, firefox gnome-calculator, etc. The specific kind of app and the count of running instances didn't actually matter the more I looked at this. In my additional testing I was still using the General and Panel settings I mentioned in the original issue description (e.g. the "Group windows by application" setting was unchecked).
When an instance of an app is minimized and then you close that instance using either the right-click menu option on the panel icon or using the thumbnail red close button, it always leaves the icon for that instance on the panel in the broken state.
As a quick update, I also run into this issue when the "Group windows by application" setting is checked. It happens when there is a single minimized application in the given group and I close that application and also when I use the "Close all" context menu option and there are minimized windows in the group being closed.
This is still an issue in Linux Mint 19.3 with cinnamon 4.4.5 but the stack trace has changed slightly:
(cinnamon:2104): Cjs-WARNING **: 19:19:53.257: JS ERROR: TypeError: window.get_workspace(...) is null
activateWindow@/usr/share/cinnamon/js/ui/main.js:1330:76
anonymous/onAppButtonRelease/handleMinimizeToggle@/usr/share/cinnamon/applets/[email protected]/appGroup.js:730:17
onAppButtonRelease@/usr/share/cinnamon/applets/[email protected]/appGroup.js:747:17
anonymous/AppGroup/<@/usr/share/cinnamon/applets/[email protected]/appGroup.js:157:103
@mtwebster, I finally found the root cause of this issue. It's entirely caused by having the "Show windows from all workspaces" setting set to true and then it happens when you close app windows which are currently minimized. I verified the behavior on a fresh install of Linux Mint 19.3 where the only thing I changed after first logging in was to change "Show windows from all workspaces" to true for the Grouped Window List settings. I also verified the behavior after updating all of the packages.
I started to look into the code and I was able to get the close button on a given thumbnail to successfully remove the thumbnail for the minimized app windows by adding the following line to the handleCloseClick() method in /usr/share/cinnamon/applets/[email protected]/menus.js
this.groupState.trigger('removeThumbnailFromMenu', this.metaWindow);
However, that didn't completely fix the issue because the window counter for the given app icon didn't get updated and so the grouped window list still thought the closed window instance was present. At this point I don't know enough about the code to determine what the correct fix would be. But I hope this helps provide more details on what the issue is.
This is still an issue in Linux Mint 20 with cinnamon 4.6.6 and here is the stack trace:
(cinnamon:1277): Cjs-WARNING **: 17:54:34.643: JS ERROR: TypeError: window.get_workspace(...) is null
activateWindow@/usr/share/cinnamon/js/ui/main.js:1339:76
connectToWindow@/usr/share/cinnamon/applets/[email protected]/menus.js:714:13
anonymous/WindowThumbnail/<@/usr/share/cinnamon/applets/[email protected]/menus.js:615:100
@icarter09 - I'm glad to see that you added the "BUG REPRODUCED" tag. Since you had previously asked for steps to reproduce this bug, here are a set of steps that can reliably trigger the problem:
In the end, this looks like a bug with the Grouped Window List not handling the "Show windows from all workspaces" option correctly when you use the panel hover area to close app instances that are currently minimized.
At my setup it also broke if I have panels on multiple desktops and only list windows of the current workspace.
@mattvalley I put up a PR to address this issue. The PR will need some testing to make sure that other GWL concepts have not been affected. The main one being the ability to move a window from one workspace to another. I did some initial testing and things looked to still be working as intended. Let me know how things go and if anything needs to be changed or tuned up.
@icarter09 I did some testing with the changes from that PR. The main scenario that causes the bug I reported in this issue is fixed.
However, while testing that PR I found another scenario which triggers the same bug. It happens independent of the changes in that PR. When the "Show windows from all workspaces" is enabled and when I try to use the hover area of the grouped window list to close a window that is in a different workspace than the one I am currently viewing, then the same bug happens. In that case it doesn't matter if that window in the other workspace is minimized. Should I create a separate issue for that scenario? Or should we try to fix both scenarios with this issue?
@mattvalley was this new scenario present before the fix was applied?
@icarter09 Yes, the other scenario that triggers the same overall bug is present before the fix from that PR is applied. It is also still present after the fix is applied.
@mattvalley thanks for testing that out. Since that is the case, I'm thinking that you should create a new ticket. That will allow us to comment/troubleshoot directly on that issue and others can chime in as well given the ticket name/label will be more specific to the new issue.