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

'ArgumentOutOfRangeException' issues were fixed in recent versions #1306

Closed
daxian-dbw opened this issue Jan 21, 2020 · 8 comments
Closed

'ArgumentOutOfRangeException' issues were fixed in recent versions #1306

daxian-dbw opened this issue Jan 21, 2020 · 8 comments

Comments

@daxian-dbw
Copy link
Member

daxian-dbw commented Jan 21, 2020

Quite a few fixes were made to address the various issues related to the ArgumentOutOfRangeException thrown from PSReadLine.
The exception usually has a stack trace that looks like one of the followings.

If you run into a similar issue, please try out the latest version of PSReadLine from PowerShell Gallery.
You may find the Installation and Upgrading instructions helpful.

System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -7.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   ...
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was 9001.
   at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.Menu.DrawMenu(Menu previousMenu, Boolean menuSelect)
   ...
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. (Parameter 'top')
Actual value was 9001.
   at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.AcceptLineImpl(Boolean validate)
   at Microsoft.PowerShell.PSConsoleReadLine.AcceptLine(Nullable`1 key, Object arg)
   ...

The PRs that fixed those issues are:
#979, #967 -- these 2 PRs fixed most of the ArgumentOutOfRangeException thrown from ReallyRender.
#984, #1182, #1206 -- they fixed the exception thrown in other scenarios.

Here is an in-complete list of the closed duplicate issues related to the ArgumentOutOfRangeException:
https://github.com/powershell/psreadline/issues?q=is%3Aissue+label%3AOutOfRange+is%3Aclosed

@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Jan 21, 2020
@ghost ghost removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Jan 21, 2020
@daxian-dbw daxian-dbw pinned this issue Jan 21, 2020
@daxian-dbw daxian-dbw changed the title ArgumentOutOfRangeException issues have been fixed in recent versions ArgumentOutOfRangeException issues were fixed in recent versions Jan 21, 2020
@daxian-dbw daxian-dbw changed the title ArgumentOutOfRangeException issues were fixed in recent versions 'ArgumentOutOfRangeException' issues were fixed in recent versions Jan 23, 2020
@DHowett-MSFT
Copy link

Would it be possible to link some of that work? As an API provider (on the console side) I'd like to understand if there's some learnings I can take back to my team. 😄

@daxian-dbw
Copy link
Member Author

daxian-dbw commented Feb 12, 2020

@DHowett-MSFT Sure, I just added links to those related PRs in the issue description. Hope that helps!

@DHowett-MSFT
Copy link

Thanks!

@daxian-dbw daxian-dbw mentioned this issue Oct 10, 2024
3 tasks
This was referenced Oct 29, 2024
This was referenced Nov 2, 2024
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

6 participants