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

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

Open
Tracked by #5800
ajkennedy-HEC opened this issue Sep 9, 2020 · 3 comments
Labels
Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Conpty For console issues specifically related to conpty Severity-Crash Crashes are real bad news.
Milestone

Comments

@ajkennedy-HEC
Copy link

ajkennedy-HEC commented Sep 9, 2020

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

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Sep 9, 2020
@DHowett
Copy link
Member

DHowett commented Sep 9, 2020

Alright, there's gonna be two fixes here: rejecting making the buffer taller than the viewport (sorry, but we've got to do that -- it'll also fix #4062) and fixing the openconsole/conpty crash.

@DHowett DHowett added Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conpty For console issues specifically related to conpty Severity-Crash Crashes are real bad news. Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. labels Oct 16, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Oct 16, 2020
@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Oct 16, 2020
@DHowett DHowett added this to the Console Backlog milestone Oct 16, 2020
@DHowett DHowett added the Priority-2 A description (P2) label Oct 16, 2020
@flevi29
Copy link

flevi29 commented Nov 25, 2020

Oh, that's sad, but understandable. Changing buffer size also causes some weird behavior, where if I resize Windows Terminal a few times the text kinda corrupts.
Screenshot 2020-11-25 144825

@DHowett
Copy link
Member

DHowett commented Nov 25, 2020

Indeed, that’s why we will have to reject buffer size changes 😄

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.) Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Conpty For console issues specifically related to conpty Severity-Crash Crashes are real bad news.
Projects
None yet
Development

No branches or pull requests

5 participants
@DHowett @ajkennedy-HEC @zadjii-msft @flevi29 and others