Skip to content

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

Closed

Description

@brandedoutcast

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

Activity

  1. EchoAbstract commented on Aug 6, 2019

    @EchoAbstract

    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+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+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+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
    

    Exception:

    System.PlatformNotSupportedException: Operation is not supported on this platform.
       at System.ConsolePal.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)
    

  2. msftrncs commented on Sep 13, 2019

    @msftrncs
    Collaborator

    Maybe related to #922.

  3. daxian-dbw commented on Dec 12, 2019

    @daxian-dbw
    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions