FAIL_FAST crash in conhost after shrinking the buffer height #18809

Open
opened 2026-01-31 06:25:05 +00:00 by claunia · 3 comments
Owner

Originally created by @j4james on GitHub (Nov 3, 2022).

Windows Terminal version

Commit cfdea71dc0

Windows build number

10.0.19044.2006

Other Software

No response

Steps to reproduce

  1. Open a cmd shell in conhost.
  2. Open the console Properties dialog.
  3. On the Layout tab, set the Screen Buffer height to 50, and the Window height to 24.
  4. Also make sure the Wrap text output on resize option is UNCHECKED.
  5. Back in the shell, keep pressing enter until you've filled up all 50 lines of the buffer.
  6. Open the Properties again, and set the Screen Buffer height to 24.
  7. Back in the shell, type any letter.

Expected Behavior

I'd expect to see the letter that I typed being output at the prompt.

Actual Behavior

The console crashes with the FAIL_FAST check here:
cfdea71dc0/src/host/_stream.cpp (L252)

Originally created by @j4james on GitHub (Nov 3, 2022). ### Windows Terminal version Commit cfdea71dc08103b1f142cbb26c415ff7b1b2e529 ### Windows build number 10.0.19044.2006 ### Other Software _No response_ ### Steps to reproduce 1. Open a cmd shell in conhost. 2. Open the console _Properties_ dialog. 3. On the _Layout_ tab, set the _Screen Buffer_ height to 50, and the _Window_ height to 24. 4. Also make sure the _Wrap text output on resize_ option is UNCHECKED. 5. Back in the shell, keep pressing enter until you've filled up all 50 lines of the buffer. 6. Open the _Properties_ again, and set the _Screen Buffer_ height to 24. 7. Back in the shell, type any letter. ### Expected Behavior I'd expect to see the letter that I typed being output at the prompt. ### Actual Behavior The console crashes with the `FAIL_FAST` check here: https://github.com/microsoft/terminal/blob/cfdea71dc08103b1f142cbb26c415ff7b1b2e529/src/host/_stream.cpp#L252
claunia added the Product-ConhostArea-OutputIssue-BugPriority-2Severity-Crash labels 2026-01-31 06:25:06 +00:00
Author
Owner

@j4james commented on GitHub (Nov 3, 2022):

I thought at first this was a regression, but once I realised that step 4 was necessary, I was able to reproduce this in my inbox conhost as well. So if it is a regression, it's at least not a very recent one.

@j4james commented on GitHub (Nov 3, 2022): I thought at first this was a regression, but once I realised that step 4 was necessary, I was able to reproduce this in my inbox conhost as well. So if it is a regression, it's at least not a very recent one.
Author
Owner

@BDisp commented on GitHub (Jan 3, 2023):

This is also happening on conhost by using the System.Console on a C# project and resizing the console height by mouse to zero it will crash with a pipe not connected error. I don't know if it's possible to restore the console on the catch exception handler.

@BDisp commented on GitHub (Jan 3, 2023): This is also happening on `conhost` by using the `System.Console` on a `C#` project and resizing the console height by mouse to zero it will crash with a `pipe not connected` error. I don't know if it's possible to restore the console on the catch exception handler.
Author
Owner

@lhecker commented on GitHub (Apr 12, 2023):

Related to #14298.

@lhecker commented on GitHub (Apr 12, 2023): Related to #14298.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18809