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

Additional windows doesn't react (File -> New Window) #128903

Closed
kolbma opened this issue Jul 17, 2021 · 15 comments
Closed

Additional windows doesn't react (File -> New Window) #128903

kolbma opened this issue Jul 17, 2021 · 15 comments
Assignees
Labels
info-needed Issue requires more information from poster linux Issues with VS Code on Linux

Comments

@kolbma
Copy link

kolbma commented Jul 17, 2021

Issue Type: Bug

Hello,

there has been introduced a bug with version 1.58.0 (still available in 1.58.2) in handling multiple open vscode windows.

I try to open a new window from the current one via main menu.

The window opens, but it stays completely empty.
It seems it doesn't react to keyboard short cuts and also not handling menu events. So I can show the main menu, and also open the main menu, but e.g. clicking "Open a file" doesn't show the dialog. Also "Help -> About" doesn't show a dialog. Pressing the short cut keys also doesn't show any reaction.

Closing the vs code window works only with window manager Alt+F4 and not the main menu.

If I start a new vs code instance there doesn't seem to be a problem with the additional window. So the problem is only when opening a new window from an existing one with the File menu -> New Window.

Edit:

The source of the problem seems to be the existing (old) window. I've just tried to open a different workspace in the new vscode instance, and then the window of the new instance becomes empty, although it showed already a workspace after opening.
Closing the 1st window and starting 2 fresh vscode instances the windows work. But I had this empty window behavior already multiple times. Not sure how to reproduce it always.

VS Code version: Code 1.58.2 (c3f1263, 2021-07-14T22:30:16.440Z)
OS version: Linux x64 5.3.18-lp152.81-default
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Pentium(R) CPU N3700 @ 1.60GHz (4 x 2245)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 7.62GB (1.39GB free)
Process Argv --unity-launch
Screen Reader no
VM 0%
DESKTOP_SESSION xfce
XDG_CURRENT_DESKTOP XFCE
XDG_SESSION_DESKTOP xfce
XDG_SESSION_TYPE x11
Extensions (6)
Extension Author (truncated) Version
better-toml bun 0.3.2
EditorConfig Edi 0.16.4
vscode-todo-plus fab 4.18.4
rust-analyzer mat 0.2.670
crates ser 0.5.9
vscode-lldb vad 1.6.5
@kolbma
Copy link
Author

kolbma commented Jul 17, 2021

@karabaja4
Copy link

I can confirm this bug on my system as well:
Visual Studio code 1.58.2 (c3f1263)
Arch Linux
kernel 5.10.50-lts
nvidia 465.31

@deepak1556
Copy link
Collaborator

Can you launch with code --verbose, perform the steps in #128903 (comment) and attach the log that is printed to the console. Thanks!

@deepak1556 deepak1556 added linux Issues with VS Code on Linux info-needed Issue requires more information from poster labels Jul 19, 2021
@karabaja4
Copy link

I will try and run vscode with --verbose, but the bug is very hard to reproduce. It seems to happen under very specific circumstances and after vscode has been running for a while. If I restart it it behaves normally again.

@mmahdigh
Copy link

I can confirm that this also happens on Windows 10.

@kolbma
Copy link
Author

kolbma commented Jul 20, 2021

Do you all have seen this problem also when using vscode with a remote vscode-server like in a Docker container?

I run it the whole day in verbose and it has not occurred a single time.
So two possibilities, it is a race condition which would be relaxed with verbose logging, or it has to do with the remote dev container I've used today. But I've also opened local workplaces in the new windows.
But nevertheless I'll switch tomorrow back to full local and I'll see if there are some log lines to report.

@deepak1556
Copy link
Collaborator

@mmahdigh are you running from a symlink path ?

@kolbma
Copy link
Author

kolbma commented Jul 21, 2021

