DimensionsTests related to largest window fail on Core editions #1275

Closed
opened 2026-01-30 22:20:46 +00:00 by claunia · 1 comment
Owner

Originally created by @miniksa on GitHub (May 23, 2019).

Originally assigned to: @miniksa on GitHub.

Ported from internal gates failures:

The following five tests are failing on Core editions:

DimensionsTests::TestSetConsoleScreenBufferSize#metadataSet2
DimensionsTests::TestSetConsoleScreenBufferSize#metadataSet1
DimensionsTests::TestSetConsoleScreenBufferSize#metadataSet0

DimensionsTests::TestSetConsoleWindowInfo#metadataSet0
DimensionsTests::TestSetConsoleWindowInfo#metadataSet1

I've investigated the issue and root caused it to PR 3129098 (prior to GitHub).

The problem is that on Core editions, the proposed font preferences and committed font choice stored in SCREEN_INFORMATION do not get synchronized with the actual font usage inside the rendering engine.

The reason this was working previously is because SCREEN_INFORMATION::GetScreenFontSize() was querying the render engine directly for the current font size.

@zadjii-msft realized that this seemed a bit silly given that SCREEN_INFORMATION already had a _currentFont which is supposed to hold the font selected for that screen post synchronization with the renderer. He therefore removed the supposedly duplicate lookup and I signed off on it thinking that it was a sensible thing to do. Turns out, it's only true on Desktop editions.

The solutions here would be:

  1. Return GetScreenFontSize() to look up the font sizing information from the renderer directly
  2. Figure out why the synchronization isn't happening between SCREEN_INFORMATION and the active rendering engine for Core editions and make it happen again
    • And maybe also make it harder for this to be a problem in the future by adjusting the set-up phase to fail with an error if synchronization doesn't happen prior to the first paint calls.

I prefer option 2, of course. The de-duplication was righteous; it just had a pitfall.

Originally created by @miniksa on GitHub (May 23, 2019). Originally assigned to: @miniksa on GitHub. Ported from internal gates failures: The following five tests are failing on Core editions: DimensionsTests::TestSetConsoleScreenBufferSize#metadataSet2 DimensionsTests::TestSetConsoleScreenBufferSize#metadataSet1 DimensionsTests::TestSetConsoleScreenBufferSize#metadataSet0 DimensionsTests::TestSetConsoleWindowInfo#metadataSet0 DimensionsTests::TestSetConsoleWindowInfo#metadataSet1 I've investigated the issue and root caused it to PR 3129098 (prior to GitHub). The problem is that on Core editions, the proposed font preferences and committed font choice stored in `SCREEN_INFORMATION` do not get synchronized with the actual font usage inside the rendering engine. The reason this was working previously is because `SCREEN_INFORMATION::GetScreenFontSize()` was querying the render engine directly for the current font size. @zadjii-msft realized that this seemed a bit silly given that `SCREEN_INFORMATION` already had a `_currentFont` which is supposed to hold the font selected for that screen post synchronization with the renderer. He therefore removed the supposedly duplicate lookup and I signed off on it thinking that it was a sensible thing to do. Turns out, it's only true on Desktop editions. The solutions here would be: 1. Return `GetScreenFontSize()` to look up the font sizing information from the renderer directly 2. Figure out why the synchronization isn't happening between `SCREEN_INFORMATION` and the active rendering engine for Core editions and make it happen again - And maybe also make it harder for this to be a problem in the future by adjusting the set-up phase to fail with an error if synchronization doesn't happen prior to the first paint calls. I prefer option 2, of course. The de-duplication was righteous; it just had a pitfall.
claunia added the Product-ConhostArea-RenderingIssue-BugNeeds-Tag-Fix labels 2026-01-30 22:20:46 +00:00
Author
Owner

@miniksa commented on GitHub (May 31, 2019):

I completed this on the OS side today. It needs to replicate out.

@miniksa commented on GitHub (May 31, 2019): I completed this on the OS side today. It needs to replicate out.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1275