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

Notification

Icon
Error

Portable vs Full pdbs
spolonski
#1 Posted : Tuesday, January 21, 2025 6:29:52 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 7/11/2016(UTC)
Posts: 38
Location: Germany

Thanks: 6 times
Was thanked: 5 time(s) in 5 post(s)
Hi Remco,

Yesterday, NCrunch threw an error: "System.ArgumentOutOfRangeException: Arrays larger than 2GB are not supported" in one of the projects. After that, we changed the DebugType to "portable" in all projects. The test ran successfully from the IDE.
However, today, several projects launched using the console runner failed to compile due to the following error:

Code:
NCrunch has encountered an internal error: System.Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at nCrunch.Compiler.CoverageReportStructure.(Dictionary`2 , String )
at nCrunch.Compiler.CoverageReportStructure..(KeyValuePair`2 )
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at nCrunch.Compiler.CoverageReportStructure.(CilAssembly , Dictionary`2 )
at nCrunch.Compiler.CoverageReportStructure.FromAssembly(CilAssembly assembly, Dictionary`2 codeFilePathsByWorkspaceFilePath, DirectoryPath instrumentationParametersForegroundOutDir)
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly.ExtractCoverageReportStructure()
at nCrunch.Compiler.CilProcessingTasks.CilExtractCoverageReportStructureTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.ProcessTasks(Int32 backgroundThreadsAllowed)
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) 

What should we do?
Remco
#2 Posted : Tuesday, January 21, 2025 11:11:28 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 967 times
Was thanked: 1298 time(s) in 1203 post(s)
Thanks for sharing this issue.

The problem looks to be caused by a null entry in the PDBs document table, which seems like it should be an error case, but I guess the compiler is emitting it, so we should probably assume that it's valid.

Are you running anything that might affect the behaviour of the compiler in regards to debug information? For example, custom Roslyn analyzers or use of compiler directives to redirect line numbers?

I think I can isolate the area throwing the exception and might be able to provide a speculative fix (I have no idea how to reproduce the problem), which might get you working, if you're interested?
spolonski
#3 Posted : Tuesday, January 21, 2025 11:19:09 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 7/11/2016(UTC)
Posts: 38
Location: Germany

Thanks: 6 times
Was thanked: 5 time(s) in 5 post(s)
Hi Remco,

we are not using anything like that. Yes, I am interested in the fix indeed.

Thank you in advance.
Remco
#4 Posted : Wednesday, January 22, 2025 1:38:45 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 967 times
Was thanked: 1298 time(s) in 1203 post(s)
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.035 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download