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
Navigate to a path that is relatively long, for me it was: "C:\Users\User\Documents\ADRG\Apps\Momentus Creatorship\ArticleTypeOneBeta\Aemm Build\ARCapture>"
Open a new Powershell window using Shift + Right mouse click in this directory then => Open PowerShell window here
Type anything you want
Snap the window to the left side of the screen, click out side the window to settle, you will see the path is now shortened.
Then backspace everything you have typed till it hits the ">" part of the PS path.
Error is displayed
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 Microsoft.PowerShell.PSConsoleReadLine.ReallyRender()
at Microsoft.PowerShell.PSConsoleReadLine.BackwardDeleteChar(Nullable1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
Thanks. The rendering code was rewritten in #561, the code raising that exception is gone. There is still a small bug with resizing the console, but it doesn't cause an exception, just a messed up render.
Activity
lzybkr commentedon Oct 17, 2017
I believe this is fixed in #561.
I'll publish a pre-release version to the PowerShell Gallery as soon as they support pre-releases.
If you'd like to try a fix before that, you can build the lastest yourself from the master branch, or
grab a build from AppVeyor like this one.
Note the version number is now 2.0, so be sure to copy the contents to \PSReadLine\2.0.
markvincze commentedon Oct 17, 2017
I think I have another repro of the same issue:
The same exception is displayed.
lzybkr commentedon Oct 17, 2017
Thanks. The rendering code was rewritten in #561, the code raising that exception is gone. There is still a small bug with resizing the console, but it doesn't cause an exception, just a messed up render.
lzybkr commentedon Nov 4, 2017
I'll have an official prerelease build out next week if you want to verify this is fixed, otherwise you can grab a build out of appveyor here.