'Right-click > Close tab' doesn't close window if only one tab is open #23584

Closed
opened 2026-01-31 08:46:28 +00:00 by claunia · 3 comments
Owner

Originally created by @raidhy on GitHub (Sep 3, 2025).

Originally assigned to: @lhecker on GitHub.

Windows Terminal version

1.23.12371.0

Windows build number

10.0.26100.5074

Other Software

No response

Steps to reproduce

When only a single tab is open, use the context menu to close the tab and the window won't properly exit.

Expected Behavior

Closing the last tab should close the window.

Actual Behavior

Closing the tab using the context menu causes a bugged window to remain.

Image Image
Originally created by @raidhy on GitHub (Sep 3, 2025). Originally assigned to: @lhecker on GitHub. ### Windows Terminal version 1.23.12371.0 ### Windows build number 10.0.26100.5074 ### Other Software _No response_ ### Steps to reproduce When only a single tab is open, use the context menu to close the tab and the window won't properly exit. ### Expected Behavior Closing the last tab should close the window. ### Actual Behavior Closing the tab using the context menu causes a bugged window to remain. <img width="1248" height="629" alt="Image" src="https://github.com/user-attachments/assets/bc8d318f-7fa9-4e74-8c97-4ef5b2c92fbb" /> <img width="1251" height="630" alt="Image" src="https://github.com/user-attachments/assets/bfde660c-f87a-4e09-aabb-0fd50ce1a9d9" />
claunia added the Needs-TriageIssue-BugArea-Windowing labels 2026-01-31 08:46:28 +00:00
Author
Owner

@DHowett commented on GitHub (Sep 4, 2025):

Oh, wow, okay. This doesn't hit all of us, but I got a repro.

There's an exception when handling WM_CLOSE_TERMINAL_WINDOW, on host->Close()


Exception thrown at 0x00007FF95E72B5EC (KernelBase.dll) in WindowsTerminal.exe: WinRT originate error - 0x800F1000 : 'Child collection must not be modified during measure or arrange.'.
C:\__w\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\Windows.UI.Xaml.Hosting.h(101)\WindowsTerminal.exe!00007FF6F852A55B: LogHr(2) tid(a694) 800F1000 No installed components were detected.
    [auto __cdecl winrt::impl::consume_Windows_UI_Xaml_Hosting_IDesktopWindowXamlSource<struct winrt::Windows::UI::Xaml::Hosting::IDesktopWindowXamlSource>::Content(const struct winrt::Windows::UI::Xaml::UIElement &) const]
Exception thrown at 0x00007FF95E72B5EC (KernelBase.dll) in WindowsTerminal.exe: WinRT originate error - 0x800F1000 : 'No installed components were detected.'.
C:\__w\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\Windows.UI.Xaml.Hosting.h(101)\WindowsTerminal.exe!00007FF6F85172DD: LogHr(3) tid(a694) 800F1000 No installed components were detected.
    [auto __cdecl winrt::impl::consume_Windows_UI_Xaml_Hosting_IDesktopWindowXamlSource<struct winrt::Windows::UI::Xaml::Hosting::IDesktopWindowXamlSource>::Content(const struct winrt::Windows::UI::Xaml::UIElement &) const]
Exception thrown at 0x00007FF95E72B5EC in WindowsTerminal.exe: Microsoft C++ exception: winrt::hresult_error at memory location 0x00000084D34FF4E0.

That's a wild one.

@DHowett commented on GitHub (Sep 4, 2025): Oh, wow, okay. This doesn't hit all of us, but I got a repro. There's an exception when handling `WM_CLOSE_TERMINAL_WINDOW`, on `host->Close()` ``` Exception thrown at 0x00007FF95E72B5EC (KernelBase.dll) in WindowsTerminal.exe: WinRT originate error - 0x800F1000 : 'Child collection must not be modified during measure or arrange.'. C:\__w\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\Windows.UI.Xaml.Hosting.h(101)\WindowsTerminal.exe!00007FF6F852A55B: LogHr(2) tid(a694) 800F1000 No installed components were detected. [auto __cdecl winrt::impl::consume_Windows_UI_Xaml_Hosting_IDesktopWindowXamlSource<struct winrt::Windows::UI::Xaml::Hosting::IDesktopWindowXamlSource>::Content(const struct winrt::Windows::UI::Xaml::UIElement &) const] Exception thrown at 0x00007FF95E72B5EC (KernelBase.dll) in WindowsTerminal.exe: WinRT originate error - 0x800F1000 : 'No installed components were detected.'. C:\__w\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\Windows.UI.Xaml.Hosting.h(101)\WindowsTerminal.exe!00007FF6F85172DD: LogHr(3) tid(a694) 800F1000 No installed components were detected. [auto __cdecl winrt::impl::consume_Windows_UI_Xaml_Hosting_IDesktopWindowXamlSource<struct winrt::Windows::UI::Xaml::Hosting::IDesktopWindowXamlSource>::Content(const struct winrt::Windows::UI::Xaml::UIElement &) const] Exception thrown at 0x00007FF95E72B5EC in WindowsTerminal.exe: Microsoft C++ exception: winrt::hresult_error at memory location 0x00000084D34FF4E0. ``` That's a wild one.
Author
Owner

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

Appears to be resolved as of 1.23.12811.0

@raidhy commented on GitHub (Oct 15, 2025): Appears to be resolved as of [1.23.12811.0](https://github.com/microsoft/terminal/releases/tag/v1.23.12811.0)
Author
Owner

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

Wow, I was expecting this to be so much worse. Perhaps it was fixed with #19395? Anyway, I'm not gonna look too hard at that... Thanks!

@DHowett commented on GitHub (Oct 15, 2025): Wow, I was expecting this to be so much worse. Perhaps it was fixed with #19395? Anyway, I'm not gonna look too hard at that... Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23584