Closed konradbielik closed 2 weeks ago
What is the value you set to MaximumHistoryCount
? Did you change the value in profile?
The default value is 4096
(or the value of the $MaximumHistoryCount
from your PowerShell session). It looks to me your machine is under memory stress which caused creating the history queue to fail with the OutOfMemryException
.
Prerequisites
Exception report
Screenshot
https://github.com/PowerShell/PSReadLine/assets/89704884/41547ce7-7bed-43a7-8b6a-811fecd47f84
Environment data
Steps to reproduce
1, Install OSReadline v. 2.3.4 and PS 7.5.0-preview.2
Expected behavior
I want to work without disturb just like with the prev ver
Actual behavior
Environment
PSReadLine: 2.3.4 PowerShell: 7.5.0-preview.2 OS: Microsoft Windows 10.0.19045 BufferWidth: 120 BufferHeight: 30
Last 0 Keys:
Exception
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at Microsoft.PowerShell.HistoryQueue
1..ctor(Int32 capacity) at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize() at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics) at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable
1 lastRunStatus)