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



NCrunch internal exception
#1 Posted : Tuesday, September 5, 2023 7:55:00 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/19/2020(UTC)
Posts: 4
Location: Sweden


I'm getting an exception in NCrunch for my .NET 7 Web SDK project in the trace output. See details below. I tried to rebuild project in VS, in NCrunch, clear all NCrunch caches, VS caches, user temp cache but this keeps coming back. The code compiles just fine in VS using latest .NET 7 SDK. I'm using Could you please have a look at this?

This is a show stopper for me currently.


NCrunch has encountered an internal error: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at nCrunch.Compiler.Cil.Types.CilNestedClassTable..ctor(CilModule module, CilTableInfo tableInfo)
at nCrunch.Compiler.Cil.CilModule..ctor(CilAssembly assembly, CilMetadataRoot metadataRoot, CilPeHeaders peHeaders, CilContext context, DirectoryPath workingDirectory, UInt32 entryPointToken)
at nCrunch.Compiler.Cil.CilAssembly..ctor(Byte[] , CilContext , DirectoryPath )
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)
#2 Posted : Tuesday, September 5, 2023 11:31:21 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 901 times
Was thanked: 1223 time(s) in 1143 post(s)
Hi, thanks for sharing this issue.

This problem is caused by an odd structure in the CIL of the assembly being instrumented by NCrunch. We've seen this one in the wild before, but it tends to be fleeting and seems to depend on the size of the assembly in question. So far, we haven't been able to reproduce it in an environment where we're able to fix it.

Is this something you can reproduce with a sample project? Or would you be able to share the compiled assembly with me?
Users browsing this topic
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.026 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download