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
Closed

Writing into inactive screen buffer is broken #290

alabuzhev opened this issue Oct 16, 2018 · 3 comments
Assignees
Labels
Product-Conhost For issues in the Console codebase Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Work-Item It's being tracked by an actual work item internally. (to be removed soon)
Milestone

Comments

@alabuzhev
Copy link
Contributor

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
Copy link
Member

miniksa 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.

@miniksa miniksa self-assigned this Oct 16, 2018
@miniksa miniksa added Work-Item It's being tracked by an actual work item internally. (to be removed soon) Product-Conhost For issues in the Console codebase labels Oct 16, 2018
@alabuzhev
Copy link
Contributor Author

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
Copy link
Member

miniksa 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 as completed Nov 15, 2018
@miniksa miniksa added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Nov 15, 2018
@miniksa miniksa added this to the 19H1 milestone Nov 15, 2018
@WSLUser WSLUser mentioned this issue Jun 2, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-Conhost For issues in the Console codebase Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Work-Item It's being tracked by an actual work item internally. (to be removed soon)
Projects
None yet
Development

No branches or pull requests

2 participants