Skip to content

Powershell crash #5140

@JensMarissensAT

Description

@JensMarissensAT

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

### Environment
PSReadLine: 2.0.0
PowerShell: 5.1.26100.8115
OS: Microsoft Windows 10.0.26200
Last 66 Keys

 s s h Spacebar s e r v i c e @ 1 0 . 5 . 0 . 1 8 Enter
 s h s Backspace Backspace s h Spacebar s e r v i c e @ 1 0 . 5 . 0 . 3 Enter
 UpArrow Enter
 UpArrow Enter
 c l s Enter
 UpArrow UpArrow UpArrow DownArrow DownArrow UpArrow Backspace Backspace Backspace Backspace Backspace


### Exception

System.InvalidOperationException: Queue empty.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.Queue`1.Dequeue()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadKey()
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

Screenshot

Its broken

Environment data

### Environment
PSReadLine: 2.0.0
PowerShell: 5.1.26100.8115
OS: Microsoft Windows 10.0.26200
Last 66 Keys

 s s h Spacebar s e r v i c e @ 1 0 . 5 . 0 . 1 8 Enter
 s h s Backspace Backspace s h Spacebar s e r v i c e @ 1 0 . 5 . 0 . 3 Enter
 UpArrow Enter
 UpArrow Enter
 c l s Enter
 UpArrow UpArrow UpArrow DownArrow DownArrow UpArrow Backspace Backspace Backspace Backspace Backspace


### Exception

System.InvalidOperationException: Queue empty.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.Queue`1.Dequeue()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadKey()
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

Steps to reproduce

Idk

Expected behavior

Not this

Actual behavior

Its broken

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-Triage 🔍It's a new issue that core contributor team needs to triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions