Unexpected System.ArgumentOutOfRangeException
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with the stack trace in Microsoft.PowerShell.PSConsoleReadLine, especially CalculateWhereAndWhatToRender and ReallyRender, and investigate the reported Windows Terminal resize or display-scaling conditions. Reproduce with a 120x41 buffer if possible and determine why the cursor top exceeds the console buffer. Done means the reported interaction no longer raises ArgumentOutOfRangeException.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.4.5
PowerShell: 7.6.6
OS: Microsoft Windows 10.0.26200
BufferWidth: 120
BufferHeight: 41
Last 200 Keys:
; o u t p u t S c h e m a = h t t p : / / w w w . i s o t c 2 1 1 . o r g / 2 0 0 5 / g m d & a m p ; e l e m e n t S e t N a m e = f u l l & a m p ; i d = 6 6 b 8 1 e a 6 - 3 0 5 6 - 4 6 d 0 - 8 7 3 f - 7 a 7 7 3 a 9 3 2 6 b c ' Enter
c d Spacebar N R C Tab Enter
l s Enter
c d Spacebar G e o Tab Tab Tab Tab Tab Tab Tab Tab Enter
l s Enter
l s Ctrl+c Ctrl+c c d Spacebar . . Enter
f z f Enter
w m s - p r o x y - l a m b d a - r u s t \ s r c \ m a i n . r s Home l e s s Spacebar Enter
c
### Exception
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. (Parameter 'top')
Actual value was 43.
at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.CalculateWhereAndWhatToRender(Boolean cursorMovedToInitialPos, RenderData renderData, LineInfoForRendering& lineInfoForRendering)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(PSKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)
Screenshot
Environment data
PS Version: 7.6.6
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.4.5
PSReadLine EditMode: Windows
OS: 10.0.26100.1 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 41
Steps to reproduce
Not sure if it is related: I unplugged my USB dock (with DisplayPort) and HDMI cable, so the Windows 11 Display Settings > Scale may have changed from 100% to 125%? I see the PowerShell terminal font size was changed as I switched tabs. It happened quite some time after I unplugged my laptop though, though I wasn't actively using that Windows Terminal tab until I switched to it, and the exception happened in front of my eyes. I forgot if I pressed any keys just before it happened though.
Expected behavior
No exception
Actual behavior
The above exception happens
- Lingua principale
- C#
- Stelle
- 4.4k
- Fork
- 341
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PowerShell/PSReadLine
-
Needs-Triage :mag:
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
PowerShell/PSReadLine#3470 · 3 reazioni ·
Tutte le issue di PowerShell/PSReadLine
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
azurenoops/spin_agent#975 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SubtitleEdit/subtitleedit#15108 · 1 commento ·