IndexOutOfRangeException following an attempt to type after running `dotnet build`
还没有人认领这个 Issue。
评估
调研方向
Start at Microsoft.PowerShell.PSConsoleReadLine.ReplaceCharInPlace in the stack trace and inspect how the input buffer is updated after the reported dotnet build command. Reproduce the failure if possible and verify that typing after the command no longer raises IndexOutOfRangeException; the report provides no specific reproduction steps or test file.
由索引模型根据 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
Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.yaml
Thank you!
### Environment
PSReadLine: 2.3.6+d2e770f93b7a53d8660a6402eb29d1ae1c35e767
PowerShell: 7.5.3
OS: Microsoft Windows 10.0.26100
BufferWidth: 133
BufferHeight: 71
Last 200 Keys:
F V . D o c s . C o r e Spacebar t o Spacebar . N E T Spacebar 7 Backspace 8 Escape 0 C g i t Spacebar l o g Enter g i t Spacebar c o Backspace Backspace s t a t u s Enter g i t Spacebar c o m m i t Spacebar - m Spacebar " U p g r a d e Spacebar F C Backspace V . D o c s . C o r e Spacebar t o Spacebar . N E T Spacebar 8 " Enter g i t Spacebar s t a t u s Enter Enter g i t Spacebar s t a t u s Enter d o t n e t Spacebar b u i l d Spacebar F i l e v i n e . S e r v i c e s / F i l e v i n e . / Backspace S e r v i c e s . c s p r o j Spacebar - c Spacebar R e l e a s e Enter UpArrow Enter UpArrow Enter Escape . \ r u
### Exception
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Text.StringBuilder.get_Chars(Int32 index)
at Microsoft.PowerShell.PSConsoleReadLine.ReplaceCharInPlace(Nullable`1 key, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)
Screenshot
The screenshot may contain sensitive information, but I can tell you that the last output was from a dotnet build command.
Environment data
PS Version: 7.5.3
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.3.6
PSReadLine EditMode: Vi
OS: 10.0.26100.1 (WinBuild.160101.0800)
BufferWidth: 133
BufferHeight: 71
Steps to reproduce
I experienced a delay when attempting to type at the prompt, then I got the exception text. I do not have specific steps to reproduce. This is the first time I have encountered this message.
Expected behavior
Not having an exception.
Actual behavior
There was a delay when I attempted to type, then I got the exception test pasted earlier.
- 主要语言
- 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 条评论 ·