microsoft/Terminal

Tab exits with code 1 when Console.SetBufferSize has been modified and you maximize window

Open

#7,581 建立於 2020年9月9日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)C++ (3,212 fork)batch import
Area-OutputArea-ServerHelp WantedIssue-BugPriority-2Product-ConptySeverity-Crash

倉庫指標

Star
 (35,764 star)
PR 合併指標
 (平均合併 27天 19小時) (30 天內合併 24 個 PR)

描述

Possibly related to #1461. I understand the text rendering errors, but the process exiting is different.

When I set the console buffer size to maximum height and run my code from Windows Terminal (in non-maximized, 'windowed' mode), everything appears to work correctly. Windows Terminal honors the buffer-size that I've set, and I can scroll back in history appropriately.

If I maximize that window after running the program, the tab process exits with code 1.

A small C# program that reproduces this issue:

    static void Main(string[] args)
    {
      Console.SetBufferSize(Console.BufferWidth, 32766);
      Console.WriteLine("Buffer size changed.");

      // 100 lines is roughly the minimum it takes to crash the tab. Small behavior changes
      // depending on my initial window size. 
      for (int i = 0; i < 100; i++)
      {
        Console.WriteLine("Line");
      }
    }

image

Windows Version 2004, OS Build 19041.450 Windows Terminal Version 1.2.2381.0

貢獻者指南