You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exception after maximizing and restoring a powershell window a few times on windows 10 #292
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 49 Keys:
c d Spacebar C : Ctrl+Alt+< p r o j e c t s Ctrl+Alt+< c o r e c l r Enter
b u Tab Enter
Ctrl+LeftWindows Ctrl+Backspace RightArrow c d Spacebar , Backspace . . Ctrl+Alt+< c o r e f x Enter
UpArrow UpArrow Enter
UpArrow
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.ReallyRender()
at Microsoft.PowerShell.PSConsoleReadLine.HistoryRecall(Int32 direction)
at Microsoft.PowerShell.PSConsoleReadLine.PreviousHistory(Nullable`1 key, Object arg)
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)
-----------------------------------------------------------------------
I can confirm this happens on Windows 7 as well, so not OS version specific.
I can reproduce this by resizing my terminal (cmder) width down to something like 40 characters and then hitting Ctrl+C.
It's not exactly the same error as the OP but it's probably related.
PSReadLine: v1.0.0.13
Exception:
System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Array.Copy(Array sourceArray, Array destinationArray, Int32 length)
at PSConsoleUtilities.PSConsoleReadLine.ReallyRender()
at PSConsoleUtilities.PSConsoleReadLine.CancelLine(Nullable`1 key, Object arg)
at PSConsoleUtilities.PSConsoleReadLine.CopyOrCancelLine(Nullable`1 key, Object arg)
at PSConsoleUtilities.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at PSConsoleUtilities.PSConsoleReadLine.InputLoop()
at PSConsoleUtilities.PSConsoleReadLine.ReadLine(Runspace remoteRunspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------
Last 71 Keys:
Ctrl+v Enter
Ctrl+v Enter
Ctrl+v Enter
G e t - M a i l b o x S e a Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace s t a r t - M a i l b o x S e a r c h Spacebar b a c k u p m b o x Enter
LeftWindows LeftWindows UpArrow
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.Internal.ConhostConsole.set_WindowTop(Int32 value)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender()
at Microsoft.PowerShell.PSConsoleReadLine.HistoryRecall(Int32 direction)
at Microsoft.PowerShell.PSConsoleReadLine.PreviousHistory(Nullable`1 key, Object arg)
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)
-----------------------------------------------------------------------
Build 14332 (so I assume 1.2).
I did maximize the window and then used Win+Left key to dock it to the left half. Vertical scroll bar disappeared so I maximized it again.
A simple way to reproduce this error is to make PS window hight so small only the title bar is visible. Then type any character. Then make Windows bigger again and scroll up. Verified on multiple OS versions.
See demo gif here: http://imgur.com/a/XEZ54
So I have found this bug again, I was resizing my Window so that my folder directory was on one line and my "git push" or whatever i was writing would be on the line below, as i changed my buffer to match my window width, i noticed the G was still on the top line, i changed the buffer again, hit backspace like 4 or 5 times fast and got the following error.
Last 200 Keys:
a v a S c r i p t ' Enter
c d Spacebar . / Tab Enter
l s Enter
c l s Enter
g i t Spacebar i n i t Enter
g i t Spacebar s t a t u s Enter
UpArrow UpArrow Enter
UpArrow UpArrow Enter
g i t Spacebar a l Backspace d d Spacebar . Enter
UpArrow UpArrow Enter
g i t Spacebar c o m m i t Spacebar = Backspace - m Spacebar ' J v Backspac
e a v a F o l d e r ' Shift+Home Ctrl+c Ctrl+c Ctrl+v Enter
UpArrow UpArrow Enter
g i t Spacebar p u s h Enter
Ctrl+v Enter
UpArrow UpArrow Enter
UpArrow UpArrow UpArrow UpArrow Enter
UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpA
rrow UpArrow DownArrow Enter
UpArrow UpArrow Enter
UpArrow UpArrow UpArrow DownArrow DownArrow DownArrow DownArrow DownArrow U
pArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArr
ow Enter
UpArrow UpArrow Enter
LeftWindows UpArrow Backspace Backspace Backspace Backspace Backspace Backs
pace p u Backspace u l l Enter
l s Enter
UpArrow Enter
UpArrow UpArrow UpArrow Enter
Enter
Enter
Enter
g o t Backspace Backspace Backspace g i t Backspace Backspace Backspace
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 name: left
Actual value was 76.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender()
at Microsoft.PowerShell.PSConsoleReadLine.BackwardDeleteChar(Nullable1 k ey, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo ke y, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, Eng
ineIntrinsics engineIntrinsics)
Last 68 Keys:
c d Space d : \ Enter
c d Space w o Tab Enter
. / w Tab Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Exception:
System.IO.IOException: The parameter is incorrect.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.AcceptLineImpl(Boolean validate)
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)
Activity
MartiUK commentedon Mar 24, 2016
I can confirm this happens on Windows 7 as well, so not OS version specific.
I can reproduce this by resizing my terminal (cmder) width down to something like 40 characters and then hitting Ctrl+C.
It's not exactly the same error as the OP but it's probably related.
PSReadLine: v1.0.0.13
lzybkr commentedon Mar 28, 2016
Try upgrading to 1.2. I think I've fixed the exception, but I still haven't fixed the messed up display after resizing and pressing a single key.
miloush commentedon May 3, 2016
Build 14332 (so I assume 1.2).
I did maximize the window and then used Win+Left key to dock it to the left half. Vertical scroll bar disappeared so I maximized it again.
TomAafloen commentedon Jun 14, 2017
A simple way to reproduce this error is to make PS window hight so small only the title bar is visible. Then type any character. Then make Windows bigger again and scroll up. Verified on multiple OS versions.
See demo gif here: http://imgur.com/a/XEZ54
rorychatterton commentedon Jul 5, 2017
+1
lzybkr commentedon Nov 6, 2017
With b2979d1, this should be completely fixed - no exception and no jumping around after resize.
time-by-waves commentedon Feb 2, 2018
So I have found this bug again, I was resizing my Window so that my folder directory was on one line and my "git push" or whatever i was writing would be on the line below, as i changed my buffer to match my window width, i noticed the G was still on the top line, i changed the buffer again, hit backspace like 4 or 5 times fast and got the following error.
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
Last 200 Keys:
a v a S c r i p t ' Enter
c d Spacebar . / Tab Enter
l s Enter
c l s Enter
g i t Spacebar i n i t Enter
g i t Spacebar s t a t u s Enter
UpArrow UpArrow Enter
UpArrow UpArrow Enter
g i t Spacebar a l Backspace d d Spacebar . Enter
UpArrow UpArrow Enter
g i t Spacebar c o m m i t Spacebar = Backspace - m Spacebar ' J v Backspac
e a v a F o l d e r ' Shift+Home Ctrl+c Ctrl+c Ctrl+v Enter
UpArrow UpArrow Enter
g i t Spacebar p u s h Enter
Ctrl+v Enter
UpArrow UpArrow Enter
UpArrow UpArrow UpArrow UpArrow Enter
UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpA
rrow UpArrow DownArrow Enter
UpArrow UpArrow Enter
UpArrow UpArrow UpArrow DownArrow DownArrow DownArrow DownArrow DownArrow U
pArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArr
ow Enter
UpArrow UpArrow Enter
LeftWindows UpArrow Backspace Backspace Backspace Backspace Backspace Backs
pace p u Backspace u l l Enter
l s Enter
UpArrow Enter
UpArrow UpArrow UpArrow Enter
Enter
Enter
Enter
g o t Backspace Backspace Backspace g i t Backspace Backspace Backspace
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 name: left
Actual value was 76.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender()
at Microsoft.PowerShell.PSConsoleReadLine.BackwardDeleteChar(Nullable
1 k ey, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo ke y, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, Eng
ineIntrinsics engineIntrinsics)
P
rkeithhill commentedon Feb 2, 2018
@greenSacrifice As an aside, if you are using posh-git, try this setting to make your prompt span two lines:
gives:
Then you won't need to resize your window.
lzybkr commentedon Feb 2, 2018
@greenSacrifice - this is fixed in the latest release.
taoyichen commentedon Sep 8, 2019
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
Last 68 Keys:
c d Space d : \ Enter
c d Space w o Tab Enter
. / w Tab Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Exception:
System.IO.IOException: The parameter is incorrect.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.AcceptLineImpl(Boolean validate)
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)
taoyichen commentedon Sep 8, 2019
Happens after snap right