microsoft / vscode

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

View large log file makes VSCode crash (104M) #70544

Closed sumneko closed 5 years ago

sumneko commented 5 years ago

Issue Type: Performance Issue

  1. Open a large file. (*.log)
  2. Observing the VSCode process in the task manager.
  3. The process's memory continues to grow, crashing after reaching about 4GB of memory.

After changing the file name to "*. txt", opening the file will not make VSCode crash. file_c%3A_Userssunyi.vscode_extensions_sumneko.lua.zip

VS Code version: Code 1.32.3 (a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4, 2019-03-14T23:43:35.476Z) OS version: Windows_NT x64 10.0.17134

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (8 x 3410)| |GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled| |Memory (System)|15.95GB (7.08GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 1 141 30232 code main 0 66 18336 window (问题报告程序) 0 218 43040 window (item.lua - War3-lua-map - Visual Studio Code) 0 25 2424 watcherService 0 79 81508 extensionHost 0 627 73976 c:\Users\sunyi\.vscode\extensions\sumneko.lua\server\bin\lua-language-server.exe -E -e "LANG=\"zh-cn\"" c:\Users\sunyi\.vscode\extensions\sumneko.lua\server\main.lua 0 5 18944 console-window-host (Windows internal process) 0 183 62216 gpu-process 0 67 81540 shared-process 0 1160 90692 window (source.lua - sumneko.lua - Visual Studio Code) 0 60 56496 extensionHost 0 38 90152 watcherService 0 35 97424 searchService ```
Workspace Info ``` | Window (source.lua - sumneko.lua - Visual Studio Code) | Window (item.lua - War3-lua-map - Visual Studio Code) | Folder (War3-lua-map): 764 files | File types: lua(256) txt(167) ini(87) dll(61) slk(55) md(39) lng(18) | json(8) j(6) filters(5) | Conf files: launch.json(2) settings.json(2) tasks.json(2) sln(1) | Launch Configs: lua(2) | Folder (sumneko.lua): 1061 files | File types: lua(227) h(207) obj(131) c(123) dll(65) cpp(60) lni(39) | vcxproj(19) filters(19) ninja(15) | Conf files: sln(6) launch.json(4) makefile(4) package.json(2) | tsconfig.json(2) settings.json(2) tasks.json(1) | Launch Configs: lua(4); ```

Extensions: none

rebornix commented 5 years ago

You can run VS Code with a larger memory limit by code --max-memory 8000 to fix this issue.