microsoft / vscode

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

When I use the keyboard to comment out more than 15 lines of code (excluding blank lines) in VSCode, it crashes. #179757

Closed shiyuanGame closed 1 year ago

shiyuanGame commented 1 year ago

Type: Bug

When I use the keyboard to comment out more than 15 lines of code (excluding blank lines) in VSCode, it crashes. However, if I use the comment button in the menu bar, it doesn’t crash. I haven’t found any useful information in the VSCode editor logs and this has been bothering me for years. I don’t know how to solve it. This issue occurs on both my work and home computers.

提交: b7886d7461186a5eac768481578c1d7ca80e2d21 日期: 2023-04-04T23:21:11.906Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 10.0.19044 沙盒化: No

VS Code version: Code 1.77.1 (b7886d7461186a5eac768481578c1d7ca80e2d21, 2023-04-04T23:21:11.906Z) OS version: Windows_NT x64 10.0.19044 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz (8 x 3000)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|23.79GB (11.17GB free)| |Process Argv|--folder-uri file:///e%3A/minigame/%E9%AA%91%E4%B9%90%E5%9C%88 --crash-reporter-id 659ebe75-b22f-406c-85a3-dbfe9b0d79f3| |Screen Reader|no| |VM|40%|
Extensions (39) Extension|Author (truncated)|Version ---|---|--- markdown-mermaid|bie|1.18.1 codeium|Cod|1.1.73 vscode-office|cwe|3.0.7 vscode-html-css|ecm|1.13.1 EditorConfig|Edi|0.16.4 eppz-code|epp|1.2.52 prettier-vscode|esb|9.10.4 vscode-solution-explorer|fer|0.8.2 code-runner|for|0.12.0 todo-tree|Gru|0.0.225 vue-snippets|hol|1.0.4 vscode-csharp-snippets|jor|1.1.0 docomment|k--|1.0.0 vscode-codemetrics|kis|1.26.1 unity-code-snippets|kle|1.3.0 vscode-leetcode|lib|0.18.2 json-to-ts|Mar|1.7.5 vscode-language-pack-zh-hans|MS-|1.77.2023040509 csharp|ms-|1.25.4 mono-debug|ms-|0.16.3 vscode-typescript-next|ms-|5.1.20230411 color-highlight|nau|2.5.0 godot-csharp-vscode|nei|0.2.1 vetur|oct|0.37.3 indent-rainbow|ode|8.3.1 vuehelper|oys|0.1.0 vscode-versionlens|pfl|1.5.0 tsimporter|pmn|2.0.1 quicktype|qui|12.0.46 LiveServer|rit|5.7.9 nunjucks|ron|0.3.1 partial-diff|ryu|1.4.3 trailing-spaces|sha|0.4.1 vscode-unity-debug|shi|3.0.13 msbuild-project-tools|tin|0.4.9 sort-lines|Tyr|1.9.1 volar|Vue|1.2.0 unity-snippets|Ycl|0.1.2 html-css-class-completion|Zig|1.20.0 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 vscccc:30610679 nodejswelcome1cf:30587006 282f8724:30602487 pyind779:30671433 f6dab269:30613381 pythonsymbol12:30671437 2i9eh265:30646982 6233i204:30672705 vsccsb:30705552 vscodedisable:30660115 pythonb192cf:30669361 functionswalk:30687959 pythonms35:30701012 pythonfmttext:30710681 pythonclientmv:30708685 ```
gjsjohnmurray commented 1 year ago

if I use the comment button in the menu bar

Maybe this is coming from an extension.

Please use the Start Extension Bisect command to investigate whether your problem is being caused by an extension.

shiyuanGame commented 1 year ago

Version: 1.77.1 (user setup) Commit: b7886d7461186a5eac768481578c1d7ca80e2d21 Date: 2023-04-04T23:21:11.906Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 10.0.19044 Sandboxed: No

shiyuanGame commented 1 year ago

I have already uninstalled all the plugins but it still crashes. I will try to reinstall it later.

shiyuanGame commented 1 year ago

Type: Bug

Report a bug

VS Code version: Code 1.77.1 (b7886d7461186a5eac768481578c1d7ca80e2d21, 2023-04-04T23:21:11.906Z) OS version: Windows_NT x64 10.0.19044 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz (8 x 3000)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|23.79GB (11.74GB free)| |Process Argv|--crash-reporter-id 659ebe75-b22f-406c-85a3-dbfe9b0d79f3| |Screen Reader|no| |VM|40%|
Extensions: none
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 vscccc:30610679 nodejswelcome1cf:30587006 282f8724:30602487 pyind779:30671433 f6dab269:30613381 pythonsymbol12:30671437 2i9eh265:30646982 6233i204:30672705 vsccsb:30705552 vscodedisable:30660115 pythonb192cf:30669361 functionswalk:30687959 pythonms35:30701012 pythonfmttext:30710681 pythonclientmv:30708685 ```
shiyuanGame commented 1 year ago

