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

Notification

Icon
Error

Project fails to build under optimized mode engine due to index out of range exception
Mark
#1 Posted : Friday, December 20, 2019 1:56:19 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 2/29/2012(UTC)
Posts: 36

Thanks: 13 times
Was thanked: 8 time(s) in 8 post(s)
When first loading NCrunch on this project with the new optimized mode, it gave an exception in the build of the project. (Which was visible in the NCrunch Processing Queue). Reverting back to legacy mode allowed the project to build fine.

We do use Fody for IL weaving,
.Net Framework 4.5.2 on this particular project.
NCrunch Version v4.0.02
VS 2019 16.3.7

[07:46:55.4595-LocalBuildTask-51] ERROR: nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type 'AJG.BSD.Framework.Services.Logging.ApiCallProxyLoggerAsync' due to exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at nCrunch.Compiler.Cil.Types.CilTypeDefTable.GetRowByMethodDefIndex(UInt32 methodDefTableRowIndex)
at nCrunch.Compiler.Cil.Methods.CilMethodDefinition.TryResolveASyncTarget()
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(Boolean , ClassMethodData , Dictionary`2 , CilTypeDefinition , FNV64& , CilMethodDefinition )
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
at nCrunch.Compiler.CilProcessingTasks.CilMethodHashingTask..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
[07:46:55.4665-LocalBuildTask-51] ERROR (Internal): nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type 'AJG.BSD.Framework.Services.Logging.ApiCallProxyLoggerAsync' due to exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at nCrunch.Compiler.Cil.Types.CilTypeDefTable.GetRowByMethodDefIndex(UInt32 methodDefTableRowIndex)
at nCrunch.Compiler.Cil.Methods.CilMethodDefinition.TryResolveASyncTarget()
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(Boolean , ClassMethodData , Dictionary`2 , CilTypeDefinition , FNV64& , CilMethodDefinition )
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
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, GridAddress clientAddress)
at nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.LocalProcessingTask.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.ProcessingQueue..()

Thanks,
Mark Smith
michaelkroes
#2 Posted : Friday, December 20, 2019 2:04:23 PM(UTC)
Rank: NCrunch Developer

Groups: Registered
Joined: 9/22/2017(UTC)
Posts: 306
Location: Netherlands

Thanks: 138 times
Was thanked: 73 time(s) in 69 post(s)
Hi Mark,

Thanks for posting! Sorry you're experiencing this issue.

We released a new version of NCrunch that has some fixes for the new optimized instrumentation mode. Would you mind giving that a try?

https://www.ncrunch.net/download

Michael
1 user thanked michaelkroes for this useful post.
Mark on 12/20/2019(UTC)
Mark
#3 Posted : Friday, December 20, 2019 2:44:07 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 2/29/2012(UTC)
Posts: 36

Thanks: 13 times
Was thanked: 8 time(s) in 8 post(s)
I updated to the trial of of 4.2.0.7 and it builds fine. Looks like you guys fixed this one. Looks like I got 30 days to figure out updating my license.

Thanks,
Mark Smith
1 user thanked Mark for this useful post.
michaelkroes on 12/20/2019(UTC)
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.034 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download