vscode: Mouse flicking back and forth causing vscode to hang

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

  • VS Code Version:
Version: 1.66.0
Commit: e18005f0f1b33c29e81d732535d8c0e47cafb0b5
Date: 2022-03-30T05:50:41.156Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Linux x64 5.4.0-107-generic
  • OS Version: Ubuntu, XFCE

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.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 18
  • Comments: 59 (4 by maintainers)

Most upvoted comments

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

Thought I’d give an update on how to reproduce this bug. Turns out you don’t even need to click anywhere. Just do the following:

  • make sure the sidebar is extended
  • hover over an icon of the sidebar
  • start moving slowly to the tip of the hover hint
  • observe

vscode-flick.mp4 Things to note in my case:

  • I could not reproduce it on zoom level 0 or below. Zoom levels 1 and 2 reproduce this bug. Try to increase the zoom level to see if it happens.
  • From this first point, weirdly enough, staying on zoom level 0 seems to remove this issue, but then it’s annoying not being able to use other zoom levels without taking that risk of freezing.
  • Disabling hardware acceleration didn’t change anything.
  • I built (yarn) and ran (./scripts/code.sh) VSCode from source and couldn’t reproduce the bug. The pointer does flick back and forth, but only when it stays still; as soon as I move it a few pixels more it stops flicking. Also, the pointer flicking doesn’t block any shortcuts unlike in this demo.

After triggering the blinking taskbar right click vscode and then mouse mouse move to the right click option to move and keep the right click does not release about a few seconds will lift the blinking

After triggering the blinking taskbar right click vscode and then mouse mouse move to the right click option to move and keep the right click does not release about a few seconds will lift the blinking

It works for me. In my case, just right click the VSCode on the taskbar and hover to the pop-up menu for a few seconds, and you will be able to calm the icon and the mouse cursor down. No neeed to hold the right-click button here.

Thought I’d give an update on how to reproduce this bug. Turns out you don’t even need to click anywhere. Just do the following:

  • make sure the sidebar is extended
  • hover over an icon of the sidebar
  • start moving slowly to the tip of the hover hint
  • observe

https://user-images.githubusercontent.com/13885008/183107718-52f0c08e-fb83-4cca-ab1d-47c99199968d.mp4

Things to note in my case:

  • I could not reproduce it on zoom level 0 or below. Zoom levels 1 and 2 reproduce this bug. Try to increase the zoom level to see if it happens.
  • From this first point, weirdly enough, staying on zoom level 0 seems to remove this issue, but then it’s annoying not being able to use other zoom levels without taking that risk of freezing.
  • Disabling hardware acceleration didn’t change anything.
  • I built (yarn) and ran (./scripts/code.sh) VSCode from source and couldn’t reproduce the bug. The pointer does flick back and forth, but only when it stays still; as soon as I move it a few pixels more it stops flicking. Also, the pointer flicking doesn’t block any shortcuts unlike in this demo.

It seems like disabling hardware acceleration solved the issue for me. To disable it, open command palette Ctrl+Shift+P, type Preferences: Configure Runtime Arguments, paste "disable-hardware-acceleration": true and restart VSCode

@deepak1556 Any progress with this? It is happening quite often for me now.

I have the same problem here on Arch Linux with KDE (X11). It happens after coding for a while, I also have no idea how, and I am forced to kill the process to reopen it again.

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

Thought I’d give an update on how to reproduce this bug. Turns out you don’t even need to click anywhere. Just do the following:

  • make sure the sidebar is extended
  • hover over an icon of the sidebar
  • start moving slowly to the tip of the hover hint
  • observe

vscode-flick.mp4 Things to note in my case:

  • I could not reproduce it on zoom level 0 or below. Zoom levels 1 and 2 reproduce this bug. Try to increase the zoom level to see if it happens.
  • From this first point, weirdly enough, staying on zoom level 0 seems to remove this issue, but then it’s annoying not being able to use other zoom levels without taking that risk of freezing.
  • Disabling hardware acceleration didn’t change anything.
  • I built (yarn) and ran (./scripts/code.sh) VSCode from source and couldn’t reproduce the bug. The pointer does flick back and forth, but only when it stays still; as soon as I move it a few pixels more it stops flicking. Also, the pointer flicking doesn’t block any shortcuts unlike in this demo.

After triggering the blinking taskbar right click vscode and then mouse mouse move to the right click option to move and keep the right click does not release about a few seconds will lift the blinking

e.g

image

https://user-images.githubusercontent.com/90960002/183557919-e01bf55a-68c3-4b5c-8c50-f26e9e0a98f4.MP4

@deepak1556 Hi any update with this? Many more users have come forward experiencing this issue.

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

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.

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

After triggering the blinking taskbar right click vscode and then mouse mouse move to the right click option to move and keep the right click does not release about a few seconds will lift the blinking

It works for me. In my case, just right click the VSCode on the taskbar and hover to the pop-up menu for a few seconds, and you will be able to calm the icon and the mouse cursor down. No neeed to hold the right-click button here.

Yes, I found it too

Same issue.

Version: 1.69.2 Commit: 3b889b090b5ad5793f524b5d1d39fda662b96a2a Date: 2022-07-18T16:14:10.636Z Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Linux x64 5.15.0-43-generic

Same problem here, even with GPU acceleration disabled. It also happens on clean install with no extensions.

My system is:

Info Value
Distro Kubuntu 22.04
Kernel Linux 5.15.0-40-generic
DE Plasma 5.24.4
Graphics Platform X11
CPU 16 × AMD Ryzen 7 4800H with Radeon Graphics
GPU AMD RENOIR / AMD Radeon RX 5500M
Memory 16 GB

I have the same problem too.

  • Archlinux
  • KDE Plasma
  • Intel CPU
  • Nvidia GPUs
  • 32RAM
  • 240 fps monitor

I have a 240 fps monitor and since it can be a visual problem, it may be because of the fps. Who has been able to reproduce it, how many fps do they have?

More info: When this bug happens it freezes all VSCode Windows. Is this because the renderer is shared across all of them?

I’m using Arch Linux / XFCE and have seen this same issue in Chrome as well (on github.com Pull Requests page). If my cursor hovers over the wrong element at the wrong time, I get the flickering that can only be stopped by killing Chrome. It has been a few weeks since the last time I’ve seen it in Chrome but I see it multiple times a day in vscode.

Using latest version of both with an up-to-date OS.

@Speykious What is your system info, I’m curious if we have any overlap?

I use Arch Linux with KDE. Here’s some more precise information just in case

Info Value
Distro Arch Linux x86_64
Kernel Linux 5.17.8-arch1-1
DE Plasma 5.24.5
WM KWin
CPU AMD Ryzen 9 5900HX with Radeon Graphics (16) @ 3.3GHz
GPU AMD ATI Radeon RX 6700/6700 XT/6750 XT / 6800M
Memory 16 GB

@deepak1556 OK I managed to reproduce it:

code  --crash-reporter-directory /home/ali/vscode/ --disable-extensions
kill -3 204427

Here is the debug dir: vscode.tar.gz

To reproduce in the UI yourself you have to click the different tabs where the extensions should be on and off in random places. After around 5min avg of clicking I get locked in.