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

[Canary]: Tab tear-off leads to crash #17032

Closed
tusharsnx opened this issue Apr 9, 2024 · 5 comments · Fixed by #17069
Closed

[Canary]: Tab tear-off leads to crash #17032

tusharsnx opened this issue Apr 9, 2024 · 5 comments · Fixed by #17069
Labels
Area-Windowing Window frame, quake mode, tearout Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree. Severity-Crash Crashes are real bad news.

Comments

@tusharsnx
Copy link
Contributor

Windows Terminal version

1.21.991.0

Windows build number

10.0.22631.0

Other Software

No response

Steps to reproduce

  1. Open Windows Terminal Canary.
  2. Try tearing off a tab.

Expected Behavior

The tab is opened in a new WT window.

Actual Behavior

WT crashes.

@tusharsnx tusharsnx added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Apr 9, 2024
@tusharsnx
Copy link
Contributor Author

In debug build on main, Closing a tab with the "❌" button also leads to the same crashing behavior. This is not reproducible on the latest Canary build (maybe due to release vs debug build?)

@tusharsnx
Copy link
Contributor Author

tusharsnx commented Apr 9, 2024

Exception: Unhandled exception at 0x00007FFDD7FBEBDF (ntdll.dll) in WindowsTerminal.exe: Indirect call guard check detected invalid control transfer.

The exception is thrown at this if's scope exit:

Screenshot 2024-04-09 194231

image

@lhecker
Copy link
Member

lhecker commented Apr 9, 2024

Indirect call guard check detected invalid control transfer.

Hmm, this is just a hunch, and I apologize for your SSD 😣, but could you try cleaning the entire solution and building it again?

image

Some of us had this issue happen before and back then it could be resolved with a clean build. My suspicion is that the build system doesn't properly invalidate some compiled objects which results in mismatched vtables.

@tusharsnx
Copy link
Contributor Author

@lhecker Thanks for the info. I'll try doing a clean build next time.

I'm also curious why Canary might crash on tab tear-off 🤔

@carlos-zamora carlos-zamora added this to the Terminal v1.21 milestone Apr 10, 2024
@carlos-zamora carlos-zamora added Severity-Crash Crashes are real bad news. Product-Terminal The new Windows Terminal. Area-Windowing Window frame, quake mode, tearout Priority-1 A description (P1) and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Apr 10, 2024
@zadjii-msft
Copy link
Member

FWIW I can repro the tear-off crash on my own canary 21.991 (and after upgrading, my 21.1011) here as well. So, it's definitely not just a clean build problem.

@zadjii-msft zadjii-msft added the Severity-Blocking We won't ship a release like this! No-siree. label Apr 15, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 16, 2024
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.
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Windowing Window frame, quake mode, tearout Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree. Severity-Crash Crashes are real bad news.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants