Skip to content

Fix single-tab window tear-off crash - #17251

Merged
Dustin L. Howett (DHowett) merged 3 commits into
microsoft:mainfrom
tusharsnx:fix-single-tab-window-tear-off
May 13, 2024
Merged

Dustin L. Howett (DHowett) merged 3 commits into
microsoft:mainfrom
tusharsnx:fix-single-tab-window-tear-off

Conversation

@tusharsnx

@tusharsnx Tushar Singh (tusharsnx) commented May 12, 2024 •

Copy link
Copy Markdown
Contributor

Validation Steps Performed

  • Opened multi-tab terminal window with Narrator. Narrator can read characters from the tabs.
  • Started a drag and drop (tear-off) of a tab, and it didn't crash. This was repeated multiple times.

// Doing so makes us return nullptr when XAML requests an automation peer.
// Instead, we need to give XAML an automation peer, then fix it later.
if (!_IsClosing())
if (!_IsClosing() && !_detached)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to instead check for !_interactivity since it's used below?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When termcontrol isn't detached or closing we expect _interactivity to be non-null, no?

Given #10971 has happened in the past, I think THROW_HR_IF_NULL(E_UNEXPECTED, _interactivity) is better suited.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with this for now

@tusharsnx

Copy link
Copy Markdown
Contributor Author

Unlinked #17246 because this doesn't fix all the issues mentioned in that thread.

@zadjii-msft Mike Griese (zadjii-msft) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@DHowett
Dustin L. Howett (DHowett) added this pull request to the merge queue May 13, 2024
Merged via the queue into microsoft:main with commit 30ef1f4 May 13, 2024
Dustin L. Howett (DHowett) pushed a commit that referenced this pull request May 13, 2024
## Validation Steps Performed
- Opened multi-tab terminal window with Narrator. Narrator can read
characters from the tabs.
- Started a drag and drop (tear-off) of a tab, and it didn't crash. This
was repeated multiple times.

(cherry picked from commit 30ef1f4)
Service-Card-Id: 92546868
Service-Version: 1.20
Dustin L. Howett (DHowett) pushed a commit that referenced this pull request May 13, 2024
## Validation Steps Performed
- Opened multi-tab terminal window with Narrator. Narrator can read
characters from the tabs.
- Started a drag and drop (tear-off) of a tab, and it didn't crash. This
was repeated multiple times.

(cherry picked from commit 30ef1f4)
Service-Card-Id: 92546869
Service-Version: 1.21
@tusharsnx
Tushar Singh (tusharsnx) deleted the fix-single-tab-window-tear-off branch May 20, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

4 participants