Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio Code starts as a blank window, and stays that way. #114459

Closed
sanket-bhalerao opened this issue Jan 16, 2021 · 62 comments
Closed

Visual Studio Code starts as a blank window, and stays that way. #114459

sanket-bhalerao opened this issue Jan 16, 2021 · 62 comments
Assignees
Labels
chromium Issues and items related to Chromium confirmed Issue has been confirmed by VS Code Team member fixed-in-electron-18 Issues fixed with Electron 18.x update insiders-released Patch has been released in VS Code Insiders mitigated Issue has workaround in place upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Milestone

Comments

@sanket-bhalerao
Copy link

sanket-bhalerao commented Jan 16, 2021

Issue Type: Bug

VSCode insiders start as a blank window and stays that way. This happened to me 2-3 times in the last couple of weeks.
When this happens there are no controls visible on the window(not even the close button), I have to uninstall VSCode altogether and reinstall a fresh download to get it working again.
Also, I am not sure if this issue is VSCode insiders build or any extensions I have installed or my Windows 10 is doing something fishy with VSCode only.
I tried to reproduce this issue by disabling/enabling all the installed extensions however I could not reproduce it so won't be able to provide a concrete set of steps.

Note: Countless thanks for the setting sync feature, I would have spent at least a couple of days trying to set all the shortcuts and the configs I have. it would have been a pretty ugly mess.

UPDATE:

workaround (as per the trailing comments if there are any additional workarounds I will add them here.)

  • use code-insiders --disable-features=CalculateNativeWinOcclusion <path to workspace/folder> to start the VSCode instance.

VS Code version: Code - Insiders 1.53.0-insider (1a6eef3, 2021-01-15T05:15:40.826Z)
OS version: Windows_NT x64 10.0.19042

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 x 1800)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.87GB (8.80GB free)
Process Argv --crash-reporter-id 340e0eb9-5b34-4206-9e2e-bd86fc3b2cf3
Screen Reader no
VM 0%
Extensions (21)
Extension Author (truncated) Version
vscode-eslint dba 2.1.14
gitlens eam 11.1.3
EditorConfig Edi 0.16.4
vscode-npm-script eg2 0.3.13
prettier-vscode esb 5.8.0
output-colorizer IBM 0.1.2
typescript-javascript-grammar ms- 0.0.55
vscode-js-profile-flame ms- 0.0.13
vscode-typescript-next ms- 4.2.20210115
vscode-typescript-tslint-plugin ms- 1.3.3
cordova-tools msj 2.1.2
debugger-for-chrome msj 4.12.11
vscode-react-native msj 1.2.0
vscode-xml red 0.14.0
vscode-yaml red 0.14.0
sonarlint-vscode Son 1.19.0
code-spell-checker str 1.10.2
vscode-stylelint sty 0.85.0
vscodeintellicode Vis 1.2.10
glean wix 5.1.1
vscode-import-cost wix 2.13.0
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
openlogontheside:30221882
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30208930
wsl2promptcf:30219163
vstry244:30244315
pythonvsdeb440:30224570
unusedpromptcf:30219165
folderexplorercf:30219167
openfilemenucf:30219169
pythonvsded773:30223139
pythonvspyt600cf:30241728
core-portspanelcf:30233468

@bpasero bpasero added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Jan 18, 2021
@bpasero
Copy link
Member

bpasero commented Jan 18, 2021

Does this only happen with insider or also stable?

@bpasero bpasero self-assigned this Jan 18, 2021
@bpasero bpasero added the info-needed Issue requires more information from poster label Jan 18, 2021
@sanket-bhalerao
Copy link
Author

i use insiders build 99.99% of the time, so can not say if it happens with a stable build or not.

@bpasero
Copy link
Member

bpasero commented Jan 20, 2021

Please try.

@sanket-bhalerao
Copy link
Author

sanket-bhalerao commented Jan 21, 2021

The condition of insider build is becoming worse, in the past couple of hours I faced this issue 5 times.

@sanket-bhalerao
Copy link
Author

sanket-bhalerao commented Jan 22, 2021

