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.

Intermittent out-of-memory errors with the 3.4.153-alpha release in Visual Studio

See original GitHub issue

Hi,

I tried installing the 3.4.142-alpha release into a small project a while back and it all seemed ok, but then more recently tried in with a much larger solution and started seeing #540.

I’ve now tried updating that larger solution to the 3.4.153-alpha package, and that seems to work ok for a few builds, but then starts failing with

1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018: The "Nerdbank.GitVersioning.Tasks.GetBuildVersion" task failed unexpectedly.
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018: System.IO.IOException: Not enough memory resources are available to process this command.
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.IO.MemoryMappedFiles.MemoryMappedView.CreateView(SafeMemoryMappedFileHandle memMappedFileHandle, MemoryMappedFileAccess access, Int64 offset, Int64 size)
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.IO.MemoryMappedFiles.MemoryMappedFile.CreateViewAccessor(Int64 offset, Int64 size, MemoryMappedFileAccess access)
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.ManagedGit.GitPack..ctor(GetObjectFromRepositoryDelegate getObjectFromRepositoryDelegate, Lazy`1 indexStream, Func`1 packStream, GitPackCache cache)
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.ManagedGit.GitPack..ctor(GetObjectFromRepositoryDelegate getObjectFromRepositoryDelegate, String indexPath, String packPath, GitPackCache cache)
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.ManagedGit.GitPack..ctor(GitRepository repository, String name)
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.ManagedGit.GitRepository.LoadPacks()
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.Lazy`1.CreateValue()
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.Lazy`1.LazyInitValue()
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.Lazy`1.get_Value()
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.ManagedGit.GitRepository.TryGetObjectBySha(GitObjectId sha, String objectType, Stream& value)
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.ManagedGit.GitRepository.GetObjectBySha(GitObjectId sha, String objectType)
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.ManagedGit.GitRepository.GetCommit(GitObjectId sha, Boolean readAuthor)
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.ManagedGit.GitRepository.GetHeadCommit(Boolean readAuthor)
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.Managed.ManagedGitContext..ctor(String workingDirectory, String dotGitPath, String committish)
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.GitContext.Create(String path, String committish, Boolean writable)
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.Tasks.GetBuildVersion.ExecuteInner()
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at MSBuildExtensionTask.ContextAwareTask.Execute()
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:\Users\Richard Webb\.nuget\packages\nerdbank.gitversioning\3.4.153-alpha\build\Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

And once it gets into that state it keeps failing until I close and reopen Visual Studio (just closing and reopening the solution doesn’t seem to fix it). I’ve also only seen the error when building inside Visual Studio (2019) - dotnet build from the command line seems ok.

The git repo for the project that gets the error is quite large (over 400 megabytes), whereas the one where it’s ok is trivial. I’m not sure if there is an issue with large data, or if that case just happens to fail over some other issue more quickly?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Numpsycommented, Dec 7, 2020

I’ve just given it a go, and the new version does seem to have fixed it 😃

1reaction
qmfrederikcommented, Dec 7, 2020

@Numpsy version 3.4.161-alpha, which is available on NuGet, should contain a fix for this. Could you give that version a try and let me know if it resolved the issue for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How Do I Fix Visual Studio 2022 Out of Memory Issue?
When I launch the project, the overall memory load hits. This sounds to me that not visual studio is maxing out of memory...
Read more >
Debugger Services Running Out of Memory - Visual Studio ...
The Debugging Services ran out of memory and caused the termination of the debugging session. To investigate this error on Windows. You can ......
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