question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SetWindowPosition WinIOError

See original GitHub issue

Got this stacktrace shortly after maximizing the powershell window and increasing the font size, then continuing typing:

-----------------------------------------------------------------------
Last 200 Keys:
 Enter
 l s Enter
 d i r Enter
 X c p y Space Backspace Backspace Backspace o p y Space S t e a m Tab Space S t e a m Tab Backspace - c a f e o l d Space / H Backspace E Space / H Enter
 c d Space S Backspace c a f Tab Tab Tab Ctrl+c c d Space S t e a Tab Tab Enter
 Ctrl+l d i r Enter
 g i t Space s t a t u s Enter
 g i t Space l o g Enter
 ` g i t Space s t a t u s Backspace Backspace Backspace Backspace Backspace Backspace c h e c k o u t Space 4 f 7 0 3 f 5 2 e 3 c b 0 3 6 0 4 8 c b 3 7 7 1 6 7 f 1 0 0 0 a 3 b 3 5 f 8 8 c Enter
 c d Space . . Enter
 c d Space S t e Tab Enter
 d i r Enter
 Ctrl+l g i t Space s t a t u s Enter
 Ctrl+l g i t Space Ctrl+l

Exception:
System.IO.IOException: The parameter is incorrect.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.Console.SetWindowPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
jeffythedragonslayercommented, Aug 11, 2020

Install-Module PSReadLine -Force completed, but only in a powershell launched with admin privileges.

1reaction
vexx32commented, Aug 10, 2020

Yeah, that’s a fairly old version. Definitely worth upgrading with either Update-Module PSReadLine or (if that doesn’t work) you can also use Install-Module PSReadLine -Force

Quite a few of these issues were fixed already, so it’s possible you just need to upgrade. 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

'WinIOError' thrown from 'Ctrl+L' was fixed in recent versions
WinIOError (Int32 errorCode, String maybeFullPath) at System.Console.SetWindowPosition(Int32 left, Int32 top) at Microsoft.PowerShell.
Read more >
anaconda - Ctrl+l works in powershell but NOT in conda ...
WinIOError (Int32 errorCode, String maybeFullPath) at System.Console.SetWindowPosition(Int32 left, Int32 top) at Microsoft.PowerShell.
Read more >
SetWindowPos function (winuser.h) - Win32 apps
Changes the size, position, and Z order of a child, pop-up, or top-level window. These windows are ordered according to their appearance on ......
Read more >
Console.SetWindowPosition(Int32, Int32) Method (System)
The SetWindowPosition method affects the position of the console window relative to the screen buffer, but does not affect the position of the...
Read more >
Console.cs source code in C# .NET - dotnetframework.org
WinIOError (); // We need to reinitialize Console. ... set { SetWindowPosition(WindowLeft, value); } } public static unsafe void SetWindowPosition(int left, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found