You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
'ArgumentOutOfRangeException' issues were fixed in recent versions #1306
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.
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.
changed the title [-]`ArgumentOutOfRangeException` issues have been fixed in recent versions[/-][+]`ArgumentOutOfRangeException` issues were fixed in recent versions[/+]on Jan 21, 2020
changed the title [-]`ArgumentOutOfRangeException` issues were fixed in recent versions[/-][+]'ArgumentOutOfRangeException' issues were fixed in recent versions[/+]on Jan 23, 2020
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. 😄
Just to let you know, the issue is fixed for me. I use the default PS version on Win10 Professional and executed the following command (in cmd) to upgrade PSReadLine:
powershell -noprofile -command "Install-Module PSReadLine -Force -SkipPublisherCheck -AllowPrerelease"
Just wondering, almost 3 years later: I installed a new Windows 10 machine, which has PowerShell preinstalled, but that ships with this outdated version of PSReadLine. Wouldn't it be possible to somehow ship an updated version of PSReadLine with Windows Update, to ensure that a freshly installed and fully updated system doesn't have a 3 years old buggy version of a PowerShell module which explicitly asks the users to open an issue for a long-fixed bug? (From looking through the issue tracker, it seems that it would be a good thing for the project maintainer as well 🙃)
Activity
[-]`ArgumentOutOfRangeException` issues have been fixed in recent versions[/-][+]`ArgumentOutOfRangeException` issues were fixed in recent versions[/+][-]`ArgumentOutOfRangeException` issues were fixed in recent versions[/-][+]'ArgumentOutOfRangeException' issues were fixed in recent versions[/+]DHowett-MSFT commentedon Feb 12, 2020
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 commentedon Feb 12, 2020
Dustin L. Howett (MSFT) (@DHowett-MSFT) Sure, I just added links to those related PRs in the issue description. Hope that helps!
DHowett-MSFT commentedon Feb 12, 2020
Thanks!
bstrobel commentedon Sep 22, 2020
Just to let you know, the issue is fixed for me. I use the default PS version on Win10 Professional and executed the following command (in cmd) to upgrade PSReadLine:
powershell -noprofile -command "Install-Module PSReadLine -Force -SkipPublisherCheck -AllowPrerelease"
Thanks for fixing it!
Add github action to pre-triage new issues (#2117)
Backist commentedon May 27, 2022
publicmessages commentedon Aug 11, 2022
daxian-dbw commentedon Aug 11, 2022
Backest (@Backist) and publicmessages The URL "https://github.com/lzybkr/PSReadLine/issues/new" shown in the exception you saw indicates that you are using a very old version of PSReadLine (prior to 2.0.0-beta2). Please upgrade to the latest version https://www.powershellgallery.com/packages/PSReadLine/2.2.6.
dbrgn commentedon Oct 18, 2022
Just wondering, almost 3 years later: I installed a new Windows 10 machine, which has PowerShell preinstalled, but that ships with this outdated version of PSReadLine. Wouldn't it be possible to somehow ship an updated version of PSReadLine with Windows Update, to ensure that a freshly installed and fully updated system doesn't have a 3 years old buggy version of a PowerShell module which explicitly asks the users to open an issue for a long-fixed bug? (From looking through the issue tracker, it seems that it would be a good thing for the project maintainer as well 🙃)