Skip to content

PSReadline constantly hangs Terminal with ArgumentOutOfRangeException #2675

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

Closed
schwinbp opened this issue Jul 14, 2021 · 2 comments
Closed
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@schwinbp
Copy link

PSReadline is constantly hanging my terminal. There is no particular sequence of things that I can find to reproduce it, but It will always occur several times a day. The status bar powershell will be spinning along with my PC fan. The terminal hangs for around 10 minutes or so, meanwhile I cannot run any commands. Eventually it spews out the following before returning control back to me.

Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.md
Thank you!

Environment

PSReadLine: 2.1.0
PowerShell: 2021.6.2
OS: Microsoft Windows 10.0.19042
BufferWidth: 291
BufferHeight: 24

Last 7 Keys

 Ctrl+s DownArrow c l s Enter
 DownArrow

Exception

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 25.
   at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.Internal.VirtualTerminal.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.CalculateWhereAndWhatToRender(Boolean cursorMovedToInitialPos, RenderData renderData, LineInfoForRendering& lineInfoForRendering)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Render()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadKey()
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

Environment

PS version: 7.1.2
PSReadline version: 2.1.0
os: 10.0.19041.1 (WinBuild.160101.0800)
PS file version: 7.1.2.0
HostName: Visual Studio Code Host
BufferWidth: 291
BufferHeight: 24

Exception report

Steps to reproduce

Run a script, a command ...any script will do. It will happen sometime if you keep doing it.

Expected behavior

I expect to be able to run PS commands and not have to sit there waiting for control again.

Actual behavior

Terminal is hung and fan is whirring away while it is doing whatever it is doin.

@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Jul 14, 2021
@schwinbp
Copy link
Author

Here is another dump...

Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.md
Thank you!

Environment

PSReadLine: 2.1.0
PowerShell: 2021.6.2
OS: Microsoft Windows 10.0.19042
BufferWidth: 291
BufferHeight: 24

Last 200 Keys

 Enter
 c l s Enter
 DownArrow $ k e y Enter
 Escape DownArrow UpArrow Escape c l s Enter
 g e t Backspace Backspace c Spacebar G Backspace * S E C C e Backspace Backspace S e c r e t * Enter
 UpArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow RightArrow e t - c o m m a n d Delete Enter
 G e t - c o m m a n d Spacebar U p d a t e - S e c r e t Enter
 UpArrow Ctrl+LeftArrow S E C Enter
 G e t - Backspace Backspace Backspace Backspace UpArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow Backspace Backspace Backspace Backspace Backspace Backspace Backspace H e l p Enter
 DownArrow Home DownArrow DownArrow DownArrow $ t o d a y Enter
 DownArrow Home $ e x p i r i n g K e y s Enter
 g e t - c o m m a n d Spacebar * I A M U s e r A c c e s s * Enter

Exception

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 25.
   at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.CalculateWhereAndWhatToRender(Boolean cursorMovedToInitialPos, RenderData renderData, LineInfoForRendering& lineInfoForRendering)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadKey()
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

@schwinbp schwinbp changed the title PSReadline constantly hangs Terminal PSReadline constantly hangs Terminal with ArgumentOutOfRangeException Jul 19, 2021
@daxian-dbw
Copy link
Member

This is another duplicate of #2298, which happens in VSCode extension (PowerShell: 2021.6.2).

@ghost ghost removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Sep 20, 2021
@daxian-dbw daxian-dbw added Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. labels Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants