IndexOutOfRangeException following an attempt to type after running `dotnet build`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 341
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PowerShell/PSReadLine
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Difficulty 1/5 Under an hour Newbie friendliness 68/100
PowerShell/PSReadLine#3470 · 3 reactions ·
All issues in PowerShell/PSReadLine
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
azurenoops/spin_agent#975 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·