microsoft / terminal

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

Ghostly 'Close' button hovering on my Desktop #16100

Closed strangebit closed 7 months ago

strangebit commented 11 months ago

Windows Terminal version

1.18.2681.0

Windows build number

10.0.19045.0

Other Software

No response

Steps to reproduce

I'm not sure what's triggering it unfortunately.

Expected Behavior

No response

Actual Behavior

Ever since v1.18.2681.0, I've been getting this issue every day. I never notice when it actually appears, but eventually I notice a ghostly 'Close' button hovering on my Desktop, and it appears to be something attached to Windows Terminal. In the taskbar, I can see it's attached to Windows Terminal and it has the title Pop-upHost. If I try to select it, I get a WindowsTerminal.exe is not responding, and closing it closes my Windows Terminal.

Windows Terminal appears to work fine if I just leave it alone though.

Taskbar:

WT_Taskbar_Pop-upHost

Button over desktop:

Ghostly_Close

Using NirSoft GUIPropView to inspect two different Pop-upHost handles (red sections redacted):

GUIPropView_Pop-upHost_1

GUIPropView_Pop-upHost_2

The process (i.e. 13F0) for the second one is Desktop Window Manager (dwm.exe).

strangebit commented 11 months ago

It appears to be coming from the X button tooltip, as seen here:

close_tooltip

They look the same, and I've verified that a new Popup-Host handle appears in the GUIPropView list when I mouse over the X button, and then disappears when I move the mouse again. Somehow the handles are going rogue and sticking around?

Also I've noticed the ghost ones sometimes go away on their own when I launch a new terminal window, but not always.

EDIT: Just in case it's relevant, I'm also getting #12882. I just took the screenshot before the bottom tooltip appeared.

zadjii-msft commented 11 months ago

Okay I've got a horrifying thought. This might be related to us refrigerating the old windows, stopping pumping their messages, but leaving them around. I'd bet this only happens when you close one terminal window while another Terminal window is still open.

Can you go install this old Terminal Preview version: https://github.com/microsoft/terminal/releases/tag/v1.18.1421.0/? This is the original Terminal 1.18 Preview that didn't have the window thread refrigeration code. If that doesn't repro this, then I'd bet we could narrow it down to that.

strangebit commented 11 months ago

All right sounds good. I'm not going to be around for the next few days but I'll let you know after that.

strangebit commented 10 months ago

As discussed, I've been using Terminal Preview v1.18.1421.0 for a few days now and I haven't experienced the issue on it yet.

strangebit commented 10 months ago

Yesterday, I switched back to v1.18.2822.0 to see if it was still happening on the latest version, and I did encounter it again, but only at the very end of a long day. I think it was after I closed one of the windows, which suggests you could be right @zadjii-msft , however it defintely doesn't happen every time I close a window with another window still open, and I had opened and closed many windows that day.

Managed to get a video of another bug I've been noticing too, since I've been paying attention: #16211. I'm not sure if that's related to this issue or not, but it feels like it crops up about as frequently, i.e. after opening and closing windows and using Terminal for a while, etc. I can't remember if I ever saw it when I was using Preview v1.18.1421.0 last week though. I'm going to switch back to Preview v1.18.1421.0 again now, and I'll keep and eye out again for if this issue or #16211 ever occurs on it.

j0eii commented 10 months ago

experiencing the same issue image image

RKS-labs commented 10 months ago

Also experienced this on v1.18.2822.0 (Windows 10) with three WT instances and two "PopupHost" close buttons. Attempting to close one of the buttons through the taskbar popped up a "not responding" dialog and killed all three instances of WT.

acorderob commented 10 months ago

I also got this "popuphost" window (with v1.18.2822.0 Win10). And it did happen after i closed a second terminal.

wumo commented 10 months ago

Also have this issue: image

RKS-labs commented 9 months ago

I got around this by keep opening new WT instances until all buttons were gone, then exiting from the command line one by one.

alesandroortiz commented 9 months ago

I've had this occur for a few weeks, multiple times per day. I've also seen it occur with a Maximize tooltip. I have not changed my config recently, so it's not related to that. Currently running Terminal version 1.18.2822.0 on Windows 10 Version 22H2 (Build 19045.3570). I'm also using PowerToys v0.75.1, in case that matters. (I did update PowerToys in the past few weeks.)

Kaexzr commented 9 months ago

I have the same issue. Version 1.18.2822.0 It seems to happen more often when I unplug my 2 external monitors from work to go home. But it could be pure coincidence. If I terminate that process, all instances of Windows Terminal close, therefore some times I end up with the frozen pop up for days, while I don't cant to close all terminals I have open.

image

image

PhilipMorrisJones commented 9 months ago

Same here. I can get to the close button but if I do so it kills all my open tabs and I have a dozen open ssh sessions so I just accumulate these over time.

image

image

image

xLiWHOI commented 7 months ago

Same issue here. Have to press "Ctrl+d" now to close tabs/windows.

gabbymouth commented 7 months ago

Same issue with both of my computers. This is a PITA because it makes it more difficult to minimize and un-minimize wt to the win 10 taskbar.

zadjii-msft commented 7 months ago

Hey we think this was fixed in the latest release - can someone try out the newest 1.19 / 1.20 builds and double check?

Kaexzr commented 7 months ago

I just upgraded to 1.19.10302.0, I will test and report in a few days.

PhilipMorrisJones commented 7 months ago

Hi @zadjii-msft, do you have a commit ID or issue where the fix was made?

zadjii-msft commented 7 months ago

I'm guessing it was one of

All of those improved the way window refrigeration was done, and I've got a hypothesis that together, they avoid the issue at the root of this thread.

Kaexzr commented 5 months ago

Just an update for anyone interested, 1.19.10302.0 did in fact solve the issue for me.

j0eii commented 5 months ago

havent seen this a while i guess it is fixed