Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Asked to Report #892

Closed
MrWhiteHawk opened this issue Apr 13, 2019 · 5 comments
Closed

Asked to Report #892

MrWhiteHawk opened this issue Apr 13, 2019 · 5 comments
Labels
OutOfRange Issues relating to System.ArgumentOutOfRangeException

Comments

@MrWhiteHawk
Copy link

Environment data

Steps to reproduce or exception report

Oops, something went wrong. Please report this bug with the details below.Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Last 1 Keys:
&

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 name: left
Actual value was -1.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

PS version: 5.1.17763.316
PSReadline version: 2.0.0-beta2
os: 10.0.17763.1 (WinBuild.160101.0800)
PS file version: 10.0.17763.1 (WinBuild.160101.0800)

@daxian-dbw
Copy link
Member

@MrWhiteHawk Can you please also share the key sequences that were printed out along with this exception?

@mladedav
Copy link

This happened to me now. Started PowerShell Core on Linux, pasted a command and tried to run it.
I cannot reproduce the error though.

PS /storage/media/Documents/semester_8/bap/src/examples/managed-identities> ./deploy.ps1 -ResourceGroup mladedav-managed-identities-rg -WebAppName mladedav-managed-identities-app -KeyVault mladedav-mngd-id-kv

Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Last 1 Keys:

 .

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 name: left
Actual value was -2.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

@vors
Copy link
Contributor

vors commented May 22, 2019

Started to consistently happen with me on macos now.

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: topct -TypeName PSObject -Property @{name = $name; points = $sp}
Actual value was -1.ble
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()_.fields.points} | measure -Sum).Sum
   at Microsoft.PowerShell.PSConsoleReadLine.UpdateFromHistory(HistoryMoveCursor moveCursor)
   at Microsoft.PowerShell.PSConsoleReadLine.UpdateHistoryDuringInteractiveSearch(String toMatch, Int32 direction, Int32& searchFromPoint)
   at Microsoft.PowerShell.PSConsoleReadLine.InteractiveHistorySearchLoop(Int32 direction)
   at Microsoft.PowerShell.PSConsoleReadLine.InteractiveHistorySearch(Int32 direction)
   at Microsoft.PowerShell.PSConsoleReadLine.ReverseSearchHistory(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(PSKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)


@daxian-dbw daxian-dbw added this to the 2.0.0-Consider milestone Jun 18, 2019
@joeyaiello joeyaiello added the OutOfRange Issues relating to System.ArgumentOutOfRangeException label Jun 18, 2019
@LoongWynn
Copy link

I also got the same failure on windows 10. The last 200 keys are

 } = ' U T F - 8 ' ; Space $ { e n v : P Y T H O N U N B U F F E R E D } = ' 1 ' ; Space & Space ' D : \ p r o g r a m F i l e s \ A n a c o n d a \ p y t h o n . e x e ' Space ' c : \ U s e r s \ [username,hided] \ . v s c o d e \ e x t e n s i o n s \ m s - p y t h o n . p y t h o n - 2 0 1 9 . 6 . 2 4 2 2 1 \ p y t h o n F i l e s \ p t v s d _ l a u n c h e r . p y ' Space ' - - d e f a u l t ' Space ' - - c l i e n t ' Space

and the stack goes like this

异常:
System.ArgumentOutOfRangeException: 该值必须大于或等于零,且必须小于控制台缓冲区在该维度的大小。
参数名: top
实际值是 47。
   在 System.Console.SetCursorPosition(Int32 left, Int32 top)
   在 Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   在 Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   在 Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   在 Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   在 Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   在 Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

It's the first time I meet the failure.

@daxian-dbw
Copy link
Member

Fixed by #979 and #967

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
OutOfRange Issues relating to System.ArgumentOutOfRangeException
Projects
None yet
Development

No branches or pull requests

6 participants