Build/Test Issues

Portable vs Full pdbs

Started by spolonski on 1,277 views

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:

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?
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?
Hi Remco,

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

Thank you in advance.
Could you try the build below and let me know if this solves the problem for you?

NCrunch_Console_5.12.0.6.msi
NCrunch_Console_5.12.0.6.zip
NCrunch_GridNodeServer_5.12.0.6.msi
NCrunch_GridNodeServer_5.12.0.6.zip
NCrunch_LicenseServer_5.12.0.6.zip
NCrunch_Rider_5.12.0.6.7z
NCrunch_Rider_5.12.0.6.zip
NCrunch_VS2010_5.12.0.6.msi
NCrunch_VS2010_5.12.0.6.zip
NCrunch_VS2012_5.12.0.6.msi
NCrunch_VS2012_5.12.0.6.zip
NCrunch_VS2013_5.12.0.6.msi
NCrunch_VS2013_5.12.0.6.zip
NCrunch_VS2015_5.12.0.6.msi
NCrunch_VS2015_5.12.0.6.msi.7z
NCrunch_VS2015_5.12.0.6.zip
NCrunch_VS2017_5.12.0.6.msi
NCrunch_VS2017_5.12.0.6.msi.7z
NCrunch_VS2017_5.12.0.6.zip
NCrunch_VS2019_5.12.0.6.msi
NCrunch_VS2019_5.12.0.6.msi.7z
NCrunch_VS2019_5.12.0.6.zip
NCrunch_VS2022_5.12.0.6.msi
NCrunch_VS2022_5.12.0.6.msi.7z
NCrunch_VS2022_5.12.0.6.zip
Thanks, Remco. It works like a charm!

Post a reply

Log in to reply.