Lines randomly disappear when switching between panes #12635

Open
opened 2026-01-31 03:20:45 +00:00 by claunia · 11 comments
Owner

Originally created by @Don-Vito on GitHub (Feb 18, 2021).

Environment

Main development branch

Steps to reproduce

  1. Enable FFM mode (not sure if required)
  2. Open a Windows Powershell tab with two panes
  3. In repro scenario, the panes contain a link (not sure if required)
  4. Move the mouse from one pane to another

Expected behavior

The panes get focus, the links get underlined / de-underlined.

Actual behavior

Randomly some lines disappear from a pane and reappear after some hovering (see below)

DisappearingLine

My guess it is somehow related to us triggering redraw upon pointer move / exit.

Not sure if it is correlated but I also get a log of messages like this.

C:\Users\...\Documents\GitHub\terminal\src\renderer\base\renderer.cpp(185)\TerminalControl.dll!00007FFB299C87C1: (caller: 00007FFB298CD2CC) ReturnHr(15) tid(904) 80004004 Operation aborted
    Msg:[C:\Users\vikhait\Documents\GitHub\terminal\src\inc\til\rectangle.h(839)\TerminalControl.dll!00007FFB29703A6B: (caller: 00007FFB298D0480) Exception(15) tid(904) 80004004 Operation aborted
    [til::rectangle::operator struct _SMALL_RECT(!base::MakeCheckedNum(left()).AssignIfValid(&ret.Left))]
] [Microsoft::Console::Render::Renderer::_PaintFrameForEngine]

and this

C:\Users\...\Documents\GitHub\terminal\src\renderer\dx\DxRenderer.cpp(1468)\TerminalControl.dll!00007FFB298E2BA8: (caller: 00007FFB298CF273) LogHr(349) tid(904) 80070102 The wait operation timed out.
    Msg:[Waiting for swap chain frame latency waitable object returned error or timeout.] [Microsoft::Console::Render::DxEngine::WaitUntilCanRender(ret)]

where the WaitForSingleObjectEx on _swapChainFrameLatencyWaitableObject within DxEngine::WaitUntilCanRender() gets STATUS_TIMEOUT.

Originally created by @Don-Vito on GitHub (Feb 18, 2021). # Environment Main development branch # Steps to reproduce 1. Enable FFM mode (not sure if required) 2. Open a Windows Powershell tab with two panes 3. In repro scenario, the panes contain a link (not sure if required) 3. Move the mouse from one pane to another # Expected behavior The panes get focus, the links get underlined / de-underlined. # Actual behavior Randomly some lines disappear from a pane and reappear after some hovering (see below) ![DisappearingLine](https://user-images.githubusercontent.com/4639110/108351983-e6025600-71ee-11eb-8a84-02b338e179a4.gif) My guess it is somehow related to us triggering redraw upon pointer move / exit. Not sure if it is correlated but I also get a log of messages like this. ``` C:\Users\...\Documents\GitHub\terminal\src\renderer\base\renderer.cpp(185)\TerminalControl.dll!00007FFB299C87C1: (caller: 00007FFB298CD2CC) ReturnHr(15) tid(904) 80004004 Operation aborted Msg:[C:\Users\vikhait\Documents\GitHub\terminal\src\inc\til\rectangle.h(839)\TerminalControl.dll!00007FFB29703A6B: (caller: 00007FFB298D0480) Exception(15) tid(904) 80004004 Operation aborted [til::rectangle::operator struct _SMALL_RECT(!base::MakeCheckedNum(left()).AssignIfValid(&ret.Left))] ] [Microsoft::Console::Render::Renderer::_PaintFrameForEngine] ``` and this ``` C:\Users\...\Documents\GitHub\terminal\src\renderer\dx\DxRenderer.cpp(1468)\TerminalControl.dll!00007FFB298E2BA8: (caller: 00007FFB298CF273) LogHr(349) tid(904) 80070102 The wait operation timed out. Msg:[Waiting for swap chain frame latency waitable object returned error or timeout.] [Microsoft::Console::Render::DxEngine::WaitUntilCanRender(ret)] ``` where the `WaitForSingleObjectEx` on `_swapChainFrameLatencyWaitableObject` within `DxEngine::WaitUntilCanRender()` gets `STATUS_TIMEOUT`.
Author
Owner

@zadjii-msft commented on GitHub (Feb 18, 2021):

what the heck...?

Which commit are you on exactly (EDIT: looks like eb34993)? That's mostly just for reference to see if anything specific got committed recently. I can't get it to repro on Version: 1.7.413.0 without FFM, but I'm not sure that build even has FFM.

Dang Renderer.cpp:185 is just the generic catch-all for the render frame

@zadjii-msft commented on GitHub (Feb 18, 2021): what the _heck_...? Which commit are you on exactly (EDIT: looks like eb34993)? That's mostly just for reference to see if anything specific got committed recently. I can't get it to repro on Version: 1.7.413.0 _without FFM_, but I'm not sure that build even has FFM. Dang `Renderer.cpp:185` is just the generic catch-all for the render frame
Author
Owner

@Don-Vito commented on GitHub (Feb 18, 2021):

I am using the current main. This can be related to me adding De-underlining hyperlinks yesterday, that might trigger extra redraw.

@Don-Vito commented on GitHub (Feb 18, 2021): I am using the current main. This can be related to me adding De-underlining hyperlinks yesterday, that might trigger extra redraw.
Author
Owner

@zadjii-msft commented on GitHub (Feb 18, 2021):

I'm gonna /cc @miniksa since he's always interested in weird renderer error messages like that.

@Don-Vito you mind if I assign you since you've got the live repro (and are literally updating this post as I reply 😛)?