I am unable to open insiders.
Reinstall did not help this time.
I have also tried to open it with the code-insiders --disable-extension option but the result is the same.
So far I am not facing the issue with the stable build (I am using the same email to sync setting between stable and insiders builds, so the same settings and extensions are present in both instances).
This has rendered the insider's build un-usable for me.

@bpasero
Copy link
Member

bpasero commented Jan 22, 2021

Can you try to run code --disable-extensions --user-data-dir <directory> where <directory> is an empty folder? This will ensure Code is starting with a fresh data directory, e.g. no specific settings and without any extensions running.

@sanket-bhalerao
Copy link
Author

I got the same result for this as well.
image

If I open a directory with files and folder in it and I hover over the place where the file explorer/extensions icon would have been I see a tooltip for it.

@bpasero
Copy link
Member

bpasero commented Jan 22, 2021

Can you see if it still reproduces when disabling the GPU support in VSCode? You can do that by running VSCode from the command line like this: code --disable-gpu

If that helps, you can permanently configure this option via:

  • Command Palette search for "Configure Runtime Arguments"
  • Set disable-hardware-acceleration: true
  • Restart

@sanket-bhalerao
Copy link
Author

I tried with the following 2 commands however, the results in both cases are the same.

  • code-insiders --disable-extensions --disable-gpu --user-data-dir .
  • code-insiders --disable-gpu

I uninstalled the insiders build and removed the directory in which it was installed. Have not deleted the .extensions directory yet. I am using the user installer.

@bpasero
Copy link
Member

bpasero commented Jan 22, 2021

Can you run from the command line with code --verbose to see if any error output is logged?

@sanket-bhalerao
Copy link
Author

executed code-insiders --verbose --disable-extensions --disable-gpu --user-data-dir ., and code-insiders --verbose in both cases I see error like [16208:0122/135257.995:INFO:CONSOLE(25)] "%cTRACE color: #888 Error: ENOENT: no such file or directory, open 'asdf\.vscode-insiders\extensions\wallabyjs.quokka-vscode-1.0.317\package.json'", source: file:///C:/Program Files/Microsoft VS Code Insiders/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js (25) for all the extensions I have.

@bpasero
Copy link
Member

bpasero commented Jan 22, 2021

Ok, that unfortunately does not reveal much.

@sanket-bhalerao
Copy link
Author

if you want the entire log i can send over email.

@bpasero
Copy link
Member

bpasero commented Jan 22, 2021

Is there anything special with the file system not being standard? Or user accounts? Or AV software running?

@sanket-bhalerao
Copy link
Author

not really,
at least there is no change in the file system, user account, AV software in the last few months.

@deepak1556
Copy link
Contributor

Sorry for the late response, can you attach the full log for

code-insiders --verbose --disable-extensions --disable-gpu --user-data-dir <some-absolute-path>

@deepak1556 deepak1556 added the windows VS Code on Windows issues label Jan 22, 2021
@sanket-bhalerao
Copy link
Author

@bpasero @deepak1556 ,
the insiders' instance has started working again. I did the following steps.

  1. uninstall insiders
  2. remove the ~insiders/extensions
  3. restart the system
  4. download the fresh installer and install
  5. enable setting sync to get back all the settings and extensions.
    so far insiders' is running fine the blank window issue is not coming.

@bpasero bpasero closed this as completed Jan 25, 2021
@sanket-bhalerao
Copy link
Author

@bpasero i am facing this issue again.

@bpasero bpasero reopened this Jan 27, 2021
@sanket-bhalerao
Copy link
Author

@bpasero , @deepak1556

I am using this on an office laptop and not comfortable sharing the logs publically.
can you please provide an email address where I can share the logs?

@bpasero
Copy link
Member

bpasero commented Jan 27, 2021

@sanket-bhalerao you can find my mail here: in the info about me https://github.com/bpasero

@sanket-bhalerao
Copy link
Author

logs sent over mail.

@bpasero
Copy link
Member

bpasero commented Jan 27, 2021

@sanket-bhalerao thanks, I forwarded the logs to @deepak1556

At first glance I do not see something obvious, in fact the workbench seems to be perfectly functional. When this log was created, was the window empty the entire time?

@deepak1556
Copy link
Contributor

Don't see any renderer crash or exception from workbench either, except for some ENOENT from shared process when syncing extensions. @bpasero does settings sync feature try to perform extension sync even when --disable-extensions is passed ?

@sanket-bhalerao can you perform #114459 (comment) without enabling settings sync feature. Also for --user-data-dir use some absolute path other than ., also make sure the directory is writable.

@vodorok
Copy link

vodorok commented Mar 2, 2021

I've also got this issue, when starting a capture session in the Xbox Game Bar. When I start the capture the VS Code gui freezes. When closed, then reopened I get the same dark square that's referenced before. The issue disappears when ran with the --disable-features=CalculateNativeWinOcclusion. The issue also disappears when the capturing is stopped.

@zwwtj2014
Copy link

Can you see if it still reproduces when disabling the GPU support in VSCode? You can do that by running VSCode from the command line like this: code --disable-gpu

If that helps, you can permanently configure this option via:

  • Command Palette search for "Configure Runtime Arguments"
  • Set disable-hardware-acceleration: true
  • Restart

it works, thanks

@sanket-bhalerao
Copy link
Author

@bpasero hi, getting this issue again after the latest update (updated just few mins ago).

@Elias-Graf
Copy link

Elias-Graf commented Apr 7, 2021

Having the same issue on:

Linux pop-os 5.11.0-7612-generic #13~1617215757~20.10~97a8d1a-Ubuntu SMP Thu Apr 1 21:09:17 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

VS Code version:

30dcb112b46595657695d14c2cd6a37f783fbed2
x64
code-insiders --verbose:
[main 2021-04-07T10:55:31.353Z] Starting VS Code
[main 2021-04-07T10:55:31.354Z] from: /usr/share/code-insiders/resources/app
[main 2021-04-07T10:55:31.354Z] args: {
  _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  version: false,
  verbose: true,
  status: false,
  'prof-startup': false,
  'prof-v8-extensions': false,
  'disable-extensions': false,
  'disable-gpu': false,
  telemetry: false,
  debugRenderer: false,
  logExtensionHostCommunication: false,
  'skip-release-notes': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-keytar': false,
  'disable-crash-reporter': false,
  'crash-reporter-id': 'f36c4516-cce9-4302-828c-929970d3eabb',
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'do-not-sync': false,
  trace: false,
  'force-user-env': false,
  'force-disable-user-env': false,
  'open-devtools': false,
  __sandbox: false,
  'no-proxy-server': false,
  nolazy: false,
  'force-renderer-accessibility': false,
  'ignore-certificate-errors': false,
  'allow-insecure-localhost': false,
  logsPath: '/home/elias/.config/Code - Insiders/logs/20210407T125531'
}
[main 2021-04-07T10:55:31.355Z] Resolving machine identifier...
[main 2021-04-07T10:55:31.356Z] Resolved machine identifier: 92355cab41b107a04c319aa40ad56f59fb81156b1b63d02c32283baddd417a2b
[main 2021-04-07T10:55:31.360Z] Main->SharedProcess#connect
[main 2021-04-07T10:55:31.380Z] StorageMainService: creating global storage
[main 2021-04-07T10:55:31.380Z] lifecycle (main): phase changed (value: 2)
[main 2021-04-07T10:55:31.381Z] windowsManager#open
[main 2021-04-07T10:55:31.381Z] windowsManager#open pathsToOpen [
  {
    workspace: { id: '82573d819aee4b54ea5655c12a7f1e8a', uri: [m] },
    exists: true
  }
]
[main 2021-04-07T10:55:31.382Z] IPC Object URL: Registered new channel vscode:92f037ef-38f6-412c-ae47-d952ee201c42.
[main 2021-04-07T10:55:31.383Z] window#validateWindowState: validating window state on 2 display(s) { mode: 1, x: 340, y: 308, width: 1909, height: 1132 }
[main 2021-04-07T10:55:31.383Z] window#validateWindowState: multi-monitor working area { x: 0, y: 44, width: 2560, height: 1396 }
[main 2021-04-07T10:55:31.383Z] window#ctor: using window state { mode: 1, x: 340, y: 308, width: 1909, height: 1132 }
[main 2021-04-07T10:55:31.383Z] window#ctor: vscode-file:// protocol is explicitly disabled
[main 2021-04-07T10:55:31.461Z] StorageMainService: creating workspace storage (82573d819aee4b54ea5655c12a7f1e8a)
[main 2021-04-07T10:55:31.461Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 1, emptyToRestore: 0, emptyToOpen: 0)
[main 2021-04-07T10:55:31.463Z] lifecycle (main): phase changed (value: 3)
[main 2021-04-07T10:55:31.463Z] update#setState idle
[main 2021-04-07T10:55:31.464Z] resolveShellEnv(): skipped (VSCODE_CLI is set)
(node:9663) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
[main 2021-04-07T10:55:31.560Z] resolveShellEnv(): skipped (VSCODE_CLI is set)
[9663:0407/125531.567344:INFO:CONSOLE(1)] "Uncaught (in promise) ReferenceError: s is not defined", source: file:///usr/share/code-insiders/resources/app/out/bootstrap.js (1)