如果我使用菜单栏中的评论按钮

也许这是来自扩展。

请使用 Start Extension Bisect 命令来调查您的问题是否是由扩展引起的。

if I use the comment button in the menu bar

Maybe this is coming from an extension.

Please use the Start Extension Bisect command to investigate whether your problem is being caused by an extension.

Thanks for your reply .I have already uninstalled all the plugins but it still crashes. I will try to reinstall it later.

shiyuanGame commented 1 year ago

Version: 1.77.1 (user setup) Commit: b7886d7 Date: 2023-04-04T23:21:11.906Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 10.0.19044 Sandboxed: No

Extension Bisect is active and has disabled 0 extensions. Check if you can still reproduce the problem and proceed by selecting from these options.

shiyuanGame commented 1 year ago

After adding the editor.accessibilitySupport: on property in the settings.json file, VSCode crashes when commenting multiple lines of code. I’m not sure which plugin carries this configuration item. I found that it is a command only available in Visual Studio.

shiyuanGame commented 1 year ago

This problem has been bothering me for many years and I finally solved it today. Thank you for your guidance.

alexdima commented 1 year ago

@shiyuanGame I cannot reproduce a crash by configuring editor.accessibilitySupport: on and commenting out more than 15 lines of code. Could you please follow the steps at https://github.com/microsoft/vscode/wiki/Native-Crash-Issues to obtain a crash dump?

shiyuanGame commented 1 year ago

I am commenting on my settings line by line. I have restored my backup extensions. If you want to reproduce this, you can find an empty VSCode and install it. If I reinstall or use my original configuration, this situation will occur. vscode setting.zip

@shiyuanGame I cannot reproduce a crash by configuring editor.accessibilitySupport: on and commenting out more than 15 lines of code. Could you please follow the steps at https://github.com/microsoft/vscode/wiki/Native-Crash-Issues to obtain a crash dump?

shiyuanGame commented 1 year ago

This is the backup I made before solving the problem.

shiyuanGame commented 1 year ago

My English is not very good, so I need to use a translation tool. I will try to provide feedback in this way tomorrow: https://github.com/microsoft/vscode/wiki/Native-Crash-Issues. thank

shiyuanGame commented 1 year ago

@shiyuanGame I cannot reproduce a crash by configuring editor.accessibilitySupport: on and commenting out more than 15 lines of code. Could you please follow the steps at https://github.com/microsoft/vscode/wiki/Native-Crash-Issues to obtain a crash dump?

This time I imported the previous configuration without importing the extension. Even after commenting out 50 lines of code, it still crashes.

The .dmp file has been generated and I have attached it to the current conversation. reports.zip

shiyuanGame commented 1 year ago

@alexdima If there is anything else I can do, please feel free to contact me. I am willing to contribute my own strength for the advancement of technology. Thank you to the developers for using code to change the world.

alexdima commented 1 year ago

@deepak1556 @rzhao271 Can you please take a look at the attached .dmp file? I cannot reproduce the crash.

rzhao271 commented 1 year ago

watcher.node appears a lot in the log file, but I'm not sure how to obtain symbols for it. Also, Frame 25 is TerminateProcessOnMemoryExhaustion, so I wonder whether there was a memory leak before the crash. symbolicated-e9.log

shiyuanGame commented 1 year ago

Do you need me to record a video demonstration?

rzhao271 commented 1 year ago

Actually yeah, a recording or example file would be helpful, especially if it contains non-ASCII characters.

shiyuanGame commented 1 year ago

版本: 1.77.3 (system setup) 提交: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710 日期: 2023-04-12T09:16:02.548Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 10.0.19044 沙盒化: No

Hey guys, I just tested it and the issue seems to be gone. Has the bug been fixed?

rzhao271 commented 1 year ago

I don't believe that the bug was directly fixed between 1.77.1 and 1.77.3. I'll close this issue for now, but feel free to comment if the bug appears again.