System.InvalidOperationException: Queue Empty when doing PSConsoleReadLine.ReadKey()
还没有人认领这个 Issue。
评估
调研方向
Start with the Microsoft.PowerShell.PSConsoleReadLine.ReadKey and InputLoop entries in the exception stack, focusing on the Queue.Dequeue call after compaction. Reproduce the listed PSReadLine 2.0.0 workflow in Windows Terminal, then verify that the first input no longer raises Queue empty.
由索引模型根据 Issue 内容生成。
描述
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
[DBG]: PS C:\MtiFilm\dev\SANDBOX-B>> I don't u
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new
### Environment
PSReadLine: 2.0.0
PowerShell: 5.1.26100.8457
OS: Microsoft Windows 10.0.26200
Last 69 Keys
/ c o l o r Enter
c l a u s d Backspace Backspace d e Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace c e Spacebar Backspace Backspace d Spacebar \ m t i f Tab d e v Tab s Tab Tab Tab Shift+Tab Enter
c l a u d e Enter
I Spacebar d o n ' t Spacebar u
### 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)
[DBG]: PS C:\MtiFilm\dev\SANDBOX-B>>
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new
### Environment
PSReadLine: 2.0.0
PowerShell: 5.1.26100.8457
OS: Microsoft Windows 10.0.26200
Last 80 Keys
/ c o l o r Enter
c l a u s d Backspace Backspace d e Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace c e Spacebar Backspace Backspace d Spacebar \ m t i f Tab d e v Tab s Tab Tab Tab Shift+Tab Enter
c l a u d e Enter
I Spacebar d o n ' t Spacebar u n d e r s t a n s d Escape
### 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
Environment data
PS Version: 5.1.26100.8457
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.0.0
PSReadLine EditMode: Windows
OS: 10.0.26100.1 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 61
Steps to reproduce
Randomly crashe on my first input after a compaction
Expected behavior
No exception
Actual behavior
The above exception happened. then when I tried to resume the conversation, I got this:
[DBG]: PS C:\MtiFilm\dev\SANDBOX-B>> claude --resume 1251e8d7-aaf0-45e2-8604-dff9aa3c8475
claude : Error: No deferred tool marker found in the resumed session. Either the session was not deferred, the marker
is stale (tool already ran), or it exceeds the tail-scan window. Provide a prompt to continue the conversation.
At line:1 char:1
- claude --resume 1251e8d7-aaf0-45e2-8604-dff9aa3c8475
-
+ CategoryInfo : NotSpecified: (Error: No defer...e conversation.:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError
- 主要语言
- C#
- 星标
- 4.4k
- 派生
- 341
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PowerShell/PSReadLine 的其他 Issue
-
Needs-Triage :mag:
难度 2/5 1-3 小时 新手友好度 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
难度 2/5 1-3 小时 新手友好度 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
难度 2/5 1-3 小时 新手友好度 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
难度 2/5 1-3 小时 新手友好度 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
难度 1/5 1 小时以内 新手友好度 68/100
PowerShell/PSReadLine#3470 · 3 个 reaction ·
查看 PowerShell/PSReadLine 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
难度 2/5 1-3 小时 新手友好度 72/100
azurenoops/spin_agent#975 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
难度 2/5 1-3 小时 新手友好度 92/100
dotnet/AspNetCore.Docs#37699 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
SubtitleEdit/subtitleedit#15108 · 1 条评论 ·