I may lauch vs-code using code-insiders --user-data-dir . but my configuration seems to be gone (I'm not an experienced with the workings of vs-code).

Workaround

"Fixed" by downgrading.

  1. apt-cache madison code-insiders
  2. Pick the 2. from the top, in my case 1.56.0-1617705898
  3. Downgraded using sudo apt install code-insiders=1.56.0-1617705898

@bpasero
Copy link
Member

bpasero commented Apr 7, 2021

As a workaround, deleting the Code Cache folder in the user data dir should also help.

@probert94
Copy link

probert94 commented Apr 7, 2021

I just updte my insider instance and now I get a blnak screen. Starting with --user-data-dir path/to/some/empty/dir works but ofc, I loose all my configurations.

As a workaround, deleting the Code Cache folder in the user data dir should also help.

Where is the user data dir located by default?

EDIT
Found it, it is under AppData/Roaming/Code - Insiders in my case and renaming the Code_Cache to something else solved the issue in my case

@Elias-Graf
Copy link

@bpasero I deleted one in ~/Code Cache and one in ~/.vscode-insiders/Code Cahce, still not working.

@bpasero
Copy link
Member

bpasero commented Apr 7, 2021

@Elias-Graf what do you get when you run code-insiders --open-devtools in the console?

@Elias-Graf
Copy link

@bpasero I think the same bootstrap error I had in the --verbose log.

Uncaught (in promise) ReferenceError: s is not defined
    at Object._ [as enableASARSupport] (bootstrap.js:48)
    at Object.h [as load] (bootstrap-window.js:63)

@bpasero
Copy link
Member

bpasero commented Apr 7, 2021

Yeah looking into a solution. The easiest to get out of this is to delete the Code Cache folder:

  • Windows %APPDATA%\Code - Insiders\Code Cache
  • macOS $HOME/Library/Application Support/Code - Insiders/Code Cache
  • Linux $HOME/.config/Code - Insiders/Code Cache

@Rc-Cookie
Copy link

As a workaround, deleting the Code Cache folder in the user data dir should also help.

Didn't work for me

@gjsjohnmurray
Copy link
Contributor

@Rc-Cookie have you updated to 1.55.1 yet?

@Rc-Cookie
Copy link

No, didn't know about the update

@isidorn
Copy link
Contributor

isidorn commented May 10, 2021

Seems like this is happening again more details #123315
@avenmore thanks for linking the issue

@deepak1556 might it be that the new electron also does not have a fix for this.

@microsoft microsoft unlocked this conversation May 10, 2021
@github-actions github-actions bot locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
chromium Issues and items related to Chromium confirmed Issue has been confirmed by VS Code Team member fixed-in-electron-18 Issues fixed with Electron 18.x update insiders-released Patch has been released in VS Code Insiders mitigated Issue has workaround in place upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Projects
Archived in project
Electron Integration
  
✔️ Done / Deferred
Development

No branches or pull requests

17 participants