vscode stuck on start with blue frame

I’ve got a new machine, installed Visual Studio Code but it did not start.

Problem

My Visual Studio Code just stuck on start showing a blue frame and “Visual Studio Code” – “The window is not responding” message: “You can reopen or close the window or keep waiting”, after a while:

I tried

code --verbose --log debug --disable-extensions

And found:

[704:0622/103533.849:ERROR:gpu_process_host.cc(983)] GPU process exited unexpectedly: exit_code=-1073741819

[704:0622/103533.850:WARNING:gpu_process_host.cc(1288)] The GPU process has crashed 1 time(s)

[704:0622/103538.853:ERROR:gpu_process_host.cc(983)] GPU process exited unexpectedly: exit_code=-1073741819

[704:0622/103538.853:WARNING:gpu_process_host.cc(1288)] The GPU process has crashed 2 time(s)

[704:0622/103543.835:ERROR:gpu_process_host.cc(983)] GPU process exited unexpectedly: exit_code=-1073741819

[704:0622/103543.835:WARNING:gpu_process_host.cc(1288)] The GPU process has crashed 3 time(s)

[main 2022-06-22T05:35:45.833Z] CodeWindow: detected unresponsive

So it seemed to me like some GPU-vscode conflict – Which led me to “VSCode stopped opening – The GPU process has crashed” discussion.

It turned out this Electron issue is to blame. It is recommended to avoid –no-sandbox flag as it disables application sandbox for all processes, since this issue is isolated to the gpu process –disable-gpu-sandbox should serve as an alternative.

Solution

Just run Visual Studio Code with “–disable-gpu-sandbox” parameter:

code --disable-gpu-sandbox

Note: if one instance is started this way, second instance is started the regular way

Note: it seems the issue happens with vscode versions 1.66-1.68, so workaround would be return to v 1.65

Note: since the issue is some kind of conflict between new versions of vscode and new machine’s GPU – this might happen when you upgrade a vscode or upgrade your hardware or both.

References

Leave a Reply

Your email address will not be published. Required fields are marked *