[regression] The parent process of WT does not terminate #23690

Closed
opened 2026-01-31 08:49:25 +00:00 by claunia · 17 comments
Owner

Originally created by @Zeroes1 on GitHub (Oct 14, 2025).

Windows Terminal version

1.23.12811.0

Windows build number

10.0.19045.3448

Other Software

No response

Steps to reproduce

Run WindowsTerminal.exe (or WT.exe) with default settings (note: work in background mode is OFF)

in Powershell window [default profile]
press key 'ContextMenu' on keyboard

in context menu choose 'Close Tab' and click by left key mouse

Expected Behavior

latest good release:
terminal-1.22.11751.0 and earler

latest good canary
terminal-1.24.531.0 and earler

If we work not in background mode and close Latest Tab, process WindowsTerminal.exe must be closed

Actual Behavior

with trouble release:
terminal-1.23.12681.0
terminal-1.23.12811.0

with trouble canary all since terminal-1.24.551.0 -> terminal-1.25.2821.0

check processes in OS, and see what the parent process of WT does not terminate.
And we see app with default ico on taskbar Windows.

WT Hotkeys Alt+F4 and Ctrl+Shift+W, work fine, closed all (parent and child processes).
command 'exit' in PS windows closed all.
closing the last tab by clicking on the window cross also works great.

Originally created by @Zeroes1 on GitHub (Oct 14, 2025). ### Windows Terminal version 1.23.12811.0 ### Windows build number 10.0.19045.3448 ### Other Software _No response_ ### Steps to reproduce Run WindowsTerminal.exe (or WT.exe) with default settings (note: work in background mode is OFF) in Powershell window [default profile] press key 'ContextMenu' on keyboard in context menu choose 'Close Tab' and click by left key mouse ### Expected Behavior latest good release: terminal-1.22.11751.0 and earler latest good canary terminal-1.24.531.0 and earler If we work not in background mode and close Latest Tab, process WindowsTerminal.exe must be closed ### Actual Behavior with trouble release: terminal-1.23.12681.0 terminal-1.23.12811.0 with trouble canary all since terminal-1.24.551.0 -> terminal-1.25.2821.0 check processes in OS, and see what the parent process of WT does not terminate. And we see app with default ico on taskbar Windows. WT Hotkeys Alt+F4 and Ctrl+Shift+W, work fine, closed all (parent and child processes). command 'exit' in PS windows closed all. closing the last tab by clicking on the window cross also works great.
Author
Owner

@Zeroes1 commented on GitHub (Oct 14, 2025):

repro 100%

https://github.com/user-attachments/assets/580c9e1c-abda-4174-969a-2ba958a00d48

@Zeroes1 commented on GitHub (Oct 14, 2025): repro 100% https://github.com/user-attachments/assets/580c9e1c-abda-4174-969a-2ba958a00d48
Author
Owner

@lhecker commented on GitHub (Oct 15, 2025):

I couldn't reproduce the issue:

https://github.com/user-attachments/assets/58ff8062-e738-4cc1-9a50-0de8031eacec

@lhecker commented on GitHub (Oct 15, 2025): I couldn't reproduce the issue: https://github.com/user-attachments/assets/58ff8062-e738-4cc1-9a50-0de8031eacec
Author
Owner

@Zeroes1 commented on GitHub (Oct 15, 2025):

@lhecker I cant watch your video, file damaged?

@Zeroes1 commented on GitHub (Oct 15, 2025): @lhecker I cant watch your video, file damaged?
Author
Owner

@lhecker commented on GitHub (Oct 15, 2025):

Maybe you're missing the right codec? Can you try downloading it and playing it in VLC or MPV or similar? Otherwise I'll re-encode it for you, of course.

@lhecker commented on GitHub (Oct 15, 2025): Maybe you're missing the right codec? Can you try downloading it and playing it in VLC or MPV or similar? Otherwise I'll re-encode it for you, of course.
Author
Owner

