Skip to content

Problem with a really large item in history on macOS #941

Closed

Description

Environment data

PS version: 6.2.0-rc.1
PSReadline version: 2.0.0-beta3
os: Darwin ************** 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
PS file version:
BufferHeight: 63
BufferWidth: 131
WindowHeight: 63
WindowWidth: 131

Error

Last 200 Keys:

 $ p ' + " i " + ' d ' ) ; Enter
 $ n u l l = g e ` T ` - c O M m A ` N D Space g e t - * ; Enter
 $ n u l l = I n v o k e - E x p r e s s i o n ( ' d ' + " i " + ' r ' ) ; Enter
 $ n u l l = I n v o k e - E x p r e s s i o n ( ' $ p ' + " i " + ' d ' ) ; Enter
 $ n u l l = g e ` T ` - c O M m A ` N D Space g e t - * ; Enter
 $ n u l l = I n v o k e - E x p r e s s i o n ( ' d ' + " i " + ' r ' ) ; Enter
 $ n u l l = I n Enter
 Enter
 ' @ Enter
 UpArrow UpArrow

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: top
Actual value was -173.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.HistoryRecall(Int32 direction)
   at Microsoft.PowerShell.PSConsoleReadLine.PreviousHistory(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)

Steps to reproduce or exception report

  • put the following in history
get-command
  • put the following in history
@'
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=Invoke-Expression('$p'+"i"+'d');
$null=ge`T`-cOMmA`ND get-*;
$null=Invoke-Expression('d'+"i"+'r');
$null=In

'@
  • hit up arrow twice to get to the first item in history

Activity

  1. lzybkr commented on Jun 14, 2019

    @lzybkr
    Contributor

    This is probably being reported frequently. See #663 and #691 for my feedback on an attempt at the fix.

    I think fixing this issue properly (not exactly what's in #691) should be a priority.

  2. changed the title [-]Problem with a really large item in history on mac os[/-] [+]Problem with a really large item in history on macOS[/+] on Jun 18, 2019
  3. daxian-dbw commented on Sep 12, 2019

    @daxian-dbw
    Member

    Fixed by #979

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

    OutOfRangeIssues relating to System.ArgumentOutOfRangeException

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions