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

Attempt to get line out of bounds #230

Open
serjsysoev opened this issue Oct 23, 2021 · 2 comments
Open

Attempt to get line out of bounds #230

serjsysoev opened this issue Oct 23, 2021 · 2 comments

Comments

@serjsysoev
Copy link
Contributor

There are a lot of cases when TerminalTextBuffer#getLine logs "Attempt to get line out of bounds: a >= b"

@omegaui
Copy link

omegaui commented Nov 24, 2021

May be I can help!

As far as I know You can provide the maximum line count using the DefaultSettingsProvider
Like this,
Screenshot from 2021-11-24 15-03-10

It may prevent the log message.

@serjsysoev
Copy link
Contributor Author

@omegaui Hi!
Unfortunately, it won’t help with this log message. The problem is there are a lot of cases when getLine is called with out-of-bounds parameters. I fixed one of these in this commit.

clearLines(beginY, endY); is being called with endY = myTerminalHeight which is out-of-bounds for this function. It in turn calls LinesBuffer#clearLines which calls getLine(i).clear(filler) with out-of-bounds index.

We want to fix all cases where this happens. I think we need to fix the obvious out-of-bounds calls and at least print stack trace so we can understand what causes this issue.

If you have a way to consistently reproduce this behavior or an explanation how this could happen, please file a separate issue.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants