Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a soft font causes the Atlas engine to crash #15409

Closed
j4james opened this issue May 23, 2023 · 3 comments · Fixed by #15419
Closed

Using a soft font causes the Atlas engine to crash #15409

j4james opened this issue May 23, 2023 · 3 comments · Fixed by #15419
Labels
Area-AtlasEngine In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-1 A description (P1) Product-Terminal The new Windows Terminal.

Comments

@j4james
Copy link
Collaborator

j4james commented May 23, 2023

Windows Terminal version

1.18.1421.0

Windows build number

10.0.19045.2913

Other Software

No response

Steps to reproduce

  1. Make sure the Atlas engine is activated in the Advanced profile settings.
  2. Open a bash shell.
  3. Execute printf "\eP0;1;1;4;2;1{B~~~~~~~~/~~~~~~~~\e\\"

Expected Behavior

Most characters output at this point should be reverse question marks, except for ! which should map to a solid block.

Actual Behavior

The terminal crashes. This is caused by a null pointer reference when accessing the fontFaceEntry.fontFace field in BackendD3D::_initializeFontFaceEntry.

THROW_IF_FAILED(fontFaceEntry.fontFace->GetGlyphIndicesW(codepoints.data(), codepoints.size(), indices.data()));

Just based on a brief scan of the code, I got the impression that it's expected for the fontFace to be null when you have a soft font, so it may just be that this method hasn't allowed for that case. This appears to be a regression introduced in PR #15343.

@j4james j4james added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 23, 2023
@lhecker
Copy link
Member

lhecker commented May 23, 2023

Ah dang I didn't test it again after the PR. 😟 Sorry for breaking it, and thank you so much for noticing it!
(#15343 was written in a bit... a lot of a hurry. 😅)

@lhecker lhecker added Product-Terminal The new Windows Terminal. Priority-1 A description (P1) Area-AtlasEngine labels May 23, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR This issue has a related PR label May 24, 2023
microsoft-github-policy-service bot pushed a commit that referenced this issue May 25, 2023
Woops. Regressed in #15343. Fixes #15409.

## Validation Steps Performed
* Run `RenderingTests.exe`
* Soft fonts work ✅
@lhecker
Copy link
Member

lhecker commented May 25, 2023

FYI the link I distributed in some other comments (click) is a build that also contains the PR that fixes this. If you're eager to test it out, you could consider installing that build. 🙂

DHowett pushed a commit that referenced this issue May 25, 2023
Woops. Regressed in #15343. Fixes #15409.

## Validation Steps Performed
* Run `RenderingTests.exe`
* Soft fonts work ✅

(cherry picked from commit 245b13b)
Service-Card-Id: 89323212
Service-Version: 1.18
@j4james
Copy link
Collaborator Author

j4james commented May 25, 2023

I've patched my local build with the changes in your PR and it's working great now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AtlasEngine In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-1 A description (P1) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants