Content sometimes disappears when moving back to Terminal window #3834

Open
opened 2026-01-30 23:31:06 +00:00 by claunia · 13 comments
Owner

Originally created by @wazzamatazz on GitHub (Sep 12, 2019).

Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.4.2382.0

Any other software?

Steps to reproduce

Can't reproduce consistently, but sometimes, when I navigate back to Windows Terminal from another window, the content of the Terminal window completely disappears and the window becomes transparent.

image

I'm using PowerShell Core, and I typically find that the problem occurs after running an npm script. Sometimes, if I hit up and then Enter, the previous command re-runs and the window returns to normal. On other occasions, this seems to have no effect.

Originally created by @wazzamatazz on GitHub (Sep 12, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 0.4.2382.0 Any other software? ``` # Steps to reproduce Can't reproduce consistently, but sometimes, when I navigate back to Windows Terminal from another window, the content of the Terminal window completely disappears and the window becomes transparent. ![image](https://user-images.githubusercontent.com/7179614/64783745-3c3a8680-d571-11e9-852b-fc384117c519.png) I'm using PowerShell Core, and I typically find that the problem occurs after running an `npm` script. Sometimes, if I hit up and then Enter, the previous command re-runs and the window returns to normal. On other occasions, this seems to have no effect.
Author
Owner

@zadjii-msft commented on GitHub (Sep 12, 2019):

That's certainly curious. What kind of GPU set up do you have?

I don't think that this is a Xaml Islands bug, since other XAML content is being drawn. Only the Terminal pane is gone, which makes me think it's in the DxRenderer / SwapChainPanel stack.

cc @miniksa since he might be able to ask better questions

@zadjii-msft commented on GitHub (Sep 12, 2019): That's certainly curious. What kind of GPU set up do you have? I don't think that this is a Xaml Islands bug, since other XAML content is being drawn. Only the Terminal pane is gone, which makes me think it's in the DxRenderer / SwapChainPanel stack. cc @miniksa since he might be able to ask better questions
Author
Owner

@zadjii-msft commented on GitHub (Sep 12, 2019):

Holy crap I just had this happen to me too, on a Surface Laptop. I even had two panes open, and both panes and the separator had disappeared.

I'm now worried that this might have something to do with window messaging and us re-laying out the client content. Hopefully we can use this to get a consistent repro.

@zadjii-msft commented on GitHub (Sep 12, 2019): Holy crap I just had this happen to me too, on a Surface Laptop. I even had two panes open, and _both_ panes and the separator had disappeared. I'm now worried that this might have something to do with window messaging and us re-laying out the client content. Hopefully we can use this to get a consistent repro.
Author
Owner

@ramsay-vibes commented on GitHub (Sep 12, 2019):

I can confirm that I've seen this issue about three times in the last few days on version 0.4.2382.0. The only other information that I can provide is:

[1] Had about four Command Prompt tabs open.
[2] Had one Ubuntu tab open.
[3] Was unable to click on any of the tabs, the foreground window was as reported above.

However, after the second time that this occurred, I found a workaround: The + and down-arrow buttons were active, so I opened a new Command Prompt and everything restored itself. That is, the window repainted and all of the other tabs became active and I could navigate as per normal.

@ramsay-vibes commented on GitHub (Sep 12, 2019): I can confirm that I've seen this issue about three times in the last few days on version 0.4.2382.0. The only other information that I can provide is: [1] Had about four Command Prompt tabs open. [2] Had one Ubuntu tab open. [3] Was **unable** to click on any of the tabs, the foreground window was as reported above. However, after the second time that this occurred, I found a workaround: The `+` and `down-arrow` buttons were active, so I opened a new Command Prompt and everything restored itself. That is, the window repainted and all of the other tabs became active and I could navigate as per normal.
Author
Owner

@wazzamatazz commented on GitHub (Sep 12, 2019):

That's certainly curious. What kind of GPU set up do you have?

I don't think that this is a Xaml Islands bug, since other XAML content is being drawn. Only the Terminal pane is gone, which makes me think it's in the DxRenderer / SwapChainPanel stack.

cc @miniksa since he might be able to ask better questions

I'm using an Intel HD 630 GPU (Dell XPS 15 9560). I also have a discrete NVidia GTX 1050, so I will try switching to that and see if I can recreate it.

@wazzamatazz commented on GitHub (Sep 12, 2019): > > > That's certainly curious. What kind of GPU set up do you have? > > I don't think that this is a Xaml Islands bug, since other XAML content is being drawn. Only the Terminal pane is gone, which makes me think it's in the DxRenderer / SwapChainPanel stack. > > cc @miniksa since he might be able to ask better questions I'm using an Intel HD 630 GPU (Dell XPS 15 9560). I also have a discrete NVidia GTX 1050, so I will try switching to that and see if I can recreate it.
Author
Owner

@miniksa commented on GitHub (Sep 12, 2019):

If this goes away when the window is:

  • maximized
  • minimized
  • restored
  • resized
  • a new line is entered
  • a selection is started

Then my theory is that one of the pieces of the DirectX pipeline bought the farm and we don't realize it until the next regularly scheduled repaint. We probably need to increase the error handling/detection of some of the DX objects and trigger a full redraw when they go away.

@miniksa commented on GitHub (Sep 12, 2019): If this goes away when the window is: - maximized - minimized - restored - resized - a new line is entered - a selection is started Then my theory is that one of the pieces of the DirectX pipeline bought the farm and we don't realize it until the next regularly scheduled repaint. We probably need to increase the error handling/detection of some of the DX objects and trigger a full redraw when they go away.
Author
Owner

@wazzamatazz commented on GitHub (Sep 13, 2019):

Just happened again. The minimize/maximize/close buttons are unavailable when it happens - they disappear from the window. However, the new tab button was still active, and everything came back to life when I opened a new tab.

@wazzamatazz commented on GitHub (Sep 13, 2019): Just happened again. The minimize/maximize/close buttons are unavailable when it happens - they disappear from the window. However, the new tab button was still active, and everything came back to life when I opened a new tab.
Author
Owner

@ramsay-vibes commented on GitHub (Sep 13, 2019):

As @wazzamatazz mentions above about the min/max/close buttons being unavailable (not displayed) when this issue exhibits, that jogged my memory and that is another symptom that I too have experienced.

@ramsay-vibes commented on GitHub (Sep 13, 2019): As @wazzamatazz mentions above about the min/max/close buttons being unavailable (not displayed) when this issue exhibits, that jogged my memory and that is another symptom that I too have experienced.
Author
Owner

@filip-hejsek commented on GitHub (Sep 15, 2019):

I found a reliable way to reproduce this issue - minimize the terminal when a new tab is openning. You can do this by clicking on the + icon and immediately pressing Win+D

@filip-hejsek commented on GitHub (Sep 15, 2019): I found a reliable way to reproduce this issue - minimize the terminal when a new tab is openning. You can do this by clicking on the `+` icon and immediately pressing <kbd>Win</kbd>+<kbd>D</kbd>
Author
Owner

@dsafa commented on GitHub (Sep 18, 2019):

Ran into this too. From initial testing using the above reproduction steps, it only occurs with the non client window so that's a good place to start looking.

@dsafa commented on GitHub (Sep 18, 2019): Ran into this too. From initial testing using the above reproduction steps, it only occurs with the non client window so that's a good place to start looking.
Author
Owner

@dsafa commented on GitHub (Sep 19, 2019):

I figured out the issue. The non client window applies a window region to the xaml island to expose the caption area. The region is updated when the window is resized or the tab area size changes. If this is happening while the window is minimized, the small window size causes the region to be calculated as a rectangle that only exposes part of the tab area, hiding everything else.

WindowsTerminal_qEaqScGrhp

Here you can see the shape of the window region. The red area is painted in the host window.

WindowsTerminal_xpm10oZSel

Here is the window region when it messes up. It only shows a small area of the tab bar. Not sure if these images illustrate the issue properly.

The only thing I'm not sure of is how this issue occurs when just switching between windows since that shouldn't cause a size change and the only cause I know for now is from minimizing. Maybe this is a different issue, but it looks the same to me.

@dsafa commented on GitHub (Sep 19, 2019): I figured out the issue. The non client window applies a window region to the xaml island to expose the caption area. The region is updated when the window is resized or the tab area size changes. If this is happening while the window is minimized, the small window size causes the region to be calculated as a rectangle that only exposes part of the tab area, hiding everything else. ![WindowsTerminal_qEaqScGrhp](https://user-images.githubusercontent.com/7334282/65263330-40125f80-dac1-11e9-8346-0ce963e4c78b.png) Here you can see the shape of the window region. The red area is painted in the host window. ![WindowsTerminal_xpm10oZSel](https://user-images.githubusercontent.com/7334282/65263542-b31bd600-dac1-11e9-9705-15826f6d0799.png) Here is the window region when it messes up. It only shows a small area of the tab bar. Not sure if these images illustrate the issue properly. The only thing I'm not sure of is how this issue occurs when just switching between windows since that shouldn't cause a size change and the only cause I know for now is from minimizing. Maybe this is a different issue, but it looks the same to me.
Author
Owner

@filip-hejsek commented on GitHub (Sep 19, 2019):

You are right - the issue occurs if the size of the tab area changes while the window is minimized. This also happens when some program changes the tab title.

sleep 3; echo -en "\033]0;x\a"; read -sN 1

Running this script in wsl, minimizing the window, waiting a few seconds and restoring the window causes the content to disappear because the title is changed to "x". Pressing any key then changes the title back which causes the content to reappear.

@filip-hejsek commented on GitHub (Sep 19, 2019): You are right - the issue occurs if the size of the tab area changes while the window is minimized. This also happens when some program changes the tab title. ```bash sleep 3; echo -en "\033]0;x\a"; read -sN 1 ``` Running this script in wsl, minimizing the window, waiting a few seconds and restoring the window causes the content to disappear because the title is changed to "x". Pressing any key then changes the title back which causes the content to reappear.
Author
Owner

@wazzamatazz commented on GitHub (Sep 20, 2019):

You are right - the issue occurs if the size of the tab area changes while the window is minimized. This also happens when some program changes the tab title.

sleep 3; echo -en "\033]0;x\a"; read -sN 1

Running this script in wsl, minimizing the window, waiting a few seconds and restoring the window causes the content to disappear because the title is changed to "x". Pressing any key then changes the title back which causes the content to reappear.

This probably makes sense with what I was seeing as well - I was running into the problem when running npm commands, which change the title at the start and end of the operation.

@wazzamatazz commented on GitHub (Sep 20, 2019): > > > You are right - the issue occurs if the size of the tab area changes while the window is minimized. This also happens when some program changes the tab title. > > ```shell > sleep 3; echo -en "\033]0;x\a"; read -sN 1 > ``` > > Running this script in wsl, minimizing the window, waiting a few seconds and restoring the window causes the content to disappear because the title is changed to "x". Pressing any key then changes the title back which causes the content to reappear. This probably makes sense with what I was seeing as well - I was running into the problem when running `npm` commands, which change the title at the start and end of the operation.
Author
Owner

@mh-mazen commented on GitHub (Oct 22, 2019):

image

Issue Still Occurring on the latest preview as well

@mh-mazen commented on GitHub (Oct 22, 2019): ![image](https://user-images.githubusercontent.com/35299529/67285159-bac70400-f4df-11e9-9726-868e9aa64639.png) Issue Still Occurring on the latest preview as well
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3834