Skip to content

Conpty "pass-through" doesn't maintain order of operations #8698

@j4james

Description

@j4james

Environment

Windows build number: Version 10.0.18363.1198
Windows Terminal version (if applicable): Version: 1.5.3242.0

Steps to reproduce

  1. Open a bash shell in Window Terminal.
  2. Execute the following command:
printf "\e[40m\e[2J\e]4;0;rgb:00/00/80\e\\"; sleep 1; printf "\e#8\e]4;0;rgb:FF/00/00\e\\"

Expected behavior

This should erase the screen with background color 0, but with the 0 color palette set to blue. It then pauses for a second, before filling the screen with the alignment test pattern (which uses default colors), and changes the 0 color palette to bright red.

Since the screen is filled with the default colors of the test pattern before the palette is changed to red, you should never see that red.

Actual behavior

There's a brief moment when the screen flashes bright red before the test pattern appears.

If you enable the "debug tap" you can see what's going wrong. The palette change is passed through to the conpty connection as soon as it's encountered, whereas the test pattern is written to the conhost buffer and only passed through to conpty in the next paint cycle. You thus end up having the operations arrive out of order.

I'm guessing it's timing related, so it may not happen all the time, but I'm definitely seeing it a lot.

Metadata

Metadata

Assignees

Labels

Impact-CorrectnessIt be wrong.In-PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.Issue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsPriority-1A description (P1)Product-ConptyFor console issues specifically related to conpty

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions