Vscode: VS Code freezes

Created on 10 Oct 2018  ·  25Comments  ·  Source: microsoft/vscode

Issue Type: Bug

When I use VS Code it will suddenly freeze, completly unresponsive to keyboard or mouse, if I put the Code in the background by switching to a web browser or e-mail client or anything, it seems to run and what I typed on the keyboard suddenly appears. It seems that Code is listening to the keyboard and mouse, but can't display back what is going on until I put the app in the background. Sometimes the entire window will go black after a few seconds the contents are drawn again except for the code-minimap and integrated terminal. These stay black, usually until I reload the window or restart Code.

I've had these problems before, but they went away until a couple of days ago when code updated to 1.28, and now it's back with a vengance making it almost impossible to use.

This is the output from code --status, hopefully during a freeze, since it doesn't freeze when Code isn't in focus it's a bit tricky to start the --status thingy.

Version: Code 1.28.0 (431ef9da3cf88a7e164f9d33bf62695e07c6c2a9, 2018-10-05T14:58:53.203Z)
OS Version: Windows_NT x64 10.0.16299
CPUs: Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz (4 x 2904)
Memory (System): 15.83GB (9.14GB free)
VM: 0%
Screen Reader: no
Process Argv:
GPU Status: 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: unavailable_software
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
CPU % Mem MB PID Process
2 87 3952 code main
0 24 15328 utility
4 177 15856 window (Digital-Agreement-Engine-UI - Visual Studio Code)
0 73 8352 extensionHost
0 55 7644 electron_node server.js
0 38 11276 "C:\Users\s70213\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\s70213\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\css-language-features\server\dist\cssServerMain" --node-ipc --clientProcessId=8352
0 14 12456 watcherService
0 9 17920 console-window-host (Windows internal process)
0 38 13828 searchService
0 82 16036 shared-process
2 64 16280 window (Process Explorer)
1 246 16708 gpu-process
Workspace Stats:
| Window (Digital-Agreement-Engine-UI - Visual Studio Code)
| Folder (Digital-Agreement-Engine-UI): 76 files
| File types: ts(45) json(12) html(5) scss(5) js(2) md(1) gitignore(1)
| ico(1) gitkeep(1) prettierrc(1)
| Conf files: package.json(1) tsconfig.json(1) tslint.json(1)
| settings.json(1)
[18208:1010/095902.504:ERROR:browser_gpu_channel_host_factory.cc(103)] Failed to launch GPU process.

VS Code version: Code 1.28.0 (431ef9da3cf88a7e164f9d33bf62695e07c6c2a9, 2018-10-05T14:58:53.203Z)
OS version: Windows_NT x64 10.0.16299


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz (4 x 2904)|
|GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled|
|Memory (System)|15.83GB (9.28GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|

Extensions (10)

Extension|Author (truncated)|Version
---|---|---
bracket-pair-colorizer|Coe|1.0.60
gitlens|eam|8.5.6
tslint|eg2|1.0.39
prettier-vscode|esb|1.6.1
Ionide-fsharp|Ion|3.27.0
theme-karyfoundation-themes|kar|18.2.1
debugger-for-chrome|msj|4.10.2
code-spell-checker|str|1.6.10
ayu|tea|0.16.0
gitflow|vec|1.2.1

(1 theme extensions excluded)


freeze-slow-crash-leak gpu needs more info

Most helpful comment

I also started to experience freezes after upgrading to VS Code 1.29.0 yesterday.
It never happened before.

VS Code version: Code 1.29.0 (5f24c93878bd4bc645a4a17c620e2487b11005f9, 2018-11-12T07:46:32.773Z)
OS version: Windows_NT ia32 6.1.7601


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-4600M CPU @ 2.90GHz (4 x 2893)|
|GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled|
|Memory (System)|15.91GB (6.98GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|

Extensions (5)

Extension|Author (truncated)|Version
---|---|---
bracket-pair-colorizer|Coe|1.0.61
gitlens|eam|8.5.6
prettier-vscode|esb|1.7.2
debugger-for-chrome|msj|4.11.1
iis-express|war|1.1.2


All 25 comments

Can you please report a Performance issue when this happens. A performance issue (Help>Report Issue>Performance Issue) it includes more performance related information and it is readable.

Please try to narrow it down whether it is an extension and which extension it is by following this guide https://github.com/Microsoft/vscode/wiki/Performance-Issues.

This is the output from the report performance issue dialog. I did also try to start Code with the --disable-gpu flag and it seems to help. Code doesn't freeze when I run with disabled gpu.

Issue Type: Performance Issue

Details

VS Code version: Code 1.28.0 (431ef9da3cf88a7e164f9d33bf62695e07c6c2a9, 2018-10-05T14:58:53.203Z)
OS version: Windows_NT x64 10.0.16299


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz (4 x 2904)|
|GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled|
|Memory (System)|15.83GB (9.44GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|


Process Info

CPU %   Mem MB     PID  Process
    0       92   12036  code main
    0       24    5276     utility
    0       69   10500     shared-process
    0       71   10592     window (Issue Reporter)
    1      173   13660     gpu-process
    0      208   17492     window (bankid-card.component.ts - Digital-Agreement-Engine-UI - Visual Studio Code)
    0      126    5484       extensionHost
    0       39    1264         "C:\Users\s70213\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\s70213\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain" --node-ipc --clientProcessId=5484
    0       48   10488         C:\Users\s70213\.vscode\extensions\ionide.ionide-fsharp-3.27.0/bin/fsautocomplete.exe --mode http --port 8390 --hostPID=5484
    0        9   13108           console-window-host (Windows internal process)
    0      161   10580         electron_node tsserver.js 
    0       56   12856           electron_node typingsInstaller.js typesMap.js 
    0       62   16300         electron_node tslintServer.js 
    0       97   16596         electron_node server.js 
    0       38   11220       searchService
    0       11   17704       watcherService 
    0        9   17928         console-window-host (Windows internal process)



Workspace Info

|  Window (bankid-card.component.ts - Digital-Agreement-Engine-UI - Visual Studio Code)
|    Folder (Digital-Agreement-Engine-UI): 76 files
|      File types: ts(45) json(12) html(5) scss(5) js(2) gitignore(1)
|                  editorconfig(1) prettierrc(1) ico(1) gitkeep(1)
|      Conf files: package.json(1) tsconfig.json(1) tslint.json(1)
|                  settings.json(1);


Extensions (10)

Extension|Author (truncated)|Version
---|---|---
bracket-pair-colorizer|Coe|1.0.60
gitlens|eam|8.5.6
tslint|eg2|1.0.40
prettier-vscode|esb|1.6.1
Ionide-fsharp|Ion|3.27.0
theme-karyfoundation-themes|kar|18.2.1
debugger-for-chrome|msj|4.10.2
code-spell-checker|str|1.6.10
ayu|tea|0.16.0
gitflow|vec|1.2.1

(1 theme extensions excluded)


I can almost guarantee that the problem is related to gpu acceleration. I've been using code with --disable-gpu for about a week now and there has not been any problems.

We are building exploration builds that use a much newer version of Electron (our UI framework). I wonder if this issue reproduces with one of these builds, could you try? Download:

@bpasero I've used the exploration version all friday and a bit this morning and it seems to run just fine on my computer. Haven't experienced any problems.

Here is some info. Sometimes it happens way too often, sometimes it doesn't happen much. @bpasero are you able to share the schedule or timeline for exploration going to stable?

Version: 1.28.2 (system setup)
Commit: 7f3ce96ff4729c91352ae6def877e59c561f4850
Date: 2018-10-17T00:23:51.859Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64



code --status

Version:          Code 1.28.2 (7f3ce96ff4729c91352ae6def877e59c561f4850, 2018-10-17T00:23:51.859Z)
OS Version:       Windows_NT x64 10.0.17134
CPUs:             Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz (4 x 2592)
Memory (System):  15.87GB (7.88GB free)
VM:               0%
Screen Reader:    no
Process Argv:     
GPU Status:       2d_canvas:                    enabled
                  checker_imaging:              disabled_off
                  flash_3d:                     enabled
                  flash_stage3d:                enabled
                  flash_stage3d_baseline:       enabled
                  gpu_compositing:              enabled
                  multiple_raster_threads:      enabled_on
                  native_gpu_memory_buffers:    disabled_software
                  rasterization:                enabled
                  video_decode:                 enabled
                  video_encode:                 enabled
                  webgl:                        enabled
                  webgl2:                       enabled
CPU %   Mem MB     PID  Process
    0       87   11228  code main
    0      194   10364     gpu-process
   47      478   11004     window (● yayprojet - MakeupDemoMainFrame.cpp - Visual Studio Code)
    0        8   11664       winpty-process
    0       10   11672         console-window-host (Windows internal process)
    0       48   11748         C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
    0       11   11796       electron-crash-reporter
    0      147   12044       extensionHost
    0       22    6260         "C:\Program Files\Microsoft VS Code\Code.exe" "c:\Program Files\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain" --node-ipc --clientProcessId=12044
    0      164    6732         c:\Users\usermaster\.vscode\extensions\ms-vscode.cpptools-0.20.1\bin\Microsoft.VSCode.CPP.Extension.exe
    0        5     116           console-window-host (Windows internal process)
    0      102    9272           c:\Users\usermaster\.vscode\extensions\ms-vscode.cpptools-0.20.1/bin/Microsoft.VSCode.CPP.IntelliSense.Msvc.exe 6732 92
    0       11   16444           c:\Users\usermaster\.vscode\extensions\ms-vscode.cpptools-0.20.1/bin/Microsoft.VSCode.CPP.IntelliSense.Msvc.exe 6732 87
    0        9   19100           c:\Users\usermaster\.vscode\extensions\ms-vscode.cpptools-0.20.1/bin/Microsoft.VSCode.CPP.IntelliSense.Msvc.exe 6732 90
    0      171   20472           c:\Users\usermaster\.vscode\extensions\ms-vscode.cpptools-0.20.1/bin/Microsoft.VSCode.CPP.IntelliSense.Msvc.exe 6732 93
    0        9    7072         python completion.py
    0        5    2820           console-window-host (Windows internal process)
    0       12    3040           "C:\Program Files\Python27\python.exe" jedi\evaluate\compiled\subprocess\__main__.py ""
    0        5    9468             console-window-host (Windows internal process)
    0        7    7384           "C:\Program Files\Python36\python.exe" jedi\evaluate\compiled\subprocess\__main__.py ""
    0        5    4668             console-window-host (Windows internal process)
    0        0    7488               
    0       24   12212         electron_node tsserver.js 
    0       22   13832           electron_node typingsInstaller.js typesMap.js 
    0       20   13460         electron_node eslintServer.js 
    0       20   17932         "C:\Program Files\Microsoft VS Code\Code.exe" "c:\Program Files\Microsoft VS Code\resources\app\extensions\css-language-features\server\dist\cssServerMain" --node-ipc --clientProcessId=12044
    0       21   19392         "C:\Program Files\Microsoft VS Code\Code.exe" "c:\Program Files\Microsoft VS Code\resources\app\extensions\html-language-features\server\dist\htmlServerMain" --node-ipc --clientProcessId=12044
    0       16   12216       watcherService 
    0        5   12236         console-window-host (Windows internal process)
    0       24   14460       c:\Users\usermaster\.vscode\extensions\ms-vscode.cpptools-0.20.1\debugAdapters\vsdbg\bin\vsdbg.exe --interpreter=vscode
    0        6   14508         console-window-host (Windows internal process)
    0       13   18880         "c:\Users\usermaster\.vscode\extensions\ms-vscode.cpptools-0.20.1\debugAdapters\vsdbg\bin\Remote Debugger\x64\msvsmon.exe" /__dbgautolaunch 0x00000414 0x387c /hostname [anon-pipe:0000040C:00000408] /port 1 /__pseudoremote
    0      333   20244         "D:\Projects\yayprojet\test\public\wxwidget-demo\build\debug\MakeupDemo.exe"
    0       11   19604           console-window-host (Windows internal process)
    0       41   20188       "C:\Program Files\Microsoft VS Code\Code.exe" "c:\Program Files\Microsoft VS Code\resources\app\out\bootstrap-fork" ms-vscode.cppvsdbg "{\"common.vscodemachineid\":\"f9a74ceed7b04165bc0e04dac926e4616f75cdb1d57b05d95c248728991a0b5d\",\"common.vscodesessionid\":\"808f1419-d7c8-48bc-8787-6c353695f2671541167502547\"}" AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217
    0       82   11968     shared-process
    0      144   18572     window (mfedepend-cross - MFEDepend.py - Visual Studio Code)
    0        5   16796       winpty-process
    0        7    2804         console-window-host (Windows internal process)
    0       45    5468         C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
    0       39   16872       extensionHost
    0        9    7308         python completion.py
    0        7   16148           "C:\Program Files\Python36\python.exe" jedi\evaluate\compiled\subprocess\__main__.py ""
    0        5   15688             console-window-host (Windows internal process)
    0        8   18228           "C:\Program Files\Python27\python.exe" jedi\evaluate\compiled\subprocess\__main__.py ""
    0        5    2524             console-window-host (Windows internal process)
    0        5   19324           console-window-host (Windows internal process)
    0       12   16900       watcherService 
    0        5   19252         console-window-host (Windows internal process)

Workspace Stats: 
|  Window (● yayprojet - MakeupDemoMainFrame.cpp - Visual Studio Code)
|  Window (mfedepend-cross - MFEDepend.py - Visual Studio Code)
|    Folder (mfedepend-cross): 77 files
|      File types: py(20) cmake(15) xml(13) txt(6) pyc(6) md(4) rst(2) cpp(2)
|                  py~(1) css(1)
|      Conf files: cmake(15)
|    Folder (yayprojet): more than 22399 files
|      File types: hpp(15327) h(2706) cpp(810) html(661) lib(616) obj(369)
|                  png(354) js(350) dll(187) ipp(114)
|      Conf files: cmake(99) makefile(2) launch.json(1) settings.json(1)
|                  tasks.json(1)
|      Launch Configs: cppvsdbg(3)

I also started to experience freezes after upgrading to VS Code 1.29.0 yesterday.
It never happened before.

VS Code version: Code 1.29.0 (5f24c93878bd4bc645a4a17c620e2487b11005f9, 2018-11-12T07:46:32.773Z)
OS version: Windows_NT ia32 6.1.7601


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-4600M CPU @ 2.90GHz (4 x 2893)|
|GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled|
|Memory (System)|15.91GB (6.98GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|

Extensions (5)

Extension|Author (truncated)|Version
---|---|---
bracket-pair-colorizer|Coe|1.0.61
gitlens|eam|8.5.6
prettier-vscode|esb|1.7.2
debugger-for-chrome|msj|4.11.1
iis-express|war|1.1.2


Also experiencing this issue. VS Code would become irresponsive after moderate use and I have to either wait for it or kill the application.
VS Code: 1.29
OS: macOS High Sierra 10.13.3 (17D47)

Same here.
VS Code would become irresponsive (I've removed all installed extensions) when trying to close the application I am prompted with:
screenshot 2018-11-20 at 11 06 52

Version 1.29.0 (1.29.0)
5f24c93878bd4bc645a4a17c620e2487b11005f9
OS: mac OS Majave 10.14.1

I second this. It happens at least every half hour. Seems to become more frequent when multiple tabs are open.

It seems that it's more of an environment configuration issue.
Same VS Code version on 2 different machines (with the same OS version) works differently - one freezes every 30 minutes, while the second one works fluently.

same issue - update to 1.29.1 seems to have fixed it - at least for the moment. For me the freezes didn't start immediately after installing 1.29.0, so probably something related to the installation files/config/state. May be the update itself cleaned something up (don't see any direct fix in the changelog)

I will note that I upgraded to version 1.29.1, and I have small intermittent freezes everytime I save a python file and the linter runs on it. I switched to the exploratory version which has Electron 3.0.1 and it runs fine.

Running v1.30.0 on Ubuntu 16.04 with any NVIDIA driver leads to long start ups / freeze on startup. After about 5 - 10min I can use code as usual. When I start code with --disable-gpu everything is fine.

I've experienced this problem since upgrading to 1.30.2. It occurs whenever changing focus from emulator to code or whilst autosaving/hot reload.
I've downgraded to 1.29 and the issue is gone.

We are building exploration builds that use a much newer version of Electron (our UI framework). I wonder if this issue reproduces with one of these builds, could you try? Download:

No problems using the experimental 1.28 on macos 10.14, and when using default vscode 1.30.2, freezes continue

both visual code and the experimental above freeze _very_ frequently (for about 10-30 sec each time) .. this is very poor experience ..

Using windows 10 latest updates
--disable-gpu does not help
when the editor unfreezes whatever keys were entered during the freeze are 'played'

it feels like some background task is freezing the editor

same issue here,

Version: 1.30.2 (user setup)
Commit: 61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
Date: 2019-01-07T22:54:13.295Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Windows_NT x64 10.0.17134

Just a guess - yesterday my internet connection was really bad and today it is sorted and VS Code is fine ... perhaps there's some waiting for upload/download in the bg ...

Just a guess - yesterday my internet connection was really bad and today it is sorted and VS Code is fine ... perhaps there's some waiting for upload/download in the bg ...

I'm doubtful that is the case for me as at work we have a 100mbps up and 100 mbps download speeds, the issue only started after upgrading VSC and ceased when it was downgraded.

Reading some of the descriptions others have given I think it might related to project size or number of tabs.

Closing this issue given that we plan to release VSCode stable early February with Electron 3.x. If you want to benefit from the fix already, consider to use our insiders version that already contains the fix: https://code.visualstudio.com/insiders/

This still happens to me very frequently on vscode insiders
Can this issue be reopened ? otherwise should I open a new issue ? where ?

Ditto. VS Code has become unusable with the constant freezing. Tried with the --disable-gpu option but no luck. Only one tab open as well.

Version: 1.31.1
Commit: 1b8e8302e405050205e69b59abb3559592bb9e60
Date: 2019-02-12T02:19:29.629Z
Electron: 3.1.2
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 3.10.0-957.5.1.el7.x86_64

also happening to me

Version: 1.31.1
Commit: 1b8e8302e405050205e69b59abb3559592bb9e60
Date: 2019-02-12T02:19:29.629Z
Electron: 3.1.2
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.18.0-15-generic

Was this page helpful?
0 / 5 - 0 ratings