move-pane -t (existing tab) now crashes #14967

Closed
opened 2026-01-31 04:24:34 +00:00 by claunia · 6 comments
Owner

Originally created by @DHowett on GitHub (Aug 25, 2021).

Originally assigned to: @zadjii-msft on GitHub.

This may have regressed with #10982 or other Pane changes, since I don't believe the original code from @Rosefield was broken.

Originally created by @DHowett on GitHub (Aug 25, 2021). Originally assigned to: @zadjii-msft on GitHub. This may have regressed with #10982 or other Pane changes, since I don't believe the original code from @Rosefield was broken.
Author
Owner

@DHowett commented on GitHub (Aug 25, 2021):

@zadjii-msft unlike the other one (#11035), this one I will mark blocking 😄

@DHowett commented on GitHub (Aug 25, 2021): @zadjii-msft unlike the other one (#11035), this one I will mark blocking :smile:
Author
Owner

@DHowett commented on GitHub (Aug 25, 2021):

Call stack puts us in IControl::Focus, which might make it related to #10978?

@DHowett commented on GitHub (Aug 25, 2021): Call stack puts us in `IControl::Focus`, which might make it related to #10978?
Author
Owner

@DHowett commented on GitHub (Aug 25, 2021):

@zadjii-msft okay, this only happens when I use commandline mode to mp -t directly, because doing ExecuteCommandLine does another ProcessStartupActions . . .

@DHowett commented on GitHub (Aug 25, 2021): @zadjii-msft okay, this only happens when I use commandline mode to `mp -t` directly, because doing `ExecuteCommandLine` does another `ProcessStartupActions` . . .
Author
Owner

@Rosefield commented on GitHub (Aug 25, 2021):

In my attempts to reproduce, it looks like the issue is when you move the last pane from a tab to another tab, and GetActiveControl returns null because there is no longer a control on the tab being destroyed.

This follows from my decision to null out the member here: https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalApp/TerminalTab.cpp#L531. The cheap fix is to just wrap the _GetActiveControl with a if (const auto control = _GetActiveControl()) ..., but the better one is probably to change those lines since I bet they violate some expectations about when a control should exist, like seen here.

@Rosefield commented on GitHub (Aug 25, 2021): In my attempts to reproduce, it looks like the issue is when you move the last pane from a tab to another tab, and GetActiveControl returns null because there is no longer a control on the tab being destroyed. This follows from my decision to null out the member here: https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalApp/TerminalTab.cpp#L531. The cheap fix is to just wrap the `_GetActiveControl` with a `if (const auto control = _GetActiveControl()) ...`, but the better one is probably to change those lines since I bet they violate some expectations about when a control should exist, like seen here.
Author
Owner

@ghost commented on GitHub (Aug 31, 2021):

:tada:This issue was addressed in #11040, which has now been successfully released as Windows Terminal Preview v1.10.2383.0.🎉

Handy links:

@ghost commented on GitHub (Aug 31, 2021): :tada:This issue was addressed in #11040, which has now been successfully released as `Windows Terminal Preview v1.10.2383.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.10.2383.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Aug 31, 2021):

:tada:This issue was addressed in #11040, which has now been successfully released as Windows Terminal Preview v1.11.2421.0.🎉

Handy links:

@ghost commented on GitHub (Aug 31, 2021): :tada:This issue was addressed in #11040, which has now been successfully released as `Windows Terminal Preview v1.11.2421.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.11.2421.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14967