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: 4
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
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..()
1 user thanked robinz for this useful post.
fanblade on 5/8/2023(UTC)
Remco
#2 Posted : Tuesday, September 28, 2021 12:17:08 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 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: 4
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
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: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 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: 4
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
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: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 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.
fanblade
#8 Posted : Monday, May 8, 2023 4:36:09 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/8/2023(UTC)
Posts: 1
Location: United States of America

Thanks: 1 times
I got the same error today and found a workaround. Similarly, it was an innocuous change to the code that compiled fine in Visual Studio but created this error when nCrunch compiled it. I don't know what the root cause was, but restarting my PC worked around the issue.
robinz
#9 Posted : Wednesday, August 2, 2023 4:55:10 PM(UTC)
Rank: Newbie

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

Was thanked: 1 time(s) in 1 post(s)
Got this error again after a small code change using NCrunch 4.11. I updated to 4.18.0.3 and received a similar error:

4.11

[PID:37408 10:39:22.244 LocalBuildTask-66] 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..()

4.18.0.3
NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/d...ng_project-build-issues
NCrunch has encountered an internal error: 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, GridClientDescription clientDescription, Boolean extractCoverageReportStructure)

I was able to get around this by removing some obsolete files in the offending project.
Remco
#11 Posted : Wednesday, August 2, 2023 11:40:54 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for sharing this issue.

I believe this to be a compatibility problem in NCrunch's assembly parsing system. Somehow, the size/structure of the assembly PDB it's trying to load is different to what it can handle.

I've yet to manage to produce such a situation with a test assembly in order to fix the problem. You might be able to work around this by using the new portable PDB format for this project instead of the old legacy one. The legacy PDBs are slowing being phased out now anyway.
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.112 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download