[15281:0721/094954.421312:INFO:CONSOLE(627)] "%cTRACE color: #888 [File Watcher (chokidar)]  >> normalized  [ADDED] /home/makolb/Source/Repos/rsudoku-rest/target/debug/.fingerprint/rsudoku-rest-7dbfabbbb4e82f1f/dep-bin-rsudoku-rest", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[15281:0721/095011.130729:INFO:CONSOLE(627)] "%cTRACE color: #888 CommandService#executeCommand setContext", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[main 2021-07-21T07:50:11.148Z] menubarService#updateMenubar 5
[15281:0721/095011.982458:INFO:CONSOLE(627)] "%cTRACE color: #888 Layout#layout, height: 846, width: 1590", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[main 2021-07-21T07:50:13.803Z] menubar#runActionInRenderer { type: 'commandId', commandId: 'workbench.action.newWindow' }
[15281:0721/095013.818495:INFO:CONSOLE(627)] "%cTRACE color: #888 CommandService#executeCommand workbench.action.newWindow", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[main 2021-07-21T07:50:13.824Z] windowsManager#open
[main 2021-07-21T07:50:13.825Z] windowsManager#open pathsToOpen [ [Object: null prototype] {} ]
[main 2021-07-21T07:50:13.829Z] IPC Object URL: Registered new channel vscode:61b8e5a2-b88a-408d-9cb5-2aa95fa571cf.
[main 2021-07-21T07:50:13.831Z] window#validateWindowState: validating window state on 1 display(s) {
  width: 1024,
  height: 768,
  mode: 1,
  x: 312,
  y: 93,
  hasDefaultState: true
}
[main 2021-07-21T07:50:13.831Z] window#validateWindowState: 1 monitor working area { x: 0, y: 0, width: 1589, height: 870 }
[main 2021-07-21T07:50:13.832Z] window#ctor: using window state {
  width: 1024,
  height: 768,
  mode: 1,
  x: 312,
  y: 93,
  hasDefaultState: true
}
[main 2021-07-21T07:50:13.833Z] window: using vscode-file:// protocol and V8 cache options: bypassHeatCheck
[main 2021-07-21T07:50:14.084Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 0, emptyToRestore: 0, emptyToOpen: 1)
[15281:0721/095014.092228:INFO:CONSOLE(627)] "%cTRACE color: #888 Layout#layout, height: 871, width: 1590", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (627)
[main 2021-07-21T07:50:14.481Z] resolveShellEnv(): running (macOS/Linux)
[15281:0721/095014.556881:INFO:CONSOLE(65)] "The vm module of Node.js is deprecated in the renderer process and will be removed.", source: electron/js2c/renderer_init.js (65)
[15281:0721/095014.578348:INFO:CONSOLE(6)] "Not allowed to load local resource: file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.css", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/loader.js (6)
[15281:0721/095014.588192:INFO:CONSOLE(3)] "Loading "vs/css!vs/workbench/workbench.desktop.main" failed", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/loader.js (3)
[15281:0721/095014.588330:INFO:CONSOLE(3)] "Error: Could not find file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.css or it was empty", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/loader.js (3)
[15281:0721/095014.588457:INFO:CONSOLE(3)] "Here are the modules that depend on it:", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/loader.js (3)
[15281:0721/095014.588533:INFO:CONSOLE(3)] "===anonymous1===", source: vscode-file://vscode-app/usr/share/code/resources/app/out/vs/loader.js (3)

The file from Not allowed to load local resource: file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.css and same "Error: Could not find file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.css or it was empty" exists and is not empty.
Is it related to Workspace Trust feature?

@kolbma
Copy link
Author

kolbma commented Jul 21, 2021

BTW This happens also when changing workspace in a single window.

@deepak1556
Copy link
Collaborator

Thanks for the logs, the issue is not related to workspace trust but rather the resource loading protocol is incorrect. Are you able to reliably reproduce the issue ? If so, can you try launching like code --user-data-dir /tmp/vscode-resource-check and see if the problem happens.

@Huluti
Copy link

Huluti commented Jul 22, 2021

Happens also on Windows.

@kolbma
Copy link
Author

kolbma commented Jul 23, 2021

@deepak1556 To your question in #128903 (comment) ...

Yes, when using a fresh and empty user-data-dir I can reproduce it. Reliably is a different question. It happens quite often, but I don't have the steps to reproduce it always. After some working with vscode it happens on local workplace switch or opening new windows.

The only thing I have added to the new user-data-dir are these settings in User/settings.json:

{
    "diffEditor.ignoreTrimWhitespace": false,
    "editor.accessibilitySupport": "off",
    "editor.fontFamily": "'Cascadia Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
    "editor.minimap.scale": 2,
    "editor.scrollBeyondLastLine": false,
    "explorer.autoReveal": false,
    "files.insertFinalNewline": true,
    "rust.wait_to_build": 1500,
    "rust.all_targets": false,
    "rust-client.engine": "rust-analyzer",
    "rust-client.autoStartRls": false,
    "rust-analyzer.cargo.allFeatures": true,
    "telemetry.enableCrashReporter": false,
    "telemetry.enableTelemetry": false,
    "terminal.external.linuxExec": "/usr/bin/xfce4-terminal",
    "update.enableWindowsBackgroundUpdates": false,
    "window.menuBarVisibility": "toggle",
    "workbench.editor.enablePreview": false,
    "workbench.editor.enablePreviewFromQuickOpen": false,
    "workbench.enableExperiments": false,
    "workbench.list.openMode": "doubleClick",
    "workbench.startupEditor": "none",
    "workbench.statusBar.feedback.visible": false
}

@deepak1556
Copy link
Collaborator

Thanks for testing, I was able to get a reliable repro from another report #128745 (comment) . Can you confirm if you are using the external terminal action ?

@kolbma
Copy link
Author

kolbma commented Jul 23, 2021

@deepak1556 Yes, opening an external terminal/console (Ctrl+Shift+C) and afterwards trying to open new window or changing workspace doesn't work. That reproduces it always immediately.
Great catch from @psulek !

@deepak1556
Copy link
Collaborator

The root issue has been identified, I will merge this to #128745. Please follow that issue for updates.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster linux Issues with VS Code on Linux
Projects
None yet
Development

No branches or pull requests

5 participants