Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal Process Terminating on folder switch / on its own #24879

Open
bergjones opened this issue Mar 7, 2025 · 5 comments
Open

Terminal Process Terminating on folder switch / on its own #24879

bergjones opened this issue Mar 7, 2025 · 5 comments
Assignees
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@bergjones
Copy link

Type: Bug

Behaviour

Upon switching project folders with "Open Recent" receive a similar message to

The terminal process "C:\Program Files\PowerShell\7\pwsh.exe" terminated with exit code -1073741510.

upon switching folders, even with terminal unopened. If I change the default terminal to command prompt, or git bash, receive the same message but with the address for that specific terminal. The rest of my computer is fine, and it only happens with the Python extension enabled. I did a clean uninstall / reinstall VS Code and the issue persists.

Steps to reproduce:

  1. Enable the addon
    2.Open a project with or without having the terminal open.
  2. Switch to another project.
  3. The message similar to
    The terminal process "C:\Program Files\PowerShell\7\pwsh.exe" terminated with exit code -1073741510.

pops up even without having the terminal open.

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Behaviour

XXX

Steps to reproduce:

  1. XXX

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Extension version: 2025.2.0
VS Code version: Code 1.98.0 (6609ac3d66f4eade5cf376d1cb76f13985724bcb, 2025-03-04T21:06:18.612Z)
OS version: Windows_NT x64 10.0.26100
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.13.1
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): System
  • Value of the python.languageServer setting: Default
User Settings


languageServer: "Pylance"

Installed Extensions
Extension Name Extension Id Version
debugpy ms- 2025.4.0
js-debug ms- 1.97.1
js-debug-companion ms- 1.1.3
python ms- 2025.2.0
vscode-js-profile-table ms- 1.0.10
vscode-pylance ms- 2025.3.1
System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i9-12900K (24 x 3187)
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
webnn: disabled_off
Load (avg) undefined
Memory (System) 127.82GB (114.56GB free)
Process Argv --crash-reporter-id 7c9478a3-4795-4d48-8856-4fc79617c07c
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
968h8231:31253945
jda6j935:31233686

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Mar 7, 2025
@anthonykim1
Copy link

Hello @bergjones Thanks for filing this issue.

Let us try two things:

First, what happens if you switch default shell from pwsh to gitbash?

Second, add

    "python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"]

into your setings.json and run command: Python: Clear Cahce and Reload
This command palette will be open if you ctrl + shift + p from your windows machine.

Let me know how these goes, thanks

@anthonykim1 anthonykim1 added bug Issue identified by VS Code Team member as probable bug area-terminal and removed triage-needed Needs assignment to the proper sub-team labels Mar 7, 2025
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Mar 7, 2025
@bergjones
Copy link
Author

It still comes up after taking both steps but with a path to the git bash.

The terminal process "C:\Program Files\Git\bin\bash.exe" terminated with exit code -1073741510.

If I disable the Python Extension and keep the C/C++ Extension active I don't have an issue. This only started happening very recently, like last couple of days. The funny thing is I personally never use the terminal in vs code to debug and I only noticed this because I have to switch folders to paste content from my private repo into my public repo and now the message appears. I have read someone say that I can simply disable the "Show Exit Alert" terminal setting in preferences, but that just hides the problem and doesn't solve it.

@anthonykim1
Copy link

Interesting, what if you downgrade your Python extension version to 2025.0 instead of 2025.2?
Make sure to restart extension and reload.

@bergjones
Copy link
Author

It still has the issue with the 2025.0 version. I believe VS Code itself was updated to 1.98 on 3/4 or 3/5, just around when this started happening so I guess that since I am still using the latest version of VSCode which is 1.98, even with an older version of Python Extension, the issue can still be present.

@bergjones
Copy link
Author

bergjones commented Mar 8, 2025

I just tested rolling back VS Code to 1.97 and following instructions to make it not auto-update itself to 1.98 before I had a chance to disable auto updates by first completely uninstalling VS Code 1.98 and removing associated leftover folders by deleting

%UserProfile%.vscode
%AppData%\Code

then downloading 1.97 from the changelog. Then I went to Windows Network Connection and temporarily disabling WiFi and then after 1.97 was installed setting

"update.mode": "none"

in user.json. Then re-enabling Wifi and downloading Python Extension (latest) and setting and opening the two project folders I switch between. I switched between them approximately 10 times to test. The popup did not show up.

On the other hand in 1.98 it shows up immediately after switching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants