Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

System.ArgumentOutOfRangeException: Arrays larger than 2GB are not supported.
robinz
#1 Posted : Monday, September 27, 2021 11:38:19 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/25/2019(UTC)
Posts: 3
Location: United States of America

After a relatively small update I started getting the error below. I've confirmed that I can update to the prior commit and the error goes away. The code builds and runs just fine at the commit that causes the NCrunch error. I'm running version 4.9.0.8.

[PID:31152 18:16:23.8724 LocalBuildTask-56] ERROR (Internal): System.ArgumentOutOfRangeException: Arrays larger than 2GB are not supported.
Parameter name: sourceIndex
at System.Array.Copy(Array sourceArray, Int64 sourceIndex, Array destinationArray, Int64 destinationIndex, Int64 length)
at nCrunch.Compiler.Cil.Symbols.Legacy.CilLegacyPdbStreamDirectory.(CilAddress , CilAddress , UInt32 , UInt32 )
at nCrunch.Compiler.Cil.Symbols.Legacy.CilLegacyPdbStreamDirectory..ctor(CilAddress rawPdbBase, CilLegacyPdbHeader header)
at nCrunch.Compiler.Cil.Symbols.Legacy.CilLegacySymbolsDataSource..ctor(Byte[] pdbFileContent, UInt32 entryPointToken)
at nCrunch.Compiler.Cil.CilAssembly.Load(FilePath assemblyFile, CilContext context)
at nCrunch.Compiler.Cil.CachedCilAssembly..ctor(FilePath assemblyFilePath, CilContext context, Boolean isInstrumentationTarget)
at nCrunch.Compiler.Cil.CilSession.LoadAssembly(FilePath assemblyFilePath, Boolean isInstrumentationTarget)
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly..ctor(FilePath builtAssemblyFilePath, IList`1 adjustedAssemblyReferences, Boolean instrumentForPerformanceMeasurement, ComponentInstrumentationParameters instrumentationParameters, FilePath expectedForegroundBuildOutputPath)
at nCrunch.Compiler.RemoteBuildRunner..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
at nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
at nCrunch.Core.BuildManagement.BuildEnvironment..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridAddress clientAddress, Boolean extractCoverageReportStructure)
at nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.LocalProcessingTask.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.ProcessingQueue..()
Remco
#2 Posted : Tuesday, September 28, 2021 12:17:08 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,473

Thanks: 847 times
Was thanked: 1145 time(s) in 1069 post(s)
robinz;15664 wrote:
After a relatively small update I started getting the error below. I've confirmed that I can update to the prior commit and the error goes away. The code builds and runs just fine at the commit that causes the NCrunch error. I'm running version 4.9.0.8.


Thanks for sharing this issue. Can you confirm whether the update you're describing was to your own codebase, or was it to NCrunch itself?

Is the project involved of an unusual size?

Can you confirm if the build referenced in this thread solves the issue for you? https://forum.ncrunch.net/yaf_postst3145_Problem-with-new-instrumentation-since-4-9.aspx.
robinz
#3 Posted : Tuesday, September 28, 2021 2:56:47 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/25/2019(UTC)
Posts: 3
Location: United States of America

The update was to our codebase.

We're working in VS 2019, in Debug x64 mode.

On the update that works we have this size:
dll: 11.0 MB (11,601,920 bytes)
pdb: 26.1 MB (27,383,296 bytes)

The commit that fails has this size:
dll: 11.0 MB (11,602,432 bytes)
pdb: 26.1 MB (27,385,344 bytes)

I updated to NCrunch 4.10.0.2 and am receiving a similar error:
[PID:25896 09:52:18.7988 LocalBuildTask-53] ERROR (Internal): System.ArgumentOutOfRangeException: Arrays larger than 2GB are not supported.
Parameter name: sourceIndex
at System.Array.Copy(Array sourceArray, Int64 sourceIndex, Array destinationArray, Int64 destinationIndex, Int64 length)
at nCrunch.Compiler.Cil.Symbols.Legacy.CilLegacyPdbStreamDirectory.(CilAddress , CilAddress , UInt32 , UInt32 )
at nCrunch.Compiler.Cil.Symbols.Legacy.CilLegacyPdbStreamDirectory..ctor(CilAddress rawPdbBase, CilLegacyPdbHeader header)
at nCrunch.Compiler.Cil.Symbols.Legacy.CilLegacySymbolsDataSource..ctor(Byte[] pdbFileContent, UInt32 entryPointToken)
at nCrunch.Compiler.Cil.CilAssembly.Load(FilePath assemblyFile, CilContext context)
at nCrunch.Compiler.Cil.CachedCilAssembly..ctor(FilePath assemblyFilePath, CilContext context, Boolean isInstrumentationTarget)
at nCrunch.Compiler.Cil.CilSession.LoadAssembly(FilePath assemblyFilePath, Boolean isInstrumentationTarget)
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly..ctor(FilePath builtAssemblyFilePath, IList`1 adjustedAssemblyReferences, Boolean instrumentForPerformanceMeasurement, ComponentInstrumentationParameters instrumentationParameters, FilePath expectedForegroundBuildOutputPath)
at nCrunch.Compiler.RemoteBuildRunner..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
at nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
at nCrunch.Core.BuildManagement.BuildEnvironment..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridAddress clientAddress, Boolean extractCoverageReportStructure)
at nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.LocalProcessingTask.ProcessTa
Remco
#4 Posted : Tuesday, September 28, 2021 10:52:29 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,473

Thanks: 847 times
Was thanked: 1145 time(s) in 1069 post(s)
Thanks for these extra details.

I haven't seen this issue before. Somehow there has been a change in the way the O/S is structuring the PDB.

Do you have the option to switch to using a portable PDB instead? This would give an effective workaround to the problem.
robinz
#5 Posted : Thursday, September 30, 2021 11:05:24 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/25/2019(UTC)
Posts: 3
Location: United States of America

I was able to rebase the branch on a newer version of our software that had some changes to how the project was configured and the problem went away.
Remco
#6 Posted : Thursday, September 30, 2021 11:09:35 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,473

Thanks: 847 times
Was thanked: 1145 time(s) in 1069 post(s)
robinz;15676 wrote:
I was able to rebase the branch on a newer version of our software that had some changes to how the project was configured and the problem went away.


Thanks for letting me know. If you find a way to reproduce this problem with a self-contained sample you can share with me, please send it through the contact form. NCrunch is supposed to be able to handle any PDB produced by the compiler. It makes me nervous knowing it's possible for something to exist that we can't handle.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.055 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download