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

Unlimited zoom-in using Ctrl+Wheel causes renderer to crash #17227

Closed
o-sdn-o opened this issue May 9, 2024 · 3 comments · Fixed by #17258
Closed

Unlimited zoom-in using Ctrl+Wheel causes renderer to crash #17227

o-sdn-o opened this issue May 9, 2024 · 3 comments · Fixed by #17258
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues 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 Product-Terminal The new Windows Terminal.

Comments

@o-sdn-o
Copy link

o-sdn-o commented May 9, 2024

Windows Terminal version

Current main

Windows build number

10.0.19045.4291

Other Software

No response

Steps to reproduce

  • Set Direct3D backend active. All rendering backends are affected.
  • Run tab with any profile.
  • Zoom-in by Ctrl+Wheel until it crashes.
    • Direct3D: ~ One minute of scrolling for my HW setup.
    • Direct2D: ~10 minutes of "doing nothing" with same result (crash).

Expected Behavior

Reasonable zoom limits. E.g.: One text cell should not exceed the size of the terminal window.

Actual Behavior

Direct3D:
image

Direct2D:
image

@o-sdn-o o-sdn-o 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 9, 2024
Copy link

github-actions bot commented May 9, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@o-sdn-o o-sdn-o changed the title Unlimited zoom-in using Ctrl+Wheel causes Direct3D renderer to crash Unlimited zoom-in using Ctrl+Wheel causes renderer to crash May 9, 2024
@zadjii-msft zadjii-msft added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Product-Terminal The new Windows Terminal. labels May 10, 2024
@zadjii-msft zadjii-msft added this to the Terminal v1.22 milestone May 10, 2024
@zadjii-msft zadjii-msft added this to To Cherry Pick in 1.21 Servicing Pipeline via automation May 10, 2024
@lhecker
Copy link
Member

lhecker commented May 13, 2024

Direct2D: ~10 minutes of "doing nothing" with same result (crash).

What do you mean with "doing nothing"?

@o-sdn-o
Copy link
Author

o-sdn-o commented May 13, 2024

What do you mean with "doing nothing"?

I mean I scrolled (Ctrl+Wheel) intensively with the mouse for 10 minutes and did nothing else 😅

@DHowett DHowett removed this from To Cherry Pick in 1.21 Servicing Pipeline May 13, 2024
github-merge-queue bot pushed a commit that referenced this issue May 14, 2024
This clamps the font sizes between 1 and 100. Additionally, it fixes
a warning that I randomly noticed when reproducing the issue: D2D
complained that `EndDraw` must be called before releasing resources.
Finally, this fixes a crash when the terminal size is exactly (1,1)
cells, which happened because the initial (invalid) size was (1,1) too.

This doesn't fully fix all font-size related issues, but that's
currently difficult to achieve, as for instance the swap chain size
isn't actually based on the window size, nay, it's based on the cell
size multiplied by the cell count. So if the cell size is egregiously
large then we get a swap chain size that's larger than the display and
potentially larger than what the GPU supports which results in errors.

Closes #17227
DHowett pushed a commit that referenced this issue May 17, 2024
This clamps the font sizes between 1 and 100. Additionally, it fixes
a warning that I randomly noticed when reproducing the issue: D2D
complained that `EndDraw` must be called before releasing resources.
Finally, this fixes a crash when the terminal size is exactly (1,1)
cells, which happened because the initial (invalid) size was (1,1) too.

This doesn't fully fix all font-size related issues, but that's
currently difficult to achieve, as for instance the swap chain size
isn't actually based on the window size, nay, it's based on the cell
size multiplied by the cell count. So if the cell size is egregiously
large then we get a swap chain size that's larger than the display and
potentially larger than what the GPU supports which results in errors.

Closes #17227

(cherry picked from commit f62d2d5)
Service-Card-Id: 92546470
Service-Version: 1.21
DHowett pushed a commit that referenced this issue May 17, 2024
This clamps the font sizes between 1 and 100. Additionally, it fixes
a warning that I randomly noticed when reproducing the issue: D2D
complained that `EndDraw` must be called before releasing resources.
Finally, this fixes a crash when the terminal size is exactly (1,1)
cells, which happened because the initial (invalid) size was (1,1) too.

This doesn't fully fix all font-size related issues, but that's
currently difficult to achieve, as for instance the swap chain size
isn't actually based on the window size, nay, it's based on the cell
size multiplied by the cell count. So if the cell size is egregiously
large then we get a swap chain size that's larger than the display and
potentially larger than what the GPU supports which results in errors.

Closes #17227

(cherry picked from commit f62d2d5)
Service-Card-Id: 92546859
Service-Version: 1.20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues 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 Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants