microsoft / vscode

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

Always Crash #37827

Closed donaldnevermore closed 6 years ago

donaldnevermore commented 6 years ago

he VSCode is completely crashed every time I try to open it, and the CPU, memory and disk usage are extremely high. How to fix it?

Extension Author (truncated) Version
vscode-eslint dba 1.4.3
python don 0.7.0
tslint eg2 1.0.14
php-debug fel 1.11.1
php-intellisense fel 1.5.4
php-pack fel 1.0.1
code-runner for 0.8.3
beautify Hoo 1.1.1
swift Kas 0.0.3
cpptools ms- 0.14.0
vscode-icons rob 7.17.0
markdown-pdf yza 0.1.7

(1 theme extensions excluded)


Steps to Reproduce:

1.Open vscode and it crashes in 5 minutes. 2.Then you have to restart the computer.

Reproduces without extensions: Yes

bpasero commented 6 years ago

I wonder if this issue is being caused by an installed extension. Can you try to run VS Code without extensions? From the command line (NOT the integrated terminal in Code), execute: code --disable-extensions and try your steps again to see if it reproduces. If you see it is an issue with the extension, please file it against the extension repository itself.

donaldnevermore commented 6 years ago

@bpasero I updated vscode to version 1.18 and tried it without extensions, and the bug reproduced. It is NOT an issue with the extensions.

thomasdarimont commented 6 years ago

I have the same problem on ubuntu

$ code -v
1.18.0
dcee2202709a4f223185514b9275aa4229841aa7

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.10
DISTRIB_CODENAME=artful
DISTRIB_DESCRIPTION="Ubuntu 17.10"

starting vscode as root works though.

thomasdarimont commented 6 years ago

FYI a reboot fixed the problem.

donaldnevermore commented 6 years ago

@thomasdarimont It crashed even though I have done nothing, and reboot doesn't help at all on windows10.

bpasero commented 6 years ago

Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

donaldnevermore commented 6 years ago

@bpasero OK. I tried. The bug also reproduce in insider version. What should I do?

bpasero commented 6 years ago

Here is a checklist to find out more about the freeze/slow/crash

Application Data Directory for VS Code:

Application Data Directory for VS Code Insiders:

donaldnevermore commented 6 years ago

@bpasero I have finished the tests. Here are the results! True: it reproduces with extensions disabled (code --disable-extensions from the command line - NOT the integrated terminal of Code) if it does not reproduce with extensions disabled, you can stop testing and report this! False, it happened in version 1.17 and after:it was not happening in the previous stable release True: it reproduces in insiders builds (get it from here) False: there is no suspicious output when running from the command line (code --verbose) False: there is no suspicious output in the window itself (Help | Toggle Developer Tools | Console) Unknown: it reproduces on Windows, Linux and Mac True: it reproduces after deleting /User/keybindings.json and /User/settings.json (backup first! see below for paths) True: it reproduces when opening empty (code -n from the command line) True: it reproduces opening any folder True: it reproduces opening any file True: it reproduces when only having a single window open True: it reproduces by just using Code without external tools running on the same folder True: it reproduces from a workspace that is not under Git version control False: it reproduces independently if a file is opened or not after startup True: it reproduces when running with GPU disabled (code --disable-gpu) True: it reproduces when being offline True: it reproduces when disabling the file watching (set files.watcherExclude to "/": true) True: it reproduces after uninstalling and reinstalling True: it reproduces after deleting the application data directory (backup first! see below for paths) True: I have not played around with permissions or ran Code as administrator True: I am seeing a single CPU process spin high (please share the full command line arguments) True: I am seeing Code consuming lots of memory in a short time

# These are suspicious outputs when running from the command line (code --verbose) 
# and in the window itself (Help | Toggle Developer Tools | Console).
# The messy code in the window itself(Help | Toggle Developer Tools | Console) roughly means
# "The command 'XXXXX' appears multiple times in the 'Command' section".

PS C:\Users\luffy> code --verbose

