microsoft / vscode

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

Terminal cannot open: powershell exit code -1073741819 #210677

Closed luisc9 closed 5 months ago

luisc9 commented 5 months ago

powershell error 20240418 Type: Bug

Open Visual Studio code. Open any python file View Terminal Error message: "The terminal process c:\windows\system32\windowspowershell\v1.0\powershell.exe terminated with exit code -1073741819

VS Code version: Code 1.88.1 (e170252f762678dec6ca2cc69aba1570769a5d39, 2024-04-10T17:41:02.734Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.70GB (5.66GB free)| |Process Argv|--crash-reporter-id c67b3ce2-8eaf-458b-89bf-c97332b35e3a| |Screen Reader|no| |VM|0%|
Extensions (34) Extension|Author (truncated)|Version ---|---|--- vscode-intelephense-client|bme|1.10.4 npm-intellisense|chr|1.4.5 vscode-eslint|dba|2.4.4 vscode-html-css|ecm|2.0.9 vsc-material-theme|Equ|34.3.1 vsc-material-theme-icons|equ|3.6.0 cloudcode|goo|2.8.0 vscode-docker|ms-|1.29.0 vscode-language-pack-es|MS-|1.88.2024041009 vscode-kubernetes-tools|ms-|1.3.16 debugpy|ms-|2024.4.0 isort|ms-|2023.10.1 python|ms-|2024.4.1 vscode-pylance|ms-|2024.4.1 jupyter|ms-|2024.3.1 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.17 vscode-jupyter-cell-tags|ms-|0.1.9 vscode-jupyter-slideshow|ms-|0.1.6 remote-containers|ms-|0.354.0 atom-keybindings|ms-|3.3.0 java|red|1.29.0 vscode-yaml|red|1.14.0 ayu|tea|1.0.5 open-in-browser|tec|2.0.0 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.3.1 vscode-java-debug|vsc|0.57.0 vscode-java-dependency|vsc|0.23.6 vscode-java-pack|vsc|0.26.0 vscode-java-test|vsc|0.41.0 vscode-maven|vsc|0.44.0 volar|Vue|2.0.8 php-debug|xde|1.34.0 (3 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 d34g3935:30971562 fegfb526:30981948 bg6jg535:30979843 ccp2r6:30993542 dsvsc020:30976470 pythonait:31006305 jchc7451:30973076 gee8j676:31009558 showvideot:31016892 chatpanelc:31018788 dsvsc021:30996838 da93g388:31013173 ```
luisc9 commented 5 months ago

This only happens when I use VScode. No issues with other editors (Notepad++ for example)

meganrogge commented 5 months ago

The exit code -1073741819 is a specific Windows error code that corresponds to 0xC0000005 in hexadecimal. This error code is often associated with an "Access Violation" error, which typically occurs when a program tries to access memory that hasn't been allocated or is already in use by another process.

This error can occur for a variety of reasons, including:

A bug in the PowerShell executable or one of its dependencies. A problem with your system's memory, such as a bad RAM module. A conflict with another program or process running on your system. A corrupted system file or registry entry. Here are a few steps you can take to troubleshoot this issue:

Update PowerShell: If you're using an older version of PowerShell, updating to the latest version might resolve the issue.

Run a System File Check (SFC): This tool scans and repairs corrupted system files. Open a command prompt as an administrator and run sfc /scannow.

Check for Conflicting Programs: If you have any other programs running that might interfere with PowerShell, try closing them and see if the problem persists.

Check Your System's Memory: If you're comfortable doing so, you might want to run a memory check to see if there are any issues with your RAM. You can do this by restarting your computer and running the built-in Windows Memory Diagnostic tool.

Remember to always back up important data before making significant changes to your system. If you're not comfortable troubleshooting this issue yourself, you might want to consider seeking help from a professional.

luisc9 commented 5 months ago

Thanks Megan. Is it possible that the issue is caused by VS Code itself? I did follow the instructions (except upgrading powershell). I saw VS code had already a working powershell, and then a second one. Could it be a configuratiom issue? Thanks