microsoft / vscode

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

Code crashes on start without --disable-chromium-sandbox #189253

Closed IntegerMan closed 1 year ago

IntegerMan commented 1 year ago

Type: Bug

This started within the last week while I was working on python code in a Jupyter notebook in VS Code using Anaconda.

VS Code refused to start. the application would launch, then show that the window terminated unexpectedly (reason: 'crashed', code: '-1073741502') and suggested New Window and Close. New Window repeated the crash.

The issue did not resolve itself after uninstalling VS Code and VS Code Insiders or after deleting the app data folders for both.

Running vs code from the command line via --disable-chromium-sandbox does allow the IDE to open, but does not permently resolve the issue for me.

VS Code version: Code 1.80.2 (2ccd690cbff1569e4a83d7c43d45101f817401dc, 2023-07-27T20:40:28.909Z) OS version: Windows_NT x64 10.0.22621 Modes:

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 9 5950X 16-Core Processor (32 x 3400)| |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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|63.91GB (30.68GB free)| |Process Argv|--disable-chromium-sandbox --crash-reporter-id fa8b709c-77a8-4221-9bf8-f7f06d462491| |Screen Reader|no| |VM|0%|
Extensions (101) Extension|Author (truncated)|Version ---|---|--- vscode-css-formatter|aes|1.0.2 ng-template|Ang|16.1.4 gitkraken-glo|axo|1.1.2 toml|be5|0.6.0 vscode-icontheme-nomo-dark|be5|1.3.6 armview|ben|0.4.6 markdown-mermaid|bie|1.19.0 language-hugo-vscode|bud|1.3.1 vscode-pandoc|Chr|0.4.3 npm-intellisense|chr|1.4.4 path-intellisense|chr|2.8.4 angular-schematics|cyr|5.4.2 vscode-markdownlint|Dav|0.51.0 vscode-eslint|dba|2.4.2 dendron|den|0.123.0 dendron-markdown-shortcuts|den|0.12.1 dendron-paste-image|den|1.1.1 python-environment-manager|don|1.0.4 xml|Dot|2.5.1 gitlens|eam|14.1.1 prettier-vscode|esb|9.19.0 copilot|Git|1.99.296 copilot-chat|Git|0.4.1 vscode-pull-request-github|Git|0.68.1 gitkraken-authentication|git|1.0.3 live-sass|gle|6.0.6 gc-excelviewer|Gra|4.2.57 vscode-power-mode|hoo|3.0.2 rest-client|hum|0.25.1 vscode-tfs|iva|0.7.2 better-seo|jan|2.0.1 Angular2|joh|16.0.1 vscode-insertdatestring|jsy|2.3.1 vscode-fix-checksums|leh|1.1.0 sort-typescript-imports|mic|1.4.1 azure-pipelines|ms-|1.208.0 azure-dev|ms-|0.7.0 vscode-apimanagement|ms-|1.0.6 vscode-azureappservice|ms-|0.25.0 vscode-azurecontainerapps|ms-|0.5.1 vscode-azurefunctions|ms-|1.12.1 vscode-azureresourcegroups|ms-|0.7.5 vscode-azurestaticwebapps|ms-|0.12.2 vscode-azurestorage|ms-|0.15.3 vscode-azurevirtualmachines|ms-|0.6.5 vscode-bicep|ms-|0.19.5 vscode-cosmosdb|ms-|0.19.4 vscode-docker|ms-|1.26.0 vscode-logicapps|ms-|1.2.9 csdevkit|ms-|0.2.100 csharp|ms-|2.0.312 dotnet-interactive-vscode|ms-|1.0.4313020 vscode-dotnet-runtime|ms-|1.6.0 vscodeintellicode-csharp|ms-|0.1.26 vscode-edge-devtools|ms-|2.1.3 data-workspace-vscode|ms-|0.5.0 mssql|ms-|1.20.0 sql-bindings-vscode|ms-|0.4.0 sql-database-projects-vscode|ms-|1.2.0 isort|ms-|2023.10.1 python|ms-|2023.12.0 vscode-pylance|ms-|2023.7.40 jupyter|ms-|2023.6.1101941928 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.17 vscode-ai|ms-|0.32.2 vscode-ai-remote|ms-|0.30.0 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.299.0 remote-wsl|ms-|0.80.2 azure-account|ms-|0.11.5 azurecli|ms-|0.5.0 powershell|ms-|2023.6.0 resharper9-keybindings|ms-|1.1.0 vscode-node-azure-pack|ms-|1.2.0 vscode-typescript-next|ms-|5.2.20230729 wordcount|ms-|0.1.0 vsliveshare|ms-|1.0.5877 azurerm-vscode-tools|msa|0.15.10 debugger-for-edge|msj|1.0.15 vscode-sanddance|msr|4.1.0 angular2-inline|nat|0.0.17 angular-console|nrw|18.5.0 vetur|oct|0.37.3 vuehelper|oys|0.1.0 material-icon-theme|PKi|4.29.0 vscode-yaml|red|1.14.0 LiveServer|rit|5.7.9 synthwave-vscode|Rob|0.1.15 vue-vscode-snippets|sdr|3.1.1 character-count|ste|0.1.1 code-spell-checker|str|2.20.5 even-better-toml|tam|0.19.2 vscode-status-bar-format-toggle|tom|3.1.1 intellicode-api-usage-examples|Vis|0.2.7 vscodeintellicode|Vis|1.2.30 application-insights|Vis|0.4.2 volar|Vue|1.8.8 vscode-todo-highlight|way|1.0.5 markdown-all-in-one|yzh|3.5.1 (25 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 vscaac:30438847 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 3biah626:30602489 f6dab269:30613381 a9j8j154:30646983 showlangstatbar:30737416 vsctsb:30748421 a2ce3375:30757347 pythonfmttext:30731395 pythoncmv:30756943 fixshowwlkth:30771522 hideindicator:30785051 pythongtdpath:30769146 i26e3531:30792625 pythonnosmt12:30797651 pythonnoceb:30797650 e537b577:30795824 dsvsc013:30795093 dsvsc014cf:30797590 cmakestatusbarv2:30779594 ```
IntegerMan commented 1 year ago

Here's a relevant section from the verbose logs:

[3596680:0730/134536.024:INFO:electron_api_web_frame_main.cc(235)] Attempt to setup WebFrameMain connection while render frame is disposed Renderer process crashed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information. [main 2023-07-30T17:45:36.043Z] CodeWindow: renderer process gone (reason: crashed, code: -1073741502)

I was able to modify my startup arguments in Configure Runtime Arguments to add "disable-chromium-sandbox": true, which allows the application to startup normally, however I'd very much like assistance with repairing the chromium sandboxing as I understand that to be an important feature for security purposes.

deepak1556 commented 1 year ago

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

IntegerMan commented 1 year ago

Since updating and restarting a few times this week, this issue no longer seems to persist. Whatever impacted my computer to not support the sandbox appears to have been resolved even without the "disable-chromium-sandbox": true, setting. I'm going to close this and hope that the information on my temporary workaround helps anyone who encounters it in the future.