[main 18:58:26] Starting VS Code in verbose mode
[main 18:58:26] from: d:\Program Files (x86)\Microsoft VS Code\resources\app
[main 18:58:26] args: { _: [],
  help: false,
  h: false,
  version: false,
  v: false,
  wait: false,
  w: false,
  diff: false,
  d: false,
  add: false,
  a: false,
  goto: false,
  g: false,
  'new-window': false,
  n: false,
  'unity-launch': false,
  'reuse-window': false,
  r: false,
  performance: false,
  p: false,
  'prof-startup': false,
  verbose: true,
  logExtensionHostCommunication: false,
  'disable-extensions': false,
  disableExtensions: false,
  'list-extensions': false,
  'show-versions': false,
  nolazy: false,
  'skip-getting-started': false,
  'sticky-quickopen': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-crash-reporter': false }
[main 18:58:26] Unable to read folders in C:\Users\luffy\AppData\Roaming\Code\Workspaces (Error: ENOENT: no such file or
 directory, scandir 'C:\Users\luffy\AppData\Roaming\Code\Workspaces').
[main 18:58:32] IPC#vscode-machineId
[main 18:58:34] IPC#vscode-workbenchLoaded
[19092:1110/185835.630:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.sor
tImports鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/app/
out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.652:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.sta
rtREPL鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/app/ou
t/vs/workbench/workbench.main.js (9)
[19092:1110/185835.653:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.bui
ldWorkspaceSymbols鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/reso
urces/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.655:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.run
tests鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/app/out
/vs/workbench/workbench.main.js (9)
[19092:1110/185835.657:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.deb
ugtests鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/app/o
ut/vs/workbench/workbench.main.js (9)
[19092:1110/185835.663:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.exe
cInTerminal鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/a
pp/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.664:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.set
Interpreter鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/a
pp/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.667:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.upd
ateSparkLibrary鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resourc
es/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.669:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.ref
actorExtractVariable鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/re
sources/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.670:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.ref
actorExtractMethod鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/reso
urces/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.671:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.vie
wTestOutput鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/a
pp/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.673:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.sel
ectAndRunTestMethod鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/res
ources/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.676:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.sel
ectAndDebugTestMethod鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/r
esources/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.677:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.sel
ectAndRunTestFile鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resou
rces/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.678:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.run
CurrentTestFile鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resourc
es/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.679:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.run
FailedTests鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/a
pp/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.680:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.exe
cSelectionInTerminal鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/re
sources/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.681:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.exe
cSelectionInDjangoShell鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code
/resources/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.682:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥渏upyter.ru
nSelectionLine鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resource
s/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.683:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥渏upyter.ex
ecCurrentCell鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resources
/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.684:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥渏upyter.ex
ecCurrentCellAndAdvance鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code
/resources/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.686:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥渏upyter.go
tToPreviousCell鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resourc
es/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.697:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥渏upyter.go
tToNextCell鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/a
pp/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.698:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-python.python-0.8.0]: 鍛戒护鈥減ython.goT
oPythonObject鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/resources
/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.701:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-vscode.cpptools-0.14.2]: 鍛戒护鈥渨orkben
ch.action.gotoSymbol鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Code/re
sources/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185835.703:INFO:CONSOLE(9)] "[C:\Users\luffy\.vscode\extensions\ms-vscode.cpptools-0.14.2]: 鍛戒护鈥渨orkben
ch.action.showAllSymbols鈥濆娆″嚭鐜板湪鈥滃懡浠も€濋儴鍒嗐€?, source: file:///D:/Program Files (x86)/Microsoft VS Cod
e/resources/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185836.058:INFO:CONSOLE(9)] "Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",
 source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185836.058:INFO:CONSOLE(9)] "Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",
 source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185836.060:INFO:CONSOLE(9)] "Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",
 source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185836.060:INFO:CONSOLE(9)] "Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",
 source: file:///D:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js (9)
[19092:1110/185836.595:VERBOSE1:CONSOLE(8479)] "Main._createAppUI: 84.800048828125ms", source: chrome-devtools://devtool
s/bundled/inspector.js (8479)
[19092:1110/185836.686:VERBOSE1:CONSOLE(8484)] "Main._showAppUI: 85.387939453125ms", source: chrome-devtools://devtools/
bundled/inspector.js (8484)
[19092:1110/185837.004:VERBOSE1:CONSOLE(8485)] "Main._initializeTarget: 22.533203125ms", source: chrome-devtools://devto
ols/bundled/inspector.js (8485)
[19092:1110/185841.765:INFO:CONSOLE(9)] "%c[Extension Host] %cvscode-icons is active! %c(at activate (C:\Users\luffy\.vs
code\extensions\robertohuertasm.vscode-icons-7.17.0\out\src\index.js:40:13))", source: file:///D:/Program Files (x86)/Mi
crosoft VS Code/resources/app/out/vs/workbench/workbench.main.js (9)
[main 18:59:25] Lifecycle#window-before-close 1
[main 18:59:25] Lifecycle#unload() 1
[main 18:59:26] Lifecycle#window-before-close 1
[19092:1110/185926.062:INFO:CONSOLE(9)] "%c[Extension Host] %cdeactivating extension %c(at Object.deactivate (C:\Users\l
uffy\.vscode\extensions\ms-vscode.cpptools-0.14.2\out\src\LanguageServer\extension.js:283:13))", source: file:///D:/Prog
ram Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js (9)
[main 18:59:26] Lifecycle#window-close 1
[main 18:59:26] Lifecycle#window-all-closed
[main 18:59:26] Lifecycle#before-quit
[main 18:59:26] App#will-quit: disposing resources
tangorboyz commented 6 years ago

It's randomly occur on my ubuntu 16.04. And I always loose the chance to see which process that cause it, as vscode cause the system to unresponsive, so I have to force shutdown.

bpasero commented 6 years ago

Does it reproduce if you disable git? Set "git.enabled": false

donaldnevermore commented 6 years ago

@bpasero It's a little bit strange. I found my git missing because of its update failure, so I reinstalled git and vscode-insider, and the bug disappeared.

bpasero commented 6 years ago

@William-Python-King how about Code stable version?

donaldnevermore commented 6 years ago

@bpasero

bpasero commented 6 years ago

@William-Python-King ok I think in 1.19 we took the auto detection of Git out but we will add it back it seems.

@joaomoreno moving to you

donaldnevermore commented 6 years ago

nice! I'm glad to see that.

joaomoreno commented 6 years ago

I'm happy you could find the source of the problem. Closing this.