[process exited with code 3221225477] at exiting console-programs like diskpart #10166

Closed
opened 2026-01-31 02:14:08 +00:00 by claunia · 11 comments
Owner

Originally created by @logg-sar on GitHub (Aug 14, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.959]
Windows Terminal version (if applicable): 1.1.2021.0 (but not only)

Steps to reproduce

Open cmd with admin rights.
Start diskpart
(enter for example list disk)
Quit diskpart by pressing CTRL-C

Expected behavior

Diskpart is closed an using Terminal is posible

Actual behavior

After some seconds this appear:

[process exited with code 3221225477] and Terminal is no longer usable

Same behaviour with netsh

Originally created by @logg-sar on GitHub (Aug 14, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18363.959] Windows Terminal version (if applicable): 1.1.2021.0 (but not only) ``` # Steps to reproduce Open cmd with admin rights. Start diskpart (enter for example list disk) Quit diskpart by pressing CTRL-C # Expected behavior Diskpart is closed an using Terminal is posible # Actual behavior After some seconds this appear: [process exited with code 3221225477] and Terminal is no longer usable Same behaviour with netsh
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 02:14:08 +00:00
Author
Owner

@DHowett commented on GitHub (Aug 14, 2020):

image

Can you share your settings.json?

@DHowett commented on GitHub (Aug 14, 2020): ![image](https://user-images.githubusercontent.com/189190/90281441-6a7bb280-de21-11ea-850e-6fb554760ce8.png) Can you share your `settings.json`?
Author
Owner

@ghost commented on GitHub (Aug 18, 2020):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Aug 18, 2020): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@logg-sar commented on GitHub (Aug 21, 2020):

Of course

// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation

{
	"$schema": "https://aka.ms/terminal-profiles-schema",

	"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",

	"profiles":
	{
		"defaults":
		{
			// Put settings here that you want to apply to all profiles
			"fontFace": "Consolas",
			"cursorShape": "vintage",
			// If enabled, selections are automatically copied to your clipboard.
			"copyOnSelect": true,
			// If enabled, formatted data is also copied to your clipboard
			"copyFormatting": false
		},
		"list":
		[
			{
				// Make changes here to the powershell.exe profile
				"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
				"name": "Windows PowerShell",
				"commandline": "powershell.exe",
				"hidden": false
			},
			{
				// Make changes here to the powershell.exe profile
				"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
				"name": "ADMIN PowerShell ⚡",
				"commandline": "gsudo powershell.exe",
				"icon": "ms-appdata:///roaming/pwsh-32.png",
				"hidden": false
			},
			{
				// Make changes here to the cmd.exe profile
				"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
				"name": "cmd",
				"commandline": "cmd.exe",
				"hidden": false
			},{
				// Make changes here to the cmd.exe profile
				"guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
				"name": "ADMIN cmd ⚡",
				"commandline": "gsudo cmd.exe",
				"icon": "ms-appdata:///roaming/terminal.ico",
				"hidden": false
			},
			{
				"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
				"hidden": false,
				"name": "Azure Cloud Shell",
				"source": "Windows.Terminal.Azure"
			},
			{
				"guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}",
				"hidden": false,
				"name": "Debian",
				"source": "Windows.Terminal.Wsl",
				"startingDirectory": "//wsl$/Debian/mnt/"
			}
		]
	},

	// Add custom color schemes to this array
	"schemes": [],

	// Add any keybinding overrides to this array.
	// To unbind a default keybinding, set the command to "unbound"
	"keybindings": [
		{"command": {"action": "switchToTab", "index": 0}, "keys": "alt+1"},
		{"command": {"action": "switchToTab", "index": 1}, "keys": "alt+2"},
		{"command": {"action": "switchToTab", "index": 2}, "keys": "alt+3"},
		{"command": {"action": "switchToTab", "index": 3}, "keys": "alt+4"},
		{"command": {"action": "switchToTab", "index": 4}, "keys": "alt+5"},
		{"command": {"action": "switchToTab", "index": 5}, "keys": "alt+6"},
		{"command": {"action": "switchToTab", "index": 6}, "keys": "alt+7"},
		{"command": {"action": "switchToTab", "index": 7}, "keys": "alt+8"},
		{"command": {"action": "switchToTab", "index": 8}, "keys": "alt+9"},
		{"command": "moveFocusLeft", "keys": ["ctrl+shift+left"]},
	        {"command": "moveFocusRight", "keys": ["ctrl+shift+right"]},
        	{"command": "moveFocusUp", "keys": ["ctrl+shift+up"]},
	        {"command": "moveFocusDown", "keys": ["ctrl+shift+down"]},		
		{"command": "find", "keys": "ctrl+f"},
		{"command": "paste", "keys": "ctrl+v"},
		{"command": "paste", "keys": "ctrl+shift+v"},
		{"command": "newTab", "keys": "ctrl+t"},
	//	{"command": "closeTab", "keys": "ctrl+w"},
		{"command": "closeWindow", "keys": "alt+f4"},
		{"command": {"action": "copy", "singleLine": false}, "keys": "alt+enter"},
		{"command": {"action": "copy", "singleLine": false}, "keys": "ctrl+enter"},
		{"command": "duplicateTab", "keys": "ctrl+shift+d"},
		{"command": "closePane", "keys": "ctrl+shift+w"},		
		{"command": "nextTab", "keys": "ctrl+tab"},
		{"command": {"action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "ctrl+shift+t" }
	]
}

Hope nothings wrong in it...

@logg-sar commented on GitHub (Aug 21, 2020): Of course ``` // To view the default settings, hold "alt" while clicking on the "Settings" button. // For documentation on these settings, see: https://aka.ms/terminal-documentation { "$schema": "https://aka.ms/terminal-profiles-schema", "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "profiles": { "defaults": { // Put settings here that you want to apply to all profiles "fontFace": "Consolas", "cursorShape": "vintage", // If enabled, selections are automatically copied to your clipboard. "copyOnSelect": true, // If enabled, formatted data is also copied to your clipboard "copyFormatting": false }, "list": [ { // Make changes here to the powershell.exe profile "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "Windows PowerShell", "commandline": "powershell.exe", "hidden": false }, { // Make changes here to the powershell.exe profile "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "name": "ADMIN PowerShell ⚡", "commandline": "gsudo powershell.exe", "icon": "ms-appdata:///roaming/pwsh-32.png", "hidden": false }, { // Make changes here to the cmd.exe profile "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "name": "cmd", "commandline": "cmd.exe", "hidden": false },{ // Make changes here to the cmd.exe profile "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", "name": "ADMIN cmd ⚡", "commandline": "gsudo cmd.exe", "icon": "ms-appdata:///roaming/terminal.ico", "hidden": false }, { "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", "hidden": false, "name": "Azure Cloud Shell", "source": "Windows.Terminal.Azure" }, { "guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}", "hidden": false, "name": "Debian", "source": "Windows.Terminal.Wsl", "startingDirectory": "//wsl$/Debian/mnt/" } ] }, // Add custom color schemes to this array "schemes": [], // Add any keybinding overrides to this array. // To unbind a default keybinding, set the command to "unbound" "keybindings": [ {"command": {"action": "switchToTab", "index": 0}, "keys": "alt+1"}, {"command": {"action": "switchToTab", "index": 1}, "keys": "alt+2"}, {"command": {"action": "switchToTab", "index": 2}, "keys": "alt+3"}, {"command": {"action": "switchToTab", "index": 3}, "keys": "alt+4"}, {"command": {"action": "switchToTab", "index": 4}, "keys": "alt+5"}, {"command": {"action": "switchToTab", "index": 5}, "keys": "alt+6"}, {"command": {"action": "switchToTab", "index": 6}, "keys": "alt+7"}, {"command": {"action": "switchToTab", "index": 7}, "keys": "alt+8"}, {"command": {"action": "switchToTab", "index": 8}, "keys": "alt+9"}, {"command": "moveFocusLeft", "keys": ["ctrl+shift+left"]}, {"command": "moveFocusRight", "keys": ["ctrl+shift+right"]}, {"command": "moveFocusUp", "keys": ["ctrl+shift+up"]}, {"command": "moveFocusDown", "keys": ["ctrl+shift+down"]}, {"command": "find", "keys": "ctrl+f"}, {"command": "paste", "keys": "ctrl+v"}, {"command": "paste", "keys": "ctrl+shift+v"}, {"command": "newTab", "keys": "ctrl+t"}, // {"command": "closeTab", "keys": "ctrl+w"}, {"command": "closeWindow", "keys": "alt+f4"}, {"command": {"action": "copy", "singleLine": false}, "keys": "alt+enter"}, {"command": {"action": "copy", "singleLine": false}, "keys": "ctrl+enter"}, {"command": "duplicateTab", "keys": "ctrl+shift+d"}, {"command": "closePane", "keys": "ctrl+shift+w"}, {"command": "nextTab", "keys": "ctrl+tab"}, {"command": {"action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "ctrl+shift+t" } ] } ``` Hope nothings wrong in it...
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Aug 21, 2020):

Does the problem occur only in those profiles that use gsudo?

Perhaps the GenerateConsoleCtrlEvent calls in CtrlCCommand.cs are causing this somehow. I am not sure that class is used nowadays, though; most references to it are in obsolete classes.

@KalleOlaviNiemitalo commented on GitHub (Aug 21, 2020): Does the problem occur only in those profiles that use [gsudo](https://github.com/gerardog/gsudo/)? Perhaps the GenerateConsoleCtrlEvent calls in [CtrlCCommand.cs](https://github.com/gerardog/gsudo/blob/3088ef61cb1d3a833f57545692e4e1c58121a2ac/src/gsudo/Commands/CtrlCCommand.cs) are causing this somehow. I am not sure that class is used nowadays, though; most references to it are in obsolete classes.
Author
Owner

@netxph commented on GitHub (Aug 24, 2020):

I also have the same issue. Not only with gsudo, but with dotnet watch test, jupyter notebook and this only happens when I press CTRL+C. One additional thing, this only happens with PowerShell Core pwsh.

Windows Powershell seems to be working fine.

@netxph commented on GitHub (Aug 24, 2020): I also have the same issue. Not only with gsudo, but with `dotnet watch test`, `jupyter notebook` and this only happens when I press `CTRL+C`. One additional thing, this only happens with PowerShell Core `pwsh`. Windows Powershell seems to be working fine.
Author
Owner

@DHowett commented on GitHub (Aug 24, 2020):

You are seeing a very common issue caused by powershell core 6 or scoop. They both have the same problem. Upgrade or stop using scoop.

@DHowett commented on GitHub (Aug 24, 2020): You are seeing a very common issue caused by powershell core 6 **or** scoop. They both have the same problem. Upgrade or stop using scoop.
Author
Owner

@netxph commented on GitHub (Aug 24, 2020):

Cool thanks... My pwsh 7.0.3 is installed through scoop, and I am now using the one from the installer. It's now working.

It might be the shimming mechanism of scoop that's producing this issue. Still, I hope this gets resolved. Thanks.

@netxph commented on GitHub (Aug 24, 2020): Cool thanks... My `pwsh 7.0.3` is installed through scoop, and I am now using the one from the installer. It's now working. It might be the shimming mechanism of `scoop` that's producing this issue. Still, I hope this gets resolved. Thanks.
Author
Owner

@DHowett commented on GitHub (Aug 24, 2020):

It is definitely the shimming mechanism 😄 and there are many threads about this issue on the Scoop repo!

@DHowett commented on GitHub (Aug 24, 2020): It is definitely the shimming mechanism 😄 and there are many threads about this issue on the Scoop repo!
Author
Owner

@logg-sar commented on GitHub (Aug 24, 2020):

Does the problem occur only in those profiles that use [gsudo]?

Yes, you are right. I'll abandon gsudo.

Closed (at least for me ;))

@logg-sar commented on GitHub (Aug 24, 2020): > Does the problem occur only in those profiles that use [gsudo]? Yes, you are right. I'll abandon gsudo. Closed (at least for me ;))
Author
Owner

@gerardog commented on GitHub (Sep 9, 2020):

I just noticed this thread. This was fixed on Aug 9 on gsudo v0.7.2
(The Control-C handler delegate was being garbage collected).

@gerardog commented on GitHub (Sep 9, 2020): I just noticed this thread. This was fixed on Aug 9 on gsudo [v0.7.2](https://github.com/gerardog/gsudo/releases/tag/v0.7.2) (The Control-C handler delegate was being garbage collected).
Author
Owner

@DHowett commented on GitHub (Sep 9, 2020):

That's two weird console-related garbage collection issues! If you want to write a blog post about it, I'll signal-boost 😄

@DHowett commented on GitHub (Sep 9, 2020): That's two weird console-related garbage collection issues! If you want to write a blog post about it, I'll signal-boost :smile:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10166