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

FakeConsole throws System.IndexOutOfRangeException using SetupFakeDriverAttribute. #3475

Closed
BDisp opened this issue May 13, 2024 · 1 comment
Assignees
Labels
bug testing Issues related to testing

Comments

@BDisp
Copy link
Collaborator

BDisp commented May 13, 2024

Any attempt to write to the console buffer may throw a System.IndexOutOfRangeException exception, because the SetupFakeDriver only sets the size of the Cols and Rows without updating the size of the FakeConsole buffer.

image

@BDisp BDisp self-assigned this May 13, 2024
BDisp added a commit to BDisp/Terminal.Gui that referenced this issue May 13, 2024
@BDisp BDisp added bug testing Issues related to testing labels May 13, 2024
tig added a commit that referenced this issue May 30, 2024
Fixes #3475. FakeConsole throws System.IndexOutOfRangeException using SetupFakeDriverAttribute.
@tig tig closed this as completed May 30, 2024
@dodexahedron
Copy link
Collaborator

Just copying the comment I made in the PR, for visibility:

We need to move that (the fake driver) out of the core library anyway.

But that's a relatively low-importance issue with potentially relatively high effort to refactor, so I'm kinda ambivalent as to whether that should be done before or after V2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug testing Issues related to testing
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants