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

Writing into inactive screen buffer is broken #290

Closed
alabuzhev opened this issue Oct 16, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@alabuzhev
Copy link

commented Oct 16, 2018

Windows Version 10.0.17763.1

CreateConsoleScreenBuffer function:

A console can have multiple screen buffers but only one active screen buffer. Inactive screen buffers can be accessed for reading and writing, but only the active screen buffer is displayed. To make the new screen buffer the active screen buffer, use the SetConsoleActiveScreenBuffer function.

This functionality is broken - text sent to the inactive screen buffer ends up in the active and thus visible on the screen.

It does not happen in Legacy mode.

A minimal project to reproduce the issue attached.

AlternativeScreenBufferBug.zip

@miniksa

This comment has been minimized.

Copy link
Member

commented Oct 16, 2018

Thanks. Fortunately/unfortunately you're on a roll and filing bugs faster than I can investigate and fix them.

I have filed this internally as MSFT:19317384. I'll get to it when I have time.

@alabuzhev

This comment has been minimized.

Copy link
Author

commented Oct 21, 2018

It's worth mentioning that this only happens when running from Visual Studio, which does it through its own VsDebugConsole.exe helper by default.

@miniksa

This comment has been minimized.

Copy link
Member

commented Nov 15, 2018

OK. I've investigated this, crafted a fix, had it reviewed, and checked it in as of today.

I've also installed a variation on the sample you provided into our feature test suite to ensure that we don't mess this up again in the future. Or at least that we don't mess it up in this very specific way. :P

Thank you very, very much for providing the minimal repro code. It dramatically accelerated the pace at which I could turn around this bug.

It should reach Insiders builds in about 3 weeks.

@miniksa miniksa closed this Nov 15, 2018

@miniksa miniksa added this to the 19H1 milestone Nov 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.