microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.27k stars 8.27k forks source link

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

Closed tusharsnx closed 6 months ago

tusharsnx commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

@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 🤔

zadjii-msft commented 6 months ago

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.