Skip to content

PSReadline exception #1500

Closed
Closed

Description

@dbatchelor

Environment

PS version: 5.1.18362.628
PSReadline version: 2.1.0-beta1
os: 10.0.18362.1 (WinBuild.160101.0800)
PS file version: 10.0.18362.1 (WinBuild.160101.0800)
HostName: Visual Studio Code Host
BufferWidth: 185
BufferHeight: 20

Exception report

Last 200 Keys

 Backspace f o r m a t - Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace UpArrow Enter
 c o n v e r t - f r o m j s o n Spacebar - Tab Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace f r o m - j s o n Spacebar 
- Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Tab Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace ? Enter
 e d i t - Backspace Backspace Backspace Backspace m d f Backspace Backspace f Spacebar c o n v e r t - j s t o n Backspace Backspace Backspace o n Tab Tab Spacebar v Backspace Enter   
 UpArrow Home Delete Delete Delete e d 9 = Backspace Backspace i t - m y Tab Enter
 i p m o Spacebar m y i t Spacebar - f o r c e Enter
 UpArrow UpArrow Escape

Exception

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Text.StringBuilder.Insert(Int32 index, String value)
   at Microsoft.PowerShell.PSConsoleReadLine.EditItemDelete.Undo()
   at Microsoft.PowerShell.PSConsoleReadLine.RevertLine(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)

Steps to reproduce

Not specific unfortunately ... it happens after the integrated host has been running for awhile, getting slower and slower.

Expected behavior

Work at least as well as Powershell or PWSH environments

Actual behavior

The integrated host tends to start getting slower than regular powershell/pwsh ... loading modules takes longer, intellisense degrades/stops, sometimes the console will appear to go blank (discovered that if i toggle the color theme then it resumes ok), and finally an exception like the one above. Usually at this point, I will restart the integrated console.

Activity

  1. ghost added
    Needs-Triage 🔍It's a new issue that core contributor team needs to triage.
    on May 5, 2020
  2. daxian-dbw commented on May 5, 2020

    @daxian-dbw
    Member

    This is a duplicate of #1495, which will be fix soon by #1496 (the 2nd commit)

  3. ghost removed
    Needs-Triage 🔍It's a new issue that core contributor team needs to triage.
    on May 5, 2020
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

    Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions