Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong CommandPallete access #17069

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

tusharsnx
Copy link
Contributor

Closes: #17032

We were wrongly calling the Ctor of CommandPalette which led to the creation of an uninitialized winrt command palette object, and then OnCreateAutomationPeer() was called on that. This seems to be the cause of #17032.

Validation Steps Performed

  • Open WT.
  • Try to tear off a tab out of the tab headers view.
  • WT doesn't crash.

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

thanks!!

@DHowett
Copy link
Member

DHowett commented Apr 16, 2024

Do you by chance know when this regressed?

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

Should we just rename CommandPalette in TerminalPage.xaml to AHHH_DONT_CALL_ME_DIRECTLY_CommandPalette, so that we catch anything else like this?

@tusharsnx
Copy link
Contributor Author

tusharsnx commented Apr 16, 2024

Do you by chance know when this regressed?

I think it was #15313 which reverted some code that used CommandPalette() prior to #15203. The latter renamed the CommandPalette component to its current name.

The timing was just prefect 😅

@zadjii-msft zadjii-msft added this pull request to the merge queue Apr 16, 2024
Merged via the queue into microsoft:main with commit d632c39 Apr 16, 2024
15 checks passed
@tusharsnx tusharsnx deleted the fix-tab-tearoff-crash branch April 22, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Canary]: Tab tear-off leads to crash
3 participants