microsoft / terminal

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

Random blue-ish squares appear on screen #13640

Closed asineth0 closed 2 years ago

asineth0 commented 2 years ago

Windows Terminal version

1.14.1963.0

Windows build number

10.0.22000.795

Other Software

GPU: AMD Radeon 5700 XT GPU Driver: 31.0.12015.2001 (7/13/2022)

I can confirm this happens with no other apps open.

Steps to reproduce

Open Microsoft Terminal, and wait a few minutes. Minimizing and unminimizing the window makes a different set of squares appear in the bottom left of the screen.

Expected Behavior

No squares should be randomly rendered to the screen.

Actual Behavior

The square that appears in the top-left of the window:

image

The squares that appear in the bottom left of my screen when the window is minimized:

image

zadjii-msft commented 2 years ago

Is there any sort of overlay software that's running as a part of your graphics card/? Those boxes don't look like anything the Terminal would ever draw on its own...

This vaguely reminds me of those NVidia ShadowPlay threads - but obviously not the case here.

Maybe something like:

237dmitry commented 2 years ago

Try to play with:

experimental.rendering.forceFullRepaint true or false (default) experimental.rendering.software true or false (default)

asineth0 commented 2 years ago

I've tested with all possible combinations of those two options and the issue still remains. I think it may only happen with more than one tab if that helps.

zadjii-msft commented 2 years ago

For what it's worth, those experimental rendering settings don't hot-reload (from what I remember). You'd need to open a new tab.

I think it may only happen with more than one tab if that helps.

That's weird for sure. Does that box stay aligned with the top left of the Terminal window, as you move the Terminal window around/?

You might be able to use WinSpy to figure out what that box is, if it's an actual HWND. Use the little finder tool to drag over that box. I'll be stumped if that doesn't find some sort of HWND there (other than the Terminal)

DHowett commented 2 years ago

@zadjii-msft those look like pseudowindows...!

In the old days, when you minimized something it actually became Iconic. Like, the window itself changed to rendering just an icon and a name.

After the old days, windows became very tiny. In Windows 95, if you killed Explorer you would see stacks of minimized windows, 60x16 pixels wide, accumulated at the bottom of the screen.

This looks like what might happen if you make a pseudoconsole window visible and minimize it....

DHowett commented 2 years ago

@asineth0 are you using any third party window management software?

asineth0 commented 2 years ago

I did a bit of testing and can confirm it goes away with software rendering. Had to completely close out Terminal and reopen it for it to be fixed.

In terms of window management software, the only one I have installed is PowerToys (not sure if that counts). I tested with it uninstalled and the issue persisted.

DHowett commented 2 years ago

Wow, I'm baffled. All of the regions you pointed out are outside the part of Terminal to which software rendering even applies.

Thanks for testing!

zadjii-msft commented 2 years ago

confirm it goes away with software rendering

That kinda backs up my theory that this is a graphics card issue. Switching to software rendering got the GPU and any other software out of the way, and the problem went away?

Not sure how we wanna go about this one. We don't' have the hardware to repro and ID the root cause ourselves, and you've got a viable workaround - you okay if we close this out?

asineth0 commented 2 years ago

Yeah, that's fine.

asineth0 commented 2 years ago

Update: it seems to be happening again even with software rendering. For what it's worth, this is also happening on my laptop which has vastly different specs (Intel i7-5600U & HD 5500).

zadjii-msft commented 2 years ago

Huh. Well, then, I would definitely recommend the WinSpy investigation from earlier. That would definitely give us a strong finger to point at whatever is responsible here.

ghost commented 2 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

zadjii-msft commented 2 years ago

Holy shit I've got a live repro, at least temporarily. It's on my slaptop, no external displays, rs_wdx_dxp.220811. It's almost definitely a pseudoconsole window, and it's positioned at (0,0)-(18,18), and it's WS_VISIBLE (full styles is 0x94cf0000).

Look real carefully, it's the window frame corners: image image

Minimizing the terminal makes the box disappear, and restoring brings it back. Only flag it toggles here is WS_MINIMIZE.

I wonder how we got WS_VISIBLE. We shouldn't ever get that, and we should like, always just suppress that.

asineth0 commented 2 years ago

Great! Was starting to think I was crazy since I couldn't pick it up with WinSpy (I probably just don't know what I'm doing lol).

It stopped happening for a few days, but came back. Now I can actually see a window close button.

When not minimized:

dWJ1wASJBJ

When minimized:

explorer_k803gjmQ5Q

zadjii-msft commented 2 years ago

You know what, we've gotten enough feedback at this point that I'm pretty confident that this and #13388 are actually the same thing, just different symptoms. I'll use that thread for tracking. Thanks!

/dup #13388

ghost commented 2 years ago

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

asineth0 commented 4 months ago

This is still an issue as of 05/14/24 on the latest version. Often happens with any terminal I leave open maximized, doesn't happen with windows that are just floating.