Rendering glitch when printing spaces with background color #20157

Closed
opened 2026-01-31 07:05:19 +00:00 by claunia · 6 comments
Owner

Originally created by @tigrouind on GitHub (Jun 28, 2023).

Windows Terminal version

1.17.11461.0

Windows build number

10.0.22621.1848

Other Software

using System;

namespace ConsoleApp1
{
	internal class Program
	{
		static void Main()
		{
			for (int j = 0; j < 100; j++)
			{
				for (int i = 0; i < 8; i++)
				{
					Console.BackgroundColor = (ConsoleColor)((i + j + 1) / 20 % 16);
					Console.Write("   ");					
				}
				Console.BackgroundColor = ConsoleColor.Black;
				Console.WriteLine();
			}
			
		}
	}
}

Steps to reproduce

Run the C# console program listed above a few times.
It print spaces to the console while changing background color, producing a specific pattern (see expected behavior).

From time to time, pattern appear broken (see actual behavior). This occurs randomly but it seems to be always when the terminal start to scroll vertically. Also : printing non whitespace characters (eg: letters) seems to prevent bug happening.

Expected Behavior

image

Actual Behavior

The pattern appear broken as it contains some black spaces :

image

Originally created by @tigrouind on GitHub (Jun 28, 2023). ### Windows Terminal version 1.17.11461.0 ### Windows build number 10.0.22621.1848 ### Other Software ```csharp using System; namespace ConsoleApp1 { internal class Program { static void Main() { for (int j = 0; j < 100; j++) { for (int i = 0; i < 8; i++) { Console.BackgroundColor = (ConsoleColor)((i + j + 1) / 20 % 16); Console.Write(" "); } Console.BackgroundColor = ConsoleColor.Black; Console.WriteLine(); } } } } ``` ### Steps to reproduce Run the C# console program listed above a few times. It print spaces to the console while changing background color, producing a specific pattern (see expected behavior). From time to time, pattern appear broken (see actual behavior). This occurs randomly but it seems to be always when the terminal start to scroll vertically. Also : printing non whitespace characters (eg: letters) seems to prevent bug happening. ### Expected Behavior ![image](https://github.com/microsoft/terminal/assets/2211721/b734b476-fa2f-40f2-9e1d-82fc47796894) ### Actual Behavior The pattern appear broken as it contains some black spaces : ![image](https://github.com/microsoft/terminal/assets/2211721/04e9d1e6-d72d-46c8-a20e-41a0f47b5ede)
Author
Owner

@carlos-zamora commented on GitHub (Jun 28, 2023):

Looks like this might be fixed by #15618

@carlos-zamora commented on GitHub (Jun 28, 2023): Looks like this might be fixed by #15618
Author
Owner

@lhecker commented on GitHub (Jun 28, 2023):

Ah sorry @carlos-zamora, I didn't mean to imply that #15618 fix this. It's more like that #15618 is in the same category of VtEngine bugs. My hope is that we'll fix this bug some other way sometime soon if I implement passthrough mode and we can slim down VtEngine.

@lhecker commented on GitHub (Jun 28, 2023): Ah sorry @carlos-zamora, I didn't mean to imply that #15618 fix this. It's more like that #15618 is in the same category of VtEngine bugs. My hope is that we'll fix this bug some other way sometime soon if I implement passthrough mode and we can slim down VtEngine.
Author
Owner

@zadjii-msft commented on GitHub (Aug 28, 2023):

WAIT this looks just like #14512 - Does updating to Terminal Preview, v1.18 fix this/?

@zadjii-msft commented on GitHub (Aug 28, 2023): WAIT this looks just like #14512 - Does updating to Terminal Preview, v1.18 fix this/?
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Sep 1, 2023):

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.

@microsoft-github-policy-service[bot] commented on GitHub (Sep 1, 2023): 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**.
Author
Owner

@tigrouind commented on GitHub (Sep 1, 2023):

WAIT this looks just like #14512 - Does updating to Terminal Preview, v1.18 fix this/?

Yes it does. I installed it from Windows Store. It seems to be immune to the rendering glitch.
Disabling or enabling "Atlas Engine" has no effect (it works in both cases)

@tigrouind commented on GitHub (Sep 1, 2023): > WAIT this looks just like #14512 - Does updating to Terminal Preview, v1.18 fix this/? Yes it does. I installed it from Windows Store. It seems to be immune to the rendering glitch. Disabling or enabling "Atlas Engine" has no effect (it works in both cases)
Author
Owner

@lhecker commented on GitHub (Sep 4, 2023):

Thanks for letting us know! I'll close the issue then. 🙂

@lhecker commented on GitHub (Sep 4, 2023): Thanks for letting us know! I'll close the issue then. 🙂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20157