microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.77k stars 28.73k forks source link

frozen terminal after "windows reload" or main terminal process exits #203679

Closed DasBossGit closed 7 months ago

DasBossGit commented 7 months ago

Type: Bug

I'm having a strange problem lately - whenever I try to reload the VS Code Window, or if I exit the main terminal process (the one that opens at the start of VS Code), the whole Terminal functionality freezes. "Freezing" in no new terminal processes can be created (just shows an empty title and caret at line start), existing terminals seem to have a broken pipe to VS Code (no I/O from the process to VS Code), and the Pty Host also throws a heartbeat error. After that occurs, no matter what I try, reloading the window again, killing the background processes in an attempt to let VS Code recreate them, or launching new terminals will not bring back the terminal; it's just stuck in that state until I completely close the VS Code process tree and start it again.

I've tried VS Code and VS Code Insiders, both with existing and new Profiles, both with my extensions on and all turned off. I also tried both as admin and without, and I tried the User and System Install of VS Code. I also cleaned all and every file (Program Files, AppData, and AppData Roaming, and all Registry Entries [with the help of Revo Uninstaller Pro]). In addition, since I have installed PowerShell 7, I tried setting VS Code's default terminal profile to "Command Prompt", but that did not help either. Also, I did the whole clean reinstall process with PowerShell 7.

Expected Behavior: The terminal restarts and/or starts up when the window gets reloaded or the main terminal process gets closed/killed.

Actual Behavior: Upon encountering those events, the terminal freezes and is 100% unresponsive and cannot seemingly communicate with the VS Code Process until the entire process tree is closed and VS Code is started again. Untitled-1-Texty-UI-VisualStudioCode-Insiders2024-01-2912-02-44-ezgif com-optimize

VS Code version: Code - Insiders 1.86.0-insider (9621add46007f7a1ab37d1fce9bcdcecca62aeb0, 2023-12-20T05:36:57.756Z) OS version: Windows_NT x64 10.0.26040 Modes:

