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

System.ArgumentOutOfRangeException Error when Clearing Screen with Ctrl + L #991

Closed
brandedoutcast opened this issue Aug 4, 2019 · 3 comments

Comments

@brandedoutcast
Copy link

brandedoutcast commented Aug 4, 2019

I noticed this behavior after an upgrade to Terminal v0.3 so not sure if this belongs here but the error output says to open an issue in this repo

Environment data

PS version: 5.1.18362.145
PSReadline version: 2.0.0-beta2
os: 10.0.18362.1 (WinBuild.160101.0800)
PS file version: 10.0.18362.1 (WinBuild.160101.0800)
BufferWidth: 238
BufferHeight: 59

Steps to reproduce or exception report

  1. Open Windows Terminal on v0.3.x
  2. Run PowerShell 5.x in any tab
  3. Press Ctrl + L for clearing the screen
  4. You're presented with the below screenshot randomly but frequently

image

@EchoAbstract
Copy link

EchoAbstract commented Aug 6, 2019

You can always repro this if your screen is already cleared (on mac at least), so by pressing Ctrl+l Ctrl+l

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

Last 200 Keys:

 Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+l Ctrl+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.SetWindowPosition(Int32 left, Int32 top)
   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)

@msftrncs
Copy link
Collaborator

Maybe related to #922.

@daxian-dbw
Copy link
Member

The PlatformNotSupportedException issue is tracked by #922.
The ArgumentOutOfRangeException issue is likely fixed by #1182. Please try out the 2.0.0-rc1 from PowerShell Gallery, which contains several fixes related to various ArgumentOutOfRangeException issues.

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

No branches or pull requests

4 participants