[PR #2149] Fix a crash on restore down #24828

Open
opened 2026-01-31 09:05:34 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/2149

State: closed
Merged: Yes


Summary of the Pull Request

Fixes a crash that occur when changing the buffer height. During the resize, conpty would immediately request a repaint, which would throw an exception that would cause the resize to fail halfway through, and that would make the subsequent render fail.

This change prevents the VT Renderer from immediately requesting a paint during the resize.

References

Might also be related to #1095. I can't seem to get that to repro anymore with this change.

Might be related to #1856. We should verify.

This does however make another issue more apparent. When you restore down with a COOKED_READ input line (read:cmd.exe), the terminal can crash. I have a fix for that in d34a3be, which I wasn't sure if I should include in this PR or not, because I wasn't confident that was the right fix. I'm fairly certain there's another issue floating around tracking that bug. We could either merge that commit/branch into this one, or wait and save it for a separate one.

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/2149 **State:** closed **Merged:** Yes --- <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Fixes a crash that occur when changing the buffer height. During the resize, conpty would immediately request a repaint, which would throw an exception that would cause the resize to fail halfway through, and that would make the subsequent render fail. This change prevents the VT Renderer from immediately requesting a paint during the resize. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References Might also be related to #1095. I can't seem to get that to repro anymore with this change. Might be related to #1856. We should verify. This does however make another issue more apparent. When you restore down with a COOKED_READ input line (read:cmd.exe), the terminal can crash. I have a fix for that in d34a3be, which I wasn't sure if I should include in this PR or not, because I wasn't confident that was the right fix. I'm fairly certain there's another issue floating around tracking that bug. We could either merge that commit/branch into this one, or wait and save it for a separate one. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #1795
claunia added the pull-request label 2026-01-31 09:05:34 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24828