microsoft / vscode

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

The window terminated unexpectedly (reason: 'clean-exit', code: '1') #185544

Closed SunnySun1027 closed 10 months ago

SunnySun1027 commented 1 year ago

Steps to Reproduce:

  1. Run node process, like ng s -c dev
  2. Click kill Terminal button or Keyboard Shortcuts to kill the terminal

Reuslts: Vscode crashed

image
3344567 commented 1 year ago

VS Code Version: 1.79.2 Node.js: 16.20.0 OS Version: macos 10.13.6 same problem

visionXIT commented 1 year ago

Really, any solution?

foreground-voice commented 1 year ago

all VSC windows crashing after closing Terminal. Reproducing on Version: 1.79.2 Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06 Date: 2023-06-14T08:58:52.392Z (1 wk ago) Electron: 22.5.7 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Darwin x64 18.7.0

deepak1556 commented 1 year ago

Please provide the crash logs following the steps at https://github.com/microsoft/vscode/wiki/Native-Crash-Issues#creating-a-crash-report

foreground-voice commented 1 year ago

dump.zip

gary-menzel commented 1 year ago

I am having the same problem with the same VSCode version. If I run these applications in a native terminal everything behaves properly. If I issue a CTRL-C to a nodejs application of any case, the SIGINT is not even trigger and the application continues to run. But in a native terminal it gets the SIGINT and exits properly. If I just open a terminal and then close it - that is fine. It seems to be how VSCode is interacting (or not) with the launched application. I also run a WebPack instance in another integrated terminal - that has the same problem. Both never respond to a CTRL-C in the integrated terminal and issuing the KILL completely closes VSCode without warning. Yet, both work fine in a native terminal.

NOTE: if I open a terminal in VSCode and launch htop it works but then kills all of VSCode if I kill that htop terminal. So it is not just nodejs related. Exiting htop normally seems to work - just not issuing a KILL. As mentioned, nodejs does not appear to be getting the SIGINT with CTRL-C.

From the About screen:

Version: 1.79.2 (Universal) Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06 Date: 2023-06-14T08:58:52.392Z Electron: 22.5.7 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Darwin x64 17.7.0

gary-menzel commented 1 year ago

I have just dug into this even further. Each time VSCode exists it leaves detached processes running. During development this causes all sorts of problems with server ports that are left open even if you restart VSCode. I went through and removed all the child processes that were not shut down. But, for now, I won't be using the integrated terminal to run my development processes (e.g. builds and hot reloads, etc).

yulingjia commented 1 year ago

How to solve this problem

cjp-luany commented 1 year ago

My solution : go back 1.78.2 , is ok and not crash anymore.

https://code.visualstudio.com/updates/v1_78

The download line select mac universal

raval1234 commented 11 months ago

Screenshot at Nov 07 13-25-15

solve problem

deepak1556 commented 10 months ago

Closing as macOS 10.13 and 10.14 have reached EOL https://code.visualstudio.com/docs/supporting/faq#_can-i-run-vs-code-on-old-macos-versions. Can reopen if the issue is present with supported OS versions.