System Info |Item|Value| |---|---| |CPUs|12th Gen Intel(R) Core(TM) i9-12900K (24 x 3187)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|127.77GB (101.85GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions (140) Extension|Author (truncated)|Version ---|---|--- pledge|0xe|0.0.2 svelte-bundle|1Yi|1.0.0 find-and-replace-in-selected-files|Aar|1.0.0 vscode-file-peek|abi|1.0.1 string-converter|ada|0.1.2 js-unicode-preview|adp|1.1.4 base64utils|adr|1.2.4 Bookmarks|ale|13.4.2 separators|ale|2.5.0 inline-hasher|ale|1.1.0 statusbar-commands|anw|2.8.0 indent-jump|aPi|1.0.1 filewatcher|app|2.0.0 svelte-intellisense|ard|0.7.1 folder-indexing|ast|0.2.0 autonimate|aut|2.1.5 openmatchingfiles|bca|0.5.4 vscode-inline-spacify|ben|1.0.1 markdown-preview-github-styles|bie|2.0.3 waveform-render|bmp|0.23.0 insert-unicode|bru|0.15.1 vscode-texttoolbox|car|2.22.0 path-intellisense|chr|2.8.5 log-wrapper-for-vscode|chr|1.0.2 jsonschemautils|dag|0.1.1 unicodepalette|Dal|1.0.4 vscode-quick-select|dba|0.2.9 divider|din|2.4.1 vscode-notes|dio|1.2.1 xml|Dot|2.5.1 rust-syntax|dus|0.6.1 gitlens|eam|2024.1.2604 vscode-html-css|ecm|2.0.7 LogFileHighlighter|emi|2.17.0 vsc-material-theme-icons|equ|3.4.0 prettier-vscode|esb|10.1.0 vscode-open-in-application|fab|1.0.6 vscode-statusbar-debugger|fab|2.1.0 vscode-svelte-snippets|fiv|0.5.0 vscode-rust-config|fra|1.2.0 copilot-labs|Git|0.17.1121 vscode-pull-request-github|Git|0.79.2024012510 go|gol|0.40.3 cloudcode|goo|2.2.3 todo-tree|Gru|0.0.226 vscode-test-explorer|hbe|2.21.1 svgeditor|hen|2.9.0 create|hid|0.3.0 open-or-create|hid|0.0.7 output-colorizer|IBM|0.1.2 error-gutters|Igo|1.0.1 path-autocomplete|ion|1.25.0 reg|ion|1.1.0 text-utils|its|0.1.3 vscode-pnpm|Jac|0.0.3 latex-workshop|Jam|9.18.0 easy-icons|jam|0.3.1 better-cpp-syntax|jef|1.17.2 rust-doc-viewer|JSc|4.2.0 language-julia|jul|1.66.2 vscode-gutter-preview|kis|0.30.0 vscode-toggle-terminal|kri|0.0.5 l13-diff|L13|1.3.5 vscode-format-context-menu|lac|1.0.4 expand-region|let|0.1.4 vscode-smart-column-indenter|lmc|0.0.13 rust-flash-snippets|lor|3.1.0 hex-hover-converter|maz|1.2.2 debug-tracker-vscode|mcu|0.0.15 memory-view|mcu|0.0.25 inline-fold|moa|0.2.6 quickopener|mog|0.4.3 regexsnippets|Mon|1.0.2 theme-monokai-pro-vscode|mon|1.2.2 vscode-dotnet-runtime|ms-|2.0.1 debugpy|ms-|2023.3.13341008 python|ms-|2023.25.10221012 vscode-pylance|ms-|2024.1.101 remote-containers|ms-|0.338.0 hexeditor|ms-|1.9.12 live-server|ms-|0.5.2024010901 makefile-tools|ms-|0.9.3 powershell|ms-|2024.3.0 test-adapter-converter|ms-|0.1.9 vsliveshare|ms-|1.0.5905 mutable-ai|mut|3.1.4 memory-viewer|Nat|0.0.1 vs-qalc|nor|0.2.0 fix-json|oli|0.1.2 open-in-new-window|ona|1.1.0 last-commit|orh|1.1.0 cargo|pan|0.2.3 vscode-versionlens|pfl|1.9.2 filesync|pgm|1.0.24 svelte-autoimport|piv|1.0.4 material-icon-theme|PKi|4.33.0 command-server|pok|0.9.1 text-power-tools|qcz|1.45.0 text-utils|qux|0.1.7 svelte-preview|Raf|2.7.0 subtle-brackets|raf|3.0.0 LiveServer|rit|5.7.9 file-bunny|rob|2.2.0 vscode-text-tables|Rom|0.1.5 inline-math|Ros|0.0.11 rust-analyzer|rus|0.4.1822 partial-diff|ryu|1.4.3 text-marker|ryu|1.11.0 vscode-selection-file-path|san|1.0.1 semanticdiff|sem|0.8.8 crates|ser|0.6.6 vscode-fileutils|sle|3.10.3 vscode-zipexplorer|sle|0.3.1 comment-divider|sta|0.4.0 code-spell-checker|str|3.0.1 code-spell-checker-german|str|2.3.1 svelte-vscode|sve|108.2.1 vscode-rust-test-adapter|Swe|0.11.0 ignore|Syl|0.0.7 icons|tal|3.8.0 even-better-toml|tam|0.19.2 tauri-vscode|tau|0.2.6 latex-utilities|tec|0.4.11 linenote|tkr|1.2.1 vscode-inline-values-powershell|Tyl|0.0.7 luna-paint|Tyr|0.16.0 windows-terminal|Tyr|0.7.0 errorlens|use|3.16.0 vscode-lldb|vad|1.10.0 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.2.30 vscode-svg-previewer|vit|0.7.0 render-image-links|Wil|0.0.1 object-dumper|Yev|0.0.23 FilterText|yhi|0.0.15 vscode-git-quick-commit|yok|0.1.1 regexp-tools|YuT|0.0.2 json|Zai|2.0.2 rust-mod-generator|Zha|1.0.10 path-prompt|zhu|2.0.5
meganrogge commented 7 months ago

Can you share your settings.json file and also do a trace log while creating and killing a terminal? https://github.com/microsoft/vscode/wiki/Terminal-Issues#enabling-trace-logging /label info-needed terminal

DasBossGit commented 7 months ago

As describes, i tested multiple clean installs of VS Code, so there was no settings.json, extensions, cache or any persistent / pre-existing settings- and / or data. In the above attached example I lazily used my default setup for VS Code as i already redid all my settings, but the phenomenon is the same.

Here I have a completely new VS Code window. I waited until it was ready, created a new terminal instance and after it loaded up completely, i killed the original, thus reproducing the error. ( there may be a bit of a mess in the logs, as PowerShell loads a default profile w/ colors and all, but i also tested with a clean PowerShell 7 install and also with it completely removed and just the Windows PowerShell Desktop, but all result in the same error )

20240129T165902.zip

Tyriar commented 7 months ago

OS version: Windows_NT x64 10.0.26040

You seem to be on a canary build of Windows: https://blogs.windows.com/windows-insider/2024/01/26/announcing-windows-11-insider-preview-build-26040-canary-channel/

FYI @zadjii-msft conpty seems to be taking down our pty process of Windows 26040.

halr9000 commented 7 months ago

@Tyriar you marked this as closed. Do you or @zadjii-msft happen to know if a fix is coming to a dev channel build soon?

Tyriar commented 7 months ago

@halr9000 we're not tracking it here as it's likely a problem with a canary build of Windows. You can follow up at microsoft/terminal if needed

halr9000 commented 7 months ago

FYI if it matters, I'm on the build currently referred to as the developer build, not canary. Same issue appears there. (I do understand that the build numbers roll.)