@Zeroes1 commented on GitHub (Oct 15, 2025):

@lhecker i download, now i see with player.

ok, but i have trouble. checked now on another computer (at home) with Microsoft.WindowsTerminalPreview_1.24.2812.0_x64.zip
same behavior :/ win10 22h2 (user admin and limit user)

any idea how to debug this situation?

@Zeroes1 commented on GitHub (Oct 15, 2025): @lhecker i download, now i see with player. ok, but i have trouble. checked now on another computer (at home) with Microsoft.WindowsTerminalPreview_1.24.2812.0_x64.zip same behavior :/ win10 22h2 (user admin and limit user) any idea how to debug this situation?
Author
Owner

@Zeroes1 commented on GitHub (Nov 10, 2025):

@lhecker Hi, you check this behavior on Windows 10, right?

@Zeroes1 commented on GitHub (Nov 10, 2025): @lhecker Hi, you check this behavior on Windows 10, right?
Author
Owner

@lhecker commented on GitHub (Nov 24, 2025):

I tried it in a VM, and it didn't reproduce:

https://github.com/user-attachments/assets/f49a5f83-c311-43fb-8da1-3689ebf45058

@lhecker commented on GitHub (Nov 24, 2025): I tried it in a VM, and it didn't reproduce: https://github.com/user-attachments/assets/f49a5f83-c311-43fb-8da1-3689ebf45058
Author
Owner

@Zeroes1 commented on GitHub (Jan 13, 2026):

My experience
OS Fresh installed from:
ru-ru_windows_10_consumer_editions_version_22h2_updated_july_2025_x64_dvd_f841fba5.iso

on Windows 2022 RUS i not have this problem, only on Win10 (at work, home, fresh installed on Virtual Box)

@Zeroes1 commented on GitHub (Jan 13, 2026): My experience OS Fresh installed from: ru-ru_windows_10_consumer_editions_version_22h2_updated_july_2025_x64_dvd_f841fba5.iso <!-- Failed to upload "WT dont close.mp4" --> on Windows 2022 RUS i not have this problem, only on Win10 (at work, home, fresh installed on Virtual Box)
Author
Owner
@Zeroes1 commented on GitHub (Jan 13, 2026): https://github.com/user-attachments/assets/e9ea53ba-8540-4a96-80c4-3a5b2b46746a
Author
Owner
@Zeroes1 commented on GitHub (Jan 14, 2026): https://github.com/user-attachments/assets/8a3e3cda-a253-426c-ac43-72d3fbb66d36
Author
Owner

@Zeroes1 commented on GitHub (Jan 14, 2026):

Video recorded on fresh installed OS, without install any soft, and without any tweaks.

  1. We can debug this moment together?
  2. Can you show me the location in the source code where the handler for this action is located?
@Zeroes1 commented on GitHub (Jan 14, 2026): Video recorded on fresh installed OS, without install any soft, and without any tweaks. 1) We can debug this moment together? 2) Can you show me the location in the source code where the handler for this action is located?
Author
Owner

@Zeroes1 commented on GitHub (Jan 14, 2026):

@lhecker Now I test latest canary build terminal-1.25.10131.0 on Windows 11 (24h2 26100.6584) - same behavior [parent process don't closed].

@Zeroes1 commented on GitHub (Jan 14, 2026): @lhecker Now I test latest canary build terminal-1.25.10131.0 on Windows 11 (24h2 26100.6584) - same behavior [parent process don't closed].
Author
Owner

@lhecker commented on GitHub (Jan 14, 2026):

As far as I know, the menu item gets created here: b668fd5188/src/cascadia/TerminalApp/TerminalPage.cpp (L5417)

Since it uses a regular "CloseTab" action, it should at least theoretically behave exactly as if you chose "Close Tab" from the command palette. Both get handled by TerminalPage::_HandleCloseTab.

I've tested this again just now, and I still cannot reproduce it.

@lhecker commented on GitHub (Jan 14, 2026): As far as I know, the menu item gets created here: https://github.com/microsoft/terminal/blob/b668fd518874ff3248718c95d0793c0218f9d5aa/src/cascadia/TerminalApp/TerminalPage.cpp#L5417 Since it uses a regular "CloseTab" action, it should at least theoretically behave exactly as if you chose "Close Tab" from the command palette. Both get handled by `TerminalPage::_HandleCloseTab`. I've tested this again just now, and I still cannot reproduce it.
Author
Owner

@lhecker commented on GitHub (Jan 14, 2026):

@DHowett could repro it:

(e5d4.f8a4): Windows Runtime Originate Error - code 40080201 (first chance)
...\Windows.UI.Xaml.Hosting.h(268)\WindowsTerminal.exe!00007FF706129133: LogHr(2) tid(f8a4) 800F1000 No installed components were detected.
(e5d4.f8a4): C++ EH exception - code e06d7363 (first chance)
...\desktopwindowcontentbridge.cpp(540)\Windows.UI.dll!00007FFAA4D0FD17: (caller: 00007FFAA4D0F2D1) ReturnHr(1) tid(f8a4) 8007139F The group or resource is not in the correct state to perform the requested operation.
(e5d4.f8a4): C++ EH exception - code e06d7363 (first chance)
...\WindowEmperor.cpp(1027)\WindowsTerminal.exe!00007FF70615B2B1: (caller: 00007FF706135A7F) LogHr(3) tid(f8a4) 800F1000 No installed components were detected.
    Msg:[winrt::hresult_error: Child collection must not be modified during measure or arrange.] 

So, this may be another case of #19312. We tried fixing that with #19395 but seemingly failed.

These issues remind me that, as usual, Lord Dennis Ritchie was right: Anything that came after linked lists was a mistake.

@lhecker commented on GitHub (Jan 14, 2026): @DHowett could repro it: ``` (e5d4.f8a4): Windows Runtime Originate Error - code 40080201 (first chance) ...\Windows.UI.Xaml.Hosting.h(268)\WindowsTerminal.exe!00007FF706129133: LogHr(2) tid(f8a4) 800F1000 No installed components were detected. (e5d4.f8a4): C++ EH exception - code e06d7363 (first chance) ...\desktopwindowcontentbridge.cpp(540)\Windows.UI.dll!00007FFAA4D0FD17: (caller: 00007FFAA4D0F2D1) ReturnHr(1) tid(f8a4) 8007139F The group or resource is not in the correct state to perform the requested operation. (e5d4.f8a4): C++ EH exception - code e06d7363 (first chance) ...\WindowEmperor.cpp(1027)\WindowsTerminal.exe!00007FF70615B2B1: (caller: 00007FF706135A7F) LogHr(3) tid(f8a4) 800F1000 No installed components were detected. Msg:[winrt::hresult_error: Child collection must not be modified during measure or arrange.] ``` So, this may be another case of #19312. We tried fixing that with #19395 but seemingly failed. These issues remind me that, as usual, Lord Dennis Ritchie was right: Anything that came after linked lists was a mistake.
Author
Owner

@DHowett commented on GitHub (Jan 14, 2026):

Adding yet another workaround.

Leonard, we talked about the exception handler a few months ago. I think it's the right call, even if it means sometimes we leak something.

@DHowett commented on GitHub (Jan 14, 2026): Adding yet another workaround. Leonard, we talked about the exception handler a few months ago. I think it's the right call, even if it means sometimes we leak something.
Author
Owner

@Zeroes1 commented on GitHub (Jan 16, 2026):

@DHowett , I check canary terminal-1.25.10151.0 -> now is good, thanks!

@Zeroes1 commented on GitHub (Jan 16, 2026): @DHowett , I check canary terminal-1.25.10151.0 -> now is good, thanks!
Author
Owner

@DHowett commented on GitHub (Jan 16, 2026):

Thanks for testing!

@DHowett commented on GitHub (Jan 16, 2026): Thanks for testing!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23690