@zadjii-msft commented on GitHub (Feb 18, 2021): I'm gonna /cc @miniksa since he's always interested in weird renderer error messages like that. @Don-Vito you mind if I assign you since you've got the live repro (and are literally updating this post as I reply 😛)?
Author
Owner

@Don-Vito commented on GitHub (Feb 18, 2021):

I'm gonna /cc @miniksa since he's always interested in weird renderer error messages like that.

@Don-Vito you mind if I assign you since you've got the live repro (and are literally updating this post as I reply 😛)?

Opened this ticket as I have no clue in rendering 😊 I will be glad to continue researching it.. but I guess it might be not that efficient 😄

@Don-Vito commented on GitHub (Feb 18, 2021): > > > I'm gonna /cc @miniksa since he's always interested in weird renderer error messages like that. > > @Don-Vito you mind if I assign you since you've got the live repro (and are literally updating this post as I reply 😛)? Opened this ticket as I have no clue in rendering :blush: I will be glad to continue researching it.. but I guess it might be not that efficient :smile:
Author
Owner

@zadjii-msft commented on GitHub (Feb 18, 2021):

No worries then - I'll try and loop back on this before 1.7 closes out

@zadjii-msft commented on GitHub (Feb 18, 2021): No worries then - I'll try and loop back on this before 1.7 closes out
Author
Owner

@miniksa commented on GitHub (Feb 18, 2021):

Sorry, I don't have an idea here off the top of my head. But I am curious/interested in what's going on. I didn't put in either the hyperlink drawing nor the swap chain waitable object thing, so I have less of an idea than I typically do.

If I get time, I'll come back around to this, but I'm hoping someone else can dig.

@miniksa commented on GitHub (Feb 18, 2021): Sorry, I don't have an idea here off the top of my head. But I am curious/interested in what's going on. I didn't put in either the hyperlink drawing nor the swap chain waitable object thing, so I have less of an idea than I typically do. If I get time, I'll come back around to this, but I'm hoping someone else can dig.
Author
Owner

@Don-Vito commented on GitHub (Feb 18, 2021):

When you see the comments like this:

const auto ret = WaitForSingleObjectEx(
        _swapChainFrameLatencyWaitableObject.get(),
        1000, // 1 second timeout (shouldn't ever occur)
        true);

you know these are the famous last words 😄
I am getting timeout, mostly in debug mode with debugger attached.

@Don-Vito commented on GitHub (Feb 18, 2021): When you see the comments like this: ``` const auto ret = WaitForSingleObjectEx( _swapChainFrameLatencyWaitableObject.get(), 1000, // 1 second timeout (shouldn't ever occur) true); ``` you know these are the famous last words :smile: I am getting timeout, mostly in debug mode with debugger attached.
Author
Owner

@miniksa commented on GitHub (Feb 18, 2021):

When you see the comments like this:

const auto ret = WaitForSingleObjectEx(
        _swapChainFrameLatencyWaitableObject.get(),
        1000, // 1 second timeout (shouldn't ever occur)
        true);

you know these are the famous last words 😄
I am getting timeout, mostly in debug mode with debugger attached.

640KB all over again. Oh no. Maybe it just needs a debugging escape hatch?

@miniksa commented on GitHub (Feb 18, 2021): > When you see the comments like this: > > ``` > const auto ret = WaitForSingleObjectEx( > _swapChainFrameLatencyWaitableObject.get(), > 1000, // 1 second timeout (shouldn't ever occur) > true); > ``` > > you know these are the famous last words 😄 > I am getting timeout, mostly in debug mode with debugger attached. 640KB all over again. Oh no. Maybe it just needs a debugging escape hatch?
Author
Owner

@PankajBhojwani commented on GitHub (Feb 18, 2021):

I can repro the error messages in the output from just repeatedly hovering and exiting a link (no second pane required) - not sure if this was there from when links were introduced or due to the more recent hover underline changes.

Can't seem to get the line disappearing to repro though

@PankajBhojwani commented on GitHub (Feb 18, 2021): I can repro the error messages in the output from just repeatedly hovering and exiting a link (no second pane required) - not sure if this was there from when links were introduced or due to the more recent hover underline changes. Can't seem to get the line disappearing to repro though
Author
Owner

@Don-Vito commented on GitHub (Feb 18, 2021):

And the line with the comment is taken directly from the official MSFT documentation 😄
https://docs.microsoft.com/en-us/windows/uwp/gaming/reduce-latency-with-dxgi-1-3-swap-chains

image

@Don-Vito commented on GitHub (Feb 18, 2021): And the line with the comment is taken directly from the official MSFT documentation :smile: https://docs.microsoft.com/en-us/windows/uwp/gaming/reduce-latency-with-dxgi-1-3-swap-chains ![image](https://user-images.githubusercontent.com/4639110/108426268-3e177780-7244-11eb-8063-030c298c3b1c.png)
Author
Owner

@Don-Vito commented on GitHub (Feb 18, 2021):

I can repro the error messages in the output from just repeatedly hovering and exiting a link (no second pane required) - not sure if this was there from when links were introduced or due to the more recent hover underline changes.

Can't seem to get the line disappearing to repro though

Yes. Actually I am not even sure if the message is relevant for the line disappearing. There is some correlation, but from the code I don't see that rendering is stopped.

@Don-Vito commented on GitHub (Feb 18, 2021): > > > I can repro the error messages in the output from just repeatedly hovering and exiting a link (no second pane required) - not sure if this was there from when links were introduced or due to the more recent hover underline changes. > > Can't seem to get the line disappearing to repro though Yes. Actually I am not even sure if the message is relevant for the line disappearing. There is some correlation, but from the code I don't see that rendering is stopped.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12635