microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.63k stars 29.04k forks source link

Mouse flicking back and forth causing vscode to hang #146993

Open Alizter opened 2 years ago

Alizter commented 2 years ago

Does this issue occur when all extensions are disabled?: Unknown yes

Steps to Reproduce:

Reproduction case: https://github.com/microsoft/vscode/issues/146993#issuecomment-1131470956

I have no idea how to reproduce, I was clicking around in the file explorer when my mouse started flickering, including an icon on the side. it completely locked up and I had to terminate the process. When terminating it didn't respond to the kill signal, so I had to force it to close.

It seems there is a back-and-forth race condition for setting the pointer style somewhere.

Here is a GIF demonstrating the behaviour observed:

flickering_mouse

Note that the speed of the flickering was much faster, and it is due to my recording software that you cannot see it flicker fast regularly. I am in fact trying to click on different parts of the application, but as you can see no click is getting through.

ShamrockLee commented 2 years ago

My knowledge toward windom systems are little.

I guess that the magic behind the menu-on-penel-icon has something to do with some sort of preview feature or "it's this window" hint, and only works on certain combinations of window systems, window-managers and panels.

MadaraUchiha commented 2 years ago

This bug makes vscode unusable on Linux, I have to killall -9 code every hour or so. Is there a status on this?

ShamrockLee commented 2 years ago

@mrcsh @MadaraUchiha The workaround https://github.com/microsoft/vscode/issues/146993#issuecomment-1208870695 found by @morn-0 works on the Openbox window manager, which is the default WM for both Xfce and LXDE desktop environment, and can be opted in inside Gnome and KDE.

You may want to try that. It would be great for someone to try on different WMs before the issue is solved.

MadaraUchiha commented 2 years ago

@ShamrockLee the workaround is irrelevant in i3/regolith, since there's no taskbar to right click on. manipulating other tray elements does nothing.

soda92 commented 2 years ago

I've got this too on centos7. It troubles. want a fix

nobody937 commented 2 years ago

I've got this too and have some more info: it happens much more often when using laptop screen with 120 Hz refresh rate. It is rarely happens on external monitors with only 60 Hz. It helps to disable KWin compositor: Shift + Alt + F12. (Disable GPU acceleration does not help.) Disabling compositor is not a solution, just a workaround - because it breaks a lot of other things on desktop. Archlinux, KDE, laptop with dedicated Nvidia + integrated AMD GPU.

zadobudak commented 2 years ago

In my case I can fix the problem by locking the pc with super+L in KDE and then login again which fixes the issue for me. However if there is a constant fix anyone found would be very nice.

Archlinux kde EOS, dedicated Nvidia gpu + intel integrated

ShamrockLee commented 1 year ago

Interestingly, I just encountered a similar bug on SkypeForLinux when navigating the mouse pointer between the (Christmas-specific) reactions to comments.

The above workaround also applies to the Skype bug.

https://user-images.githubusercontent.com/44064051/206318420-2b4437e7-8a0f-4edf-b534-0cd7f252ceeb.mp4

ShamrockLee commented 1 year ago

The issue seems to have got mitigated on my laptop. The mouse pointer still flickers on the edge of icons, but that flickering no longer persists after moving the pointer away from such edges.

https://github.com/microsoft/vscode/assets/44064051/cf212034-b8d5-4630-a99a-df0c2be4bca6

Similar mitigation happens to Skype as well.

https://github.com/microsoft/vscode/assets/44064051/42cbb36b-5440-4e77-a29d-a6a1546c4d7e