Change:
resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.5.0-beta.9.tgz#d4a9536cf586f78a54527751e03abf6445613886" integrity sha512-AMyFctHbIWx0aLcACINuZqFFNoz4ndGtIAb4pQguIl9t8r+2otiV11MY4FJmPM0kUzEzoLWzVFJaGxOzykCWuw== <del> xterm-addon-image@0.6.0-beta.1: version "0.6.0-beta.1" resolved "https://registry.yarnpkg.com/xterm-addon-image/-/xterm-addon-image-0.6.0-beta.1.tgz#058c171a4866f1cde7608e3b00050476b55ece4c" integrity sha512-vLxUEo/KAsEaRhMshJ4uxnfc/Si8YfT3kilaK5WuiJflVODzQjytzZrl2iLeZaWKiqQp0NR6AEhuXlYASK675A== </del> <ins> xterm-addon-image@0.6.0-beta.2: version "0.6.0-beta.2" resolved "https://registry.yarnpkg.com/xterm-addon-image/-/xterm-addon-image-0.6.0-beta.2.tgz#04c5ea11c89032b01b577b37f891109168ed0b09" integrity sha512-58d1mqIpJwq8Zy/a/QM8JVuA1g5SceG8UvLoj9T6r+2XIktka6GK2oS66Fmo+0MP0s0HDPy+yJtl8lHY6UyzHw== </ins> <del> xterm-addon-search@0.13.0-beta.7: version "0.13.0-beta.7" resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.13.0-beta.7.tgz#2f9bf9d8380c4c40f021c47dc583aa32bea8796e" integrity sha512-Dnuws0ThaqzxRDo8TjkSb5WlMYycONVDSr/irx2pk2I4vC5RuSpOifmD46ALlryNSDkMasjfCLjHPILHsFDCfw== </del> <ins> xterm-addon-search@0.13.0-beta.8: version "0.13.0-beta.8" resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.13.0-beta.8.tgz#90bc70bff87cd7e4f540cce51d9f968f04d5c0ef" integrity sha512-Hlocg6gGvKAs4eRTW78wTtVqaOEurweJjdyPDjr7KrzwlEEsASsUXJaB2+vgsyTFKuYnCuLrp5u369jck993GQ== </ins> xterm-addon-unicode11@0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0.tgz#41c0d96acc1e3bb6c6596eee64e163b6bca74be7" integrity sha512-Jm4/g4QiTxiKiTbYICQgC791ubhIZyoIwxAIgOW8z8HWFNY+lwk+dwaKEaEeGBfM48Vk8fklsUW9u/PlenYEBg== <del> xterm-addon-webgl@0.16.0-beta.13: version "0.16.0-beta.13" resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.16.0-beta.13.tgz#ffacd22b8d86ca7f9ba903a64bc85654523955fb" integrity sha512-1avJBoAKl+0dOjRK0pvu2im6gaXyP/6oJcEBQXCTz3V8YlgcG/jom8A6FEQSEDGZ/4dnyDvnLbsg3+aLZIr6gw== </del> <ins> xterm-addon-webgl@0.16.0-beta.14: version "0.16.0-beta.14" resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.16.0-beta.14.tgz#de5bf6c97e31f62d13907a875ffc6be154bc4a02" integrity sha512-cj+rQWqOeZYJ6JMjMuTTKu3OnP+1D+sqSZPuwZAd6s4NkY4dFXFQlKxJ2yvDHOU/jrgpIYR1c3Cnu0AOWZpS3w== </ins> <del> xterm@5.3.0-beta.39: version "5.3.0-beta.39" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.3.0-beta.39.tgz#b64da3fd1b374fd535db61294a49c16453dbb77e" integrity sha512-Z1r0ijTgad5MjFoz8qZ+2Qc3bgjG6kYY/kZI3DTA1pibArHeOMDYk9+IeCb9adF74zvZurjytRfXKJgX6M9hwg== </del> <ins> xterm@5.3.0-beta.42: version "5.3.0-beta.42" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.3.0-beta.42.tgz#f0806ebe9b033530c54ac5b03955827fb729c38f" integrity sha512-3OLXTfwtSy9UKo8Uzm3/kd7qBg0JD/qFpotg8iKJ2aB9zx0fkJnysl4aIuNleUJzgvuxzBUHkcRZUmEw1XCKdw== </ins>

Discussion:
Type: <bBug</bGPU Acceleration for terminals to "off" in settings a terminal the terminal the left terminal (the right terminal doesn't seem to have this issue) crashes VS Code version: Code - Insiders 1.82.0-insider (, 2023-08-04T05:35:09.023Z) OS version: WindowsNT x64 10.0. Modes: Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2 <details<summarySystem Info</summary </details<details<summaryExtensions (19)</summaryExtensionVersion ------ systemd-unit-file1.0.6 codespaces1.14.14 jupyter-keymap1.1.2 remote-containers0.305.0 remote-wsl0.81.0 nagios1.1.0 vim1.25.2 vscode-language-jsonata0.4.0 vscode-eslint2.4.2 gitlens14.2.0 prettier-vscode10.1.0 python2023.14.0 vscode-pylance2023.8.10 matchit2.0.1 ansible2.6.92 vscode-yaml1.14.0 jinjahtml0.20.0 svant-all-autocomplete0.0.6 svant-vscode-fzf0.0.3 </details<!-- generated by issue reporter --
Repros on Windows sometimes when killing a terminal: ! Assigning for help since we shouldn't be able to crash from the browser so this must be a Chromium/Electron/node-pty bug. Probably related to the new Electron update?
Crash dump:
Following findings are from the runtime side, <details<summaryStacktrace</summary</details1) Crash is triggered when triggers a layout via property from and when resolving the css rules for element 2) The stack trace was obtained from a DCHECK build which shows that was attempting to work with a invalid ruleset in 3) From the repro case I thought this happened when the active style sheets were not updated when the left terminal was destroyed after the layout was triggered similar to , but the stack shows that there is call to which actually signals . 4) Looking at class, is a strong and given the contents object has not been garbage collected then it could only mean that there was a call to without a matching before the loop was started.

5) I thought creating a minimal repro would shed more light, but interestingly the same steps do not crash when running in codespaces terminal on both Chromium 114 and Chromium 115 browsers. However, the crash still happens when running VSCode desktop with Electron nightly based on Chromium 117. So at this point, it is either that a patch in Electron is messing with the style engine or codespaces terminal behaves differently from the desktop terminal in terms of layout. I was able to confirm there are no patches to the style engine in Electron. 6) I have the following fix to which avoids using invalid rulesets and it confirms to avoid the crash. 7) I would need to create a minimal repro outside VSCode desktop using so that we can revive which was closed due to lack of repro. I am not familiar with how terminals are setup on VSCode side, will work with to create the repro case for browsers.
I tried to bisect the runtime changes and surprisingly found that issue repros even when using Electron 22 shipped in our with main branch, so hinted to a problematic bump. Bisect in vscode revealed it to be change and further bisecting in points to Particularly, the following destruction calls of when the screen element is destroyed messes up the loop in . I think we should be able to create a minimal repro with this context.
There are two workarounds until the crash is resolved, either use the since CSP issue is not a problem for VSCode desktop or move to a shadow DOM, that way the style sheets can be hosted on which will then automatically get disposed when the terminal element is destroyed. I feel fallback is the easier workaround of the two, will leave it to you
Upstream issue filed at
The crash is worked around when we update to bring in
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!