Exception in `conhost` on Windows with `UpArrow`

Open
#4,745 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp, powershell
Domain
cli

Research direction

Start with the exception path from Microsoft.PowerShell.PSConsoleReadLine.HistoryRecall through UpdateFromHistory, Render, ForceRender, and ReallyRender, especially the ConsolePal.SetCursorPosition call. Reproduce on Windows by recalling history with repeated UpArrow and inspect the reported buffer dimensions. Done means the same interaction no longer raises System.IO.IOException.

Written by the indexing model from the issue text.

Description

Area-Stability Needs-Triage :mag:
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
PS C:\Program Files\PowerShell\7> from network import FeedbackSender
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.1
OS: Microsoft Windows 10.0.19045
BufferWidth: 66
BufferHeight: 9001

Last 115 Keys:

 p y t h o n Spacebar " C : \ U s e r s \ b o r i s \ D o c u m e n t s \ P Y T H O N \ C M D - A I _ a p p \ t e s t Spacebar i n t e r f a c e . p y " Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 UpArrow Enter
 LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow UpArrow UpArrow UpArrow UpArrow

### Exception

System.IO.IOException: Paramètre incorrect.
   at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Render()
   at Microsoft.PowerShell.PSConsoleReadLine.UpdateFromHistory(HistoryMoveCursor moveCursor)
   at Microsoft.PowerShell.PSConsoleReadLine.HistoryRecall(Int32 direction)
   at Microsoft.PowerShell.PSConsoleReadLine.PreviousHistory(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

c'est une sensation étrange de voir powershell bugger comme ça

Environment data
PS Version: 7.5.1
PS HostName: ConsoleHost
PSReadLine Version: 2.3.6
PSReadLine EditMode: Windows
OS: 10.0.19041.4522 (WinBuild.160101.0800)
BufferWidth: 271
BufferHeight: 9001
Steps to reproduce

c'était au éveil de la machine, j'avais tout laissé ouvert il a eu unn comprtement chelou puis ils sorti ce message

Expected behavior

behaviior normal

Actual behavior

ca a l'air de normal behavior, on verra

Dominant language
C#
Stars
4.4k
Forks
341
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PowerShell/PSReadLine

All issues in PowerShell/PSReadLine

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.