Crash on exit after previously closing a pane with non-leaf sibling #1690

Closed
opened 2026-01-30 22:33:50 +00:00 by claunia · 1 comment
Owner

Originally created by @peterdn on GitHub (Jun 15, 2019).

Originally assigned to: @DHowett-MSFT on GitHub.

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.175]
Windows Terminal version (if applicable): master

Steps to reproduce

Open terminal and split the main pane vertically. Then split the left-hand pane horizontally. You should now have 3 panes, named A, B, C shown in the configuration and tree structure below:

+---+---+   1: parent
| A |   |   ├── 2: parent
+---+ B |   |   ├── 3: A
| C |   |   |   └── 4: C
+---+---+   └── 5: B

Now exit pane B, then exit either of panes A or C.

Expected behavior

The second exited pane will close, leaving one pane open.

Actual behavior

Terminal crashes.

More information

I believe this is due to a bug in Pane::_CloseChild where close event handlers are not correctly revoked when the remaining child pane is non-leaf. Proposed fix: #1279

Originally created by @peterdn on GitHub (Jun 15, 2019). Originally assigned to: @DHowett-MSFT on GitHub. <!-- 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. 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.18362.175] Windows Terminal version (if applicable): master ``` # Steps to reproduce Open terminal and split the main pane vertically. Then split the left-hand pane horizontally. You should now have 3 panes, named A, B, C shown in the configuration and tree structure below: ```none +---+---+ 1: parent | A | | ├── 2: parent +---+ B | | ├── 3: A | C | | | └── 4: C +---+---+ └── 5: B ``` Now `exit` pane B, then `exit` either of panes A or C. # Expected behavior The second exited pane will close, leaving one pane open. # Actual behavior Terminal crashes. # More information I believe this is due to a bug in Pane::_CloseChild where close event handlers are not correctly revoked when the remaining child pane is non-leaf. Proposed fix: #1279
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 3, 2019):

Hey, thanks for identifying and fixing this bug. This was just submitted to the store with the v0.2.1831.0 servicing release. It may take some time for the store to process it.

@DHowett-MSFT commented on GitHub (Jul 3, 2019): Hey, thanks for identifying and fixing this bug. This was just submitted to the store with the v0.2.1831.0 servicing release. It may take some time for the store to process it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1690