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

Harden against resizing down to 0 columns/rows #14467

Merged
2 commits merged into from
Dec 9, 2022
Merged

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Nov 30, 2022

This changeset includes various guards against resizing the terminal down to 0
columns/rows: The 2 TextBuffer locations that accept new sizes, as well as
the HwndTerminal::Refresh which was the entrypoint causing the issue.

Closes #14404

@ghost ghost added Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news. labels Nov 30, 2022
@lhecker lhecker changed the title Harden against resizing below 0 columns/rows Harden against resizing down to 0 columns/rows Nov 30, 2022
@lhecker lhecker force-pushed the dev/lhecker/14404-size-harden branch from 3b32ddb to 419cce2 Compare November 30, 2022 16:43
Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may also want to do the WM_WINDOWPOSCHANGED guard, but this should be sufficient

@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label Nov 30, 2022
@ghost ghost requested review from PankajBhojwani, carlos-zamora and DHowett November 30, 2022 16:48
@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Nov 30, 2022
@ghost
Copy link

ghost commented Nov 30, 2022

Hello @DHowett!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 4 hours 47 minutes. No worries though, I will be back when the time is right! 😉

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@DHowett
Copy link
Member

DHowett commented Nov 30, 2022

@msftbot merge this in 1 minute

@ghost
Copy link

ghost commented Nov 30, 2022

Hello @DHowett!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Wed, 30 Nov 2022 19:36:46 GMT, which is in 1 minute

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@DHowett
Copy link
Member

DHowett commented Dec 1, 2022

You conflicted yourself XD

@zadjii-msft
Copy link
Member

This might not fix it. We'd probably want @javierdlg to actually ingest this and test it before we call this good, but that's assuming we can get a repro

@lhecker lhecker removed the AutoMerge Marked for automatic merge by the bot when requirements are met label Dec 1, 2022
@carlos-zamora carlos-zamora added the AutoMerge Marked for automatic merge by the bot when requirements are met label Dec 9, 2022
@ghost ghost merged commit c5d417f into main Dec 9, 2022
@ghost ghost deleted the dev/lhecker/14404-size-harden branch December 9, 2022 20:16
DHowett pushed a commit that referenced this pull request Dec 12, 2022
This changeset includes various guards against resizing the terminal down to 0
columns/rows: The 2 `TextBuffer` locations that accept new sizes, as well as
the `HwndTerminal::Refresh` which was the entrypoint causing the issue.

Closes #14404

(cherry picked from commit c5d417f)
Service-Card-Id: 87020511
Service-Version: 1.16
DHowett pushed a commit that referenced this pull request Dec 12, 2022
This changeset includes various guards against resizing the terminal down to 0
columns/rows: The 2 `TextBuffer` locations that accept new sizes, as well as
the `HwndTerminal::Refresh` which was the entrypoint causing the issue.

Closes #14404

(cherry picked from commit c5d417f)
Service-Card-Id: 87020510
Service-Version: 1.15
@ghost
Copy link

ghost commented Dec 14, 2022

🎉Windows Terminal v1.15.3465.0 and v1.15.3466.0 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Dec 14, 2022

🎉Windows Terminal Preview v1.16.3463.0 and v1.16.3464.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Second It's a PR that needs another sign-off Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news. zBugBash-Consider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terminal crashes Visual Studio while performing a resize
4 participants