Skip to content

Getting an powershell-related error by spamming some keybinds while a command is executing #3264

@GEOEGII555

Description

@GEOEGII555

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

Произошла ошибка. Сообщите об этой ошибке, указав данные ниже.
Напишите в GitHub: https://github.com/PowerShell/PSReadLine/issues/new
### Среда
PSReadLine: 2.0.0
PowerShell: 5.1.22000.282
ОС: Microsoft Windows 10.0.22000
Последние 32 ключей

 p y t h o n Spacebar m a i n Ctrl+Backspace Ctrl+Backspace Ctrl+Backspace Ctrl+Backspace p y t h o n Spacebar m a i n . p y Enter
 UpArrow Enter
 UpArrow Enter
 Ctrl+Delete Ctrl+Insert

### Исключение
System.InvalidOperationException: Очередь пуста.
   в System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   в System.Collections.Generic.Queue`1.Dequeue()
   в Microsoft.PowerShell.PSConsoleReadLine.ReadKey()
   в Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   в Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

Screenshot

image

Environment data

PS Version: 5.1.22000.282
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.0.0
PSReadLine EditMode: Windows
OS: 10.0.22000.184 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 30

Steps to reproduce

Type some commands. While last command is executing, start hitting CTRL+INSERT, CTRL+DELETE and CTRL+PAUSE
Powershell will enter debug mode
Continue hitting without stopping, and here we go! An error!

Expected behavior

Switch command

Actual behavior

With a small chance, throwing out an error "System.InvalidOperationException: Queue is blank"

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