linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.5k stars 732 forks source link

Grouped Window List - Zombies stay alive after being closed #8856

Open Pandiora opened 5 years ago

Pandiora commented 5 years ago
 * Cinnamon version 4.2.4
 * Manjaro 18.0.4
 * AMD 3500U - amdgpu
 * 64 bit
* .xsession-errors gets spammed with these several seconds:
(cinnamon:1285): Cjs-CRITICAL **: 04:03:42.158: JS ERROR: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data @ /usr/share/cinnamon/js/misc/fileUtils.js line 210 > Function:299
 * syslog - there is none

Issue When a process gets killed or closed from the thumbnail, sometimes the app either keeps alive or the app icon stays active in the taskbar. (not pinned)

Steps to reproduce 1.) open any application 2.) kill the application with process manager 3.) Profit

Expected behaviour Apps which get killed or closed by thumbnail should not stay in the taskbar, except when they're pinned. The zombie windows can only be removed by restarting cinnamon and this problem occurs since icingtaskmanager moved to grouped window list. I can't exactly remember how to reproduce but if I close the last window of an application like i.e. a steam chat window and I just started Steam in silent mode before, the app icon also stays in the taskbar and only the label is visible when hovered.

P.S.: If one tries to close the window by using the close-button on the thumbnail (which actually just consists of label and no thumbnail), u will eventually get asked to force quit the process. Which obviously doesn't work, since the process doesn't exist anymore.

Other information Ha Ha Ha, staying aliiive

kacperpaczos commented 5 years ago

I can't reproduce this bug. Did you can record this issue with OBS Studio, upload on YT or make gif and show us?

EDIT: System: Host: zero Kernel: 5.0.0-27-generic x86_64 bits: 64 compiler: gcc v: 7.4.0 Desktop: Cinnamon 4.2.4 wm: muffin dm: LightDM Distro: Linux Mint 19.2 Tina base: Ubuntu 18.04 bionic Machine: Type: Laptop System: LENOVO product: 81BR v: Lenovo ideapad 720S-13ARR serial: Chassis: type: 10 v: Lenovo ideapad 720S-13ARR serial: Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN serial: UEFI: LENOVO v: 6KCN30WW date: 07/04/2018 CPU:
Topology: Quad Core model: AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx bits: 64 type: MT MCP arch: Zen L2 cache: 2048 KiB flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 35133 Speed: 2645 MHz min/max: 1600/2200 MHz Core speeds (MHz): 1: 1456 2: 1425 3: 1562 4: 1438 5: 1434 6: 1547 7: 1558 8: 1515 Graphics: Device-1: AMD Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] vendor: Lenovo driver: amdgpu v: kernel bus ID: 03:00.0 chip ID: 1002:15dd Display: x11 server: X.Org 1.19.6 driver: amdgpu,ati unloaded: fbdev,modesetting,radeon,vesa resolution: 1920x1080~60Hz OpenGL: renderer: AMD RAVEN (DRM 3.27.0 5.0.0-27-generic LLVM 8.0.0) v: 4.5 Mesa 19.0.8 direct render: Yes

Pandiora commented 5 years ago

@pyroxar which program did you used to test with? I can vaguely remember it was not only Steam that didn't behaved correctly.

The easiest way to reproduce for me, is to use Steam Remote Play, kill the streaming-client process and wait until the window closes - App-Icon stays in taskbar.

Another way to test: Open steam in silent-mode (/usr/bin/steam -silent %U), use another account to send a text message to the silently running steam account. Close the Chat-Window from Thumbnail. Steam will get forced-quit and the App-Icon stays there.

I could fill my taskbar with the same icons if I do this multiple times.

If these both cases aren't reproducable for you, I will test further.

Sh33n commented 5 years ago

Hello there,

It's been a while I'm having the same issue and it's the first time I found someone who post about it.

I'm running Arch since years, and I agree with Pandiora, the problem exists since Icingtaskmanager moved to cinnamon grouped window list.

After using my computer for a while, I have many zombies tiles of closed programs in my taskbar, and the only way to remove them is to restart Cinnamon. If I try to close the zombies tiles (with the cross of the preview window), popup appear asking me to force close the app or wait, if I force close nothing is happening because there is nothing to close.

English is not my first language and it's quite hard to describe the issue better than Pandiora, maybe a screenshot can help, those 3 vlc are zombies : https://i.postimg.cc/B6t0MDSV/cinnamon.png

I can have the issue with Nemo, Steam, VLC, Looking-glass and some others apps, but I don't know how to reproduce the bug, it just happens sometimes but I don't know why.

If I can help you to debug this please tell me what you need, I'm not a developer and maybe I'll need detailed explaination.


Linux Archlinux 4.19.71-1-lts #1 SMP Fri Sep 6 16:20:05 CEST 2019 x86_64 GNU/Linux CPU : Ryzen 1700 GPU : Amd Radeon RX 560 Series (POLARIS11, DRM 3.27.0, 4.19.71-1-lts, LLVM 8.0.1), Driver : 4.5 (Compatibility Profile) Mesa 19.1.6 Cinnamon : 4.2.4-1

Pandiora commented 5 years ago

@Sh33n it's the exact same for me like shown in your screenshot and I'm glad I'm not the only one who noticed it, since I assumed I made some mistakes by installing Arch via Manjaro Architect, to get the newest kernel. (otherwise LDM refuses to work with such new CPU)

It seems like we have to dig deeper, but at least with Steam it should be easy to reproduce this behaviour. When I have more time I'm trying to debug, if no one else feels to fix this (I'm assuming) regression.

P.S.: I think this issue already exists for months for me too. BTW, @pyroxar uses Mint, me and @Sh33n are using Arch, so this problem might be Arch specific.

Sh33n commented 5 years ago

Yeah I guess the problem is Arch specific and it exists since icing task manager has been discontinued. I don't think you've made mistake installing your OS, I have the same issue with a baremetal Arch.

I'm using a filesystem snapshot system (btrfs + timeshift), but I was stupid enough to delete old snapshots still using icingtaskmanager else I would have rollback, too bad for me.

This problem is not critical, but is still very annoying.

Pandiora commented 5 years ago

We could go back to icingtaskmanager then. Just change version and hope the api-calls are still working. :smile: Well, it is frustrating over time and those are not the only annoying bugs that stay for ages or need to be worked around manually. However I'm trying to debug it later and fix some other log-spam. (like the one mentioned in this issue, which could be caused by another applet) Going back to ITM shouldn't be an option and actually doesn't fix anything nor helps others.

Sh33n commented 5 years ago

I can't add anymore Icing task manager in my applet panel, it say "not compatible with my cinnamon version". If I accept the warning and force it, it just don't load, I had already tried this some months ago.

Pandiora commented 5 years ago

I know of this problem and it can be fixed quite easily by adjusting the compatible versions in the manifest file of the applet (afair), but this shouldn't be the way to go. With newer cinnamon versions the applets had to use different APIs which rendered some if not all applets, that didn't got updated for a while, useless. (even if you adjusted the versions)

Don't use ITM, even if it works temporarily, you'll have bugs and problems later on, especially with Arch. I'm trying to debug this now.

Sh33n commented 5 years ago

Thanks for the warning, It's been a while I'm having the issue I think I can wait a little bit more ;)

Pandiora commented 5 years ago

Okay, little update, I think I might have found the cause for this problem and you could test it @Sh33n. I'm using a second steam account to write a message to my first account. When I close the thumbnail without opening the window first, the window (without thumbnail) stays on the taskbar. But when I open the chat-window first and then exit through thumbnail it works. Steam is very specific in this case, since the thumbnail doesn't gets correctly loaded/displayed until I open the chat-window.

I can't reproduce this behaviour with VLC nor Nemo easily.

I'm pretty sure, this error describes the cause of this issue:

(cinnamon:12685): Cjs-CRITICAL **: 19:15:04.008: Object St.Bin (0x55cc3f0cefc0), 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 0x55cc3e1d84b0 ==
#0 0x55cc3ec02790 i   /usr/share/cinnamon/js/ui/environment.js:42 (0x7f9be0186d58 @ 38)
#1 0x55cc3ec026c0 i   /usr/share/cinnamon/js/misc/fileUtils.js line 210 > Function:35 (0x7f9b505bd6f8 @ 439)
#2 0x55cc3ec02628 i   /usr/share/cinnamon/js/misc/fileUtils.js line 210 > Function:9 (0x7f9b505bd670 @ 26)
#3 0x55cc3ec02518 i   /usr/share/cinnamon/js/misc/fileUtils.js line 210 > Function:333 (0x7f9b505b42b8 @ 609)
#4 0x55cc3ec02478 i   /usr/share/cinnamon/js/misc/fileUtils.js line 210 > Function:295 (0x7f9b505b4230 @ 251)
#5 0x55cc3ec023e8 i   /usr/share/cinnamon/js/misc/fileUtils.js line 210 > Function:804 (0x7f9b505b7918 @ 32)
#6 0x7fffd6969490 b   self-hosted:916 (0x7f9be01e6670 @ 367)
#7 0x55cc3ec02368 i   /usr/share/cinnamon/js/ui/environment.js:118 (0x7f9be01b1450 @ 38)
#8 0x55cc3ec022e0 i   /usr/share/cinnamon/js/misc/fileUtils.js line 210 > Function:259 (0x7f9ba06e5b38 @ 69)
#9 0x7fffd696b260 b   self-hosted:918 (0x7f9be01e6670 @ 394)
#10 0x7fffd696c060 b   resource:///org/cinnamon/cjs/modules/signals.js:142 (0x7f9be01d8098 @ 386)
#11 0x55cc3ec02180 i   /usr/share/cinnamon/js/ui/statusIconDispatcher.js:60 (0x7f9ba0619780 @ 25)
#12 0x7fffd696cda0 b   self-hosted:918 (0x7f9be01e6670 @ 394)

This error needs to get catched and all attached windows removed.

Seems like this problem occured with ITM too, but got fixed by using "Only list windows from the monitor displaying this instance" (?): https://github.com/jaszhix/icingtaskmanager/issues/118

I tested this option and it doesn't help.

Like it can be seen within the image Sh33n posted, those zombie windows still seem to count as active (they got a window count on them) and this way isFavoriteApp = isFavoriteApp && (this.state.settings.groupApps || this.getWindowCount(appId) === 0); in appList.js returns 1 and doesn't destroys these windows.

This bug also happens with no thumbnails activated and without animated thumbnails.

And to add even more info, I already opened issues on IcingTaskManager depending this problem and I can't see how it got fixed: https://github.com/jaszhix/icingtaskmanager/issues/15 https://github.com/jaszhix/icingtaskmanager/issues/26

Pandiora commented 5 years ago

I added some logging to appList.js and the windowRemoved function. When I close steam chat from thumbnail it returns:

                    Meta-Win: {"_lookingGlassManaged":true,"_lgId":14,"lastTitle":"<username>"}
                    Meta-Z: 0

inside of the each functions after the workspace-check.

Right after it jumps to the function again, printing at the beginning:

    Meta-Workspace: {}
    Meta-Window: {}
    This State: <just settings>
    Is on all Workspaces: false
    Show all Workspaces Settings: true
    Removing window from Workspaces: false
    Showing on its workspace: false

It will jump to this.state.trigger('removeWindowFromAllWorkspaces', metaWindow); then. The function called is this one in applet.js, but that doesn't help much:

            removeWindowFromAllWorkspaces: (win) => {
                each(this.appLists, function(appList) {
                    appList.windowRemoved(appList.metaWorkspace, win);
                });
                this.state.removingWindowFromWorkspaces = false;
            }

I also noticed, that, when Steam gets quit through the Thumbnail the lastTitle of the Window is "Steam - Beenden" (Beenden = quit) and when the function gets called again the lastTitle is "username". Sadly Steam is very special and there's no option to just close to systray.

EDIT: The closing of Steam can be controlled and since export didn't worked for me I altered my .desktop-file for Steam inside autostart to sh -c 'STEAM_FRAME_FORCE_CLOSE=1 steam -silent %U'. This still doesn't fix the issue with the broken thumbnail and closing.

Sh33n commented 4 years ago

Hello Pandiora,

I've found a workaround mentionned by LucusWebsites on https://github.com/linuxmint/cinnamon/issues/8802#issuecomment-563919987 Just use the applet named CobiWindowsList.

After the zombie issue that nobody care, since 4.4 I have others issues, like no more options in grouped windows list to show other monitor icons on all screen.

I'm using this applet since yesterday and it works like a charm, no more zombies windows issue, all icons on all monitor, bye bye Grouped Windows List, nice to meet you CobiWindowsList, I was waiting for you.

LinuxOnTheDesktop commented 4 years ago

There is also the dock called plank which, in its current PPA version, and so far, I am finding to work well on Cinnamon (at least once the system has been restarted - I got some funny business before that). To install plank

sudo add-apt-repository ppa:ricotz/docky
sudo apt update
sudo apt install plank

Then add it to your startup applications (perhaps with a small delay). Then reboot (or log out and back in).

Two notes: (1) there are some extra plank themes available but it might be best to stick to the inbuilt ones; (2) if one gets rid of the config icon on the dock, one can still access the configuration by control-right-clicking any item on the dock.

Pandiora commented 4 years ago

Thanks to you, especially @Sh33n. Sry for late reply, I will test the applet later and report back. I somehow remember some problems with Cobi but we will see.

Edit: So far Cobi seems to work better for me and i.e. Hexchat doesn't leave zombie windows when I'm minimizing it from the taskbar by left-clicking or by minimizing the open window with a click. (when it's minimized it gets closed to systray)

Disadvantages are, that you can't set icon-padding and other styles, so I had to replace my theme. On the other hand, thats what the theme should be for and not handled by each applet on its own. It's sad once again the "system-applet" is worse than a third-party applet.

I'm calming myself here not to get started over what has happened in the background in between and how history repeats itself once again. This applet replaced another window manager ...

TerrorSquad commented 4 years ago

Hello guys, I want to report that the problem is still here and seriously needs fixing.

I'm using Linux Mint 19.3 at work each day and almost every day I have to restart cinnamon in order to solve this issue.

Linux Mint 19.3 Cinnamon Cinnamon Version 4.4.8 Kernel 5.3.0-40-generic

System Info

Pandiora commented 4 years ago

Look at how long this issue is open and no one cared. Get another window manager, chances are low they will fix this soon. Either use CobiWindowList or plank. I sticked with Cobi for now, it behaves a little bit different and it doesn't works well with most themes I want to use. But besides that, it doesn't got this bug, which exists for years now.

Cobinja commented 4 years ago

For CobiWindowList, you can always open an issue at https://github.com/Cobinja/CobiWindowList and tell me there what exactly doesn't work with which theme(s)

ozls commented 4 years ago

Manjaro 20.0.3 Cinnamon 4.6.3 Kernel 5.4

I've got this bug as well and it's really annoying me. Cinnamon would otherwise be my choice DE after much hopping around.

ghost commented 4 years ago

I've also got this issue. (It occurs with most applications) System Info

TerrorSquad commented 4 years ago

I can also still confirm it System Info

asoliadlad commented 4 years ago

I can also confirm this issue OS, Xorg etc: https://pastebin.com/qtm1mp5T

icarter09 commented 4 years ago

Cinnamon 4.6.7 Mint 20 64 bit

I wasn't able to duplicate this issue. Which could my GWL settings is diff or I wasn't testing against the right applications. Could someone provide your gwl settings file (~/.cinnamon/configs/grouped-window-list@cinnamon.org/*.json). Thanks.

aragubas commented 3 years ago

Ok, i am having the same issue and i did managed to record it

It does happens randomly here on my case so...

https://user-images.githubusercontent.com/47148297/105094091-81829880-5a82-11eb-85e6-9d970c556e1f.mp4

Here is my hardware information: https://pastebin.com/raw/R8vUpD21

aragubas commented 3 years ago

If i hit ALT + F2 and restart cinnamon it does fix it

Bewbman commented 3 years ago

This will probably go into the next LTS and STILL be an issue lol. It's very simple to reproduce and will consistently happen with normal usage. Apparently the issue is that the Mint team banned the guy who made this applet lol. Ok well put another alternative or start maintaining it?

So people realize as well you have to group common apps together, also easy fix is to go into the applet's preferences and just toggle that setting.

IzzySoft commented 3 years ago

It still is an issue on Mint 20. No Zombies from closed apps yet here, but 100% reproducible from apps minimized to tray – e.g. HexChat. Funnily not if minimized by clicking the tray icon itself – but always when using the corresponding window control. Verified with HexChat, same with KeepassXC, or with apps minimized via kdocker.

Work-Around to "clean up": open settings, toggle something (wait 10s until it takes effect), toggle back. Seeing someone recommending the Alt-F2 + r trick (restarting Cinnamon), I guess using the Hamburger menu to reload the list would work as well, will try that next time.