Skip to content

ArgumentOutOfRangeException for small Indexes #162

@derrickstolee

Description

@derrickstolee

When running gvfs clone on a small repo, we can get the following exception:

System.ArgumentOutOfRangeException: Must be greater than zero
Parameter name: allocationSize
   at GVFS.Virtualization.Projection.GitIndexProjection.ObjectPool`1..ctor(ITracer tracer, Int32 allocationSize, Func`1 objectCreator)
   at GVFS.Virtualization.Projection.GitIndexProjection.SortedFolderEntries.InitializePools(ITracer tracer, UInt32 indexEntryCount)
  ...

This can easily be remedied by initializing the memory pools with a minimum size when the index is small.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions