Skip to content

Exception thrown when stopping a stuck git log session with Alt+Pause #3260

Closed
@scaramushe

Description

@scaramushe

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.1.0
PowerShell: 5.1.22000.282
OS: Microsoft Windows 10.0.22000
BufferWidth: 138
BufferHeight: 70

Last 200 Keys

 2 e 1 Enter
 g i t Spacebar l o g Spacebar 3 3 9 8 2 e 1 Enter
 UpArrow UpArrow UpArrow DownArrow Ctrl+Backspace - - a b o Tab Enter
 UpArrow UpArrow DownArrow Ctrl+Backspace Backspace Backspace c 5 9 5 5 f 7 0 7 6 8 c 2 2 3 9 1 7 9 b 3 5 5 b 7 b 5 4 6 3 9 1 a 4 a d 6 4 7 7 Enter
 UpArrow UpArrow UpArrow UpArrow Enter
 UpArrow Ctrl+Backspace 6 5 b 9 b 8 2 Enter
 UpArrow Ctrl+Backspace 6 d 7 3 8 e c Enter
 UpArrow Ctrl+LeftArrow Ctrl+Backspace Ctrl+Backspace l o g Spacebar Enter
 q Backspace g i t Spacebar m e r g e t Tab Enter
 UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow Enter
 UpArrow UpArrow DownArrow Ctrl+Backspace Backspace Backspace 5 1 f e 6 8 0 6 a b e 7 2 d d 8 9 6 c c 3 d a d 8 3 e c e 3 2 1 7 2 7 3 d b 5 b Enter
 UpArrow UpArrow Enter
 g i t Spacebar l o g Enter
 UpArrow UpArrow UpArrow UpArrow UpArrow Enter
 Alt+Pause

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

image

Environment data

PS Version: 5.1.22000.282
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.1.0
PSReadLine EditMode: Windows
OS: 10.0.22000.1 (WinBuild.160101.0800)
BufferWidth: 138
BufferHeight: 70

Steps to reproduce

When recovering from issue reproted in microsoft/terminal#12828, pressed Alt+Pause to break out of stuck state.
Then pressed it again and got this error

Expected behavior

No exception

Actual behavior

Exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-StabilityLabel for tracking stability IssuesIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-ReproThere is no sufficient information on repro steps.Resolution-Fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions