Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In VS Code getting this System.OutOfMemoryException: Array dimensions exceeded supported range. #1360

Closed
mukund720 opened this issue Feb 19, 2020 · 4 comments · Fixed by #3810
Labels
In-PR A PR is opened targeting the issue

Comments

@mukund720
Copy link

Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Last 0 Keys:

Exception:
System.OutOfMemoryException: Array dimensions exceeded supported range.
at System.Collections.Generic.List1.set_Capacity(Int32 value) at System.Collections.Generic.List1.EnsureCapacity(Int32 min)
at System.Collections.Generic.List`1.Add(T item)
at System.IO.File.InternalReadAllLines(String path, Encoding encoding)
at Microsoft.PowerShell.PSConsoleReadLine.b__67_0()
at Microsoft.PowerShell.PSConsoleReadLine.WithHistoryFileMutexDo(Int32 timeout, Action action)
at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Feb 19, 2020
@mukund720
Copy link
Author

please check image for ref.

@mukund720
Copy link
Author

image

@iSazonov
Copy link

Do you use 2.0 version?

@daxian-dbw
Copy link
Member

From the bug report template:

The maintainer may close your issue without further explanation or engagement if:
- You delete this entire template and go your own path;

So, please follow the bug report template to provide environment data and repro steps the next time.

As for the reported issue, I believe it's a real bug. PSReadLine calls File.ReadAllLines(Options.HistorySavePath) to get back all content of the file, and this issue is bound to happen when the file is too large.

@daxian-dbw daxian-dbw added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-More Investigation Initial investigation is done, but need to follow up. and removed Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. labels Feb 27, 2020
@daxian-dbw daxian-dbw removed Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-More Investigation Initial investigation is done, but need to follow up. labels Oct 2, 2023
@daxian-dbw daxian-dbw added the In-PR A PR is opened targeting the issue label Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In-PR A PR is opened targeting the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants