Hi,
I already submitted an issue via VS directly, after updating to NCrunch v4 (all cashes are cleared, vs restarted multiple times) one project fails to build (switching back to Default/Legacy Instrumentation Mode makes NCrunch working again).
BTW: We are using sdk-based project files with .NET 4.7.2.
Here is the source code that seems to break NCrunch (inkl. the Interface):
public interface IIdGenerationRepository<TIdItem> where TIdItem : class, IIdItem
{
#region Public Methods
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
Task<int> GetNextIdAsync();
#endregion
}
public class IdGenerationRepository<TIdItem> : IIdGenerationRepository<TIdItem>
where TIdItem : class, IIdItem
{
#region Private Fields
//Hier wird immer 1 genommen, da die Implementierung vom _repository.Create eine Id verlangt.
//Diese wird nicht gespeichert und auch nicht in der Implementierung verwendet.
private const string Id = "1";
private readonly IRepository<TIdItem> _repository;
#endregion
#region Initialization
public IdGenerationRepository(IRepository<TIdItem> repository)
{
_repository = repository;
}
#endregion
#region Interface Implementation: IIdGenerationRepository<TIdItem>
public async Task<int> GetNextIdAsync()
{
TIdItem idItemEF = _repository.Create(Id);
await _repository.SaveAsync(idItemEF);
return idItemEF.ConsecutiveNumber;
}
#endregion
}
[15:37:20.8093-LocalBuildTask-79] ERROR (Internal): nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type 'Upper.DistributionManager.Data.IdGenerationRepository`1' 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..()
Please let me know if I can help to fix the issue.
br
Renè
Build/Test Issues
NCrunch 4 - Instrumentation Mode - Optimized - Project fails to build
Started by UppSol on 6,423 views
Hi!
Thanks for taking the time to report the issue in such great detail. We will have a look and report back to you.
Michael
Thanks for taking the time to report the issue in such great detail. We will have a look and report back to you.
Michael
We get the same error (obviously for a different class!). Have also submitted a bug report
Remco NCrunch Developer
#14027
08 Nov 2019 00:43 UTC
Thanks for sharing this problem. Would you be interested in trying the build below and confirming whether this solves the issue?
NCrunch_Console_4.0.0.3.msi
NCrunch_Console_4.0.0.3.zip
NCrunch_GridNodeServer_4.0.0.3.msi
NCrunch_GridNodeServer_4.0.0.3.zip
NCrunch_LicenseServer_4.0.0.3.zip
NCrunch_VS2008_4.0.0.3.msi
NCrunch_VS2010_4.0.0.3.msi
NCrunch_VS2010_4.0.0.3.zip
NCrunch_VS2012_4.0.0.3.msi
NCrunch_VS2012_4.0.0.3.zip
NCrunch_VS2013_4.0.0.3.msi
NCrunch_VS2013_4.0.0.3.zip
NCrunch_VS2015_4.0.0.3.msi
NCrunch_VS2015_4.0.0.3.msi.7z
NCrunch_VS2015_4.0.0.3.zip
NCrunch_VS2017_4.0.0.3.msi
NCrunch_VS2017_4.0.0.3.msi.7z
NCrunch_VS2017_4.0.0.3.zip
NCrunch_VS2019_4.0.0.3.msi
NCrunch_VS2019_4.0.0.3.msi.7z
NCrunch_VS2019_4.0.0.3.zip
NCrunch_Console_4.0.0.3.msi
NCrunch_Console_4.0.0.3.zip
NCrunch_GridNodeServer_4.0.0.3.msi
NCrunch_GridNodeServer_4.0.0.3.zip
NCrunch_LicenseServer_4.0.0.3.zip
NCrunch_VS2008_4.0.0.3.msi
NCrunch_VS2010_4.0.0.3.msi
NCrunch_VS2010_4.0.0.3.zip
NCrunch_VS2012_4.0.0.3.msi
NCrunch_VS2012_4.0.0.3.zip
NCrunch_VS2013_4.0.0.3.msi
NCrunch_VS2013_4.0.0.3.zip
NCrunch_VS2015_4.0.0.3.msi
NCrunch_VS2015_4.0.0.3.msi.7z
NCrunch_VS2015_4.0.0.3.zip
NCrunch_VS2017_4.0.0.3.msi
NCrunch_VS2017_4.0.0.3.msi.7z
NCrunch_VS2017_4.0.0.3.zip
NCrunch_VS2019_4.0.0.3.msi
NCrunch_VS2019_4.0.0.3.msi.7z
NCrunch_VS2019_4.0.0.3.zip
I'm not OP but I could consistently reproduce this problem with 4.0.0.2. Upgrading to 4.0.0.3 has resolved the issue for me.
Remco wrote:Thanks for sharing this problem. Would you be interested in trying the build below and confirming whether this solves the issue?
NCrunch_Console_4.0.0.3.msi
NCrunch_Console_4.0.0.3.zip
NCrunch_GridNodeServer_4.0.0.3.msi
NCrunch_GridNodeServer_4.0.0.3.zip
NCrunch_LicenseServer_4.0.0.3.zip
NCrunch_VS2008_4.0.0.3.msi
NCrunch_VS2010_4.0.0.3.msi
NCrunch_VS2010_4.0.0.3.zip
NCrunch_VS2012_4.0.0.3.msi
NCrunch_VS2012_4.0.0.3.zip
NCrunch_VS2013_4.0.0.3.msi
NCrunch_VS2013_4.0.0.3.zip
NCrunch_VS2015_4.0.0.3.msi
NCrunch_VS2015_4.0.0.3.msi.7z
NCrunch_VS2015_4.0.0.3.zip
NCrunch_VS2017_4.0.0.3.msi
NCrunch_VS2017_4.0.0.3.msi.7z
NCrunch_VS2017_4.0.0.3.zip
NCrunch_VS2019_4.0.0.3.msi
NCrunch_VS2019_4.0.0.3.msi.7z
NCrunch_VS2019_4.0.0.3.zip
4.0.0.3 fixed the issue for us, thx for the amazing response time!!
Keep up the good work!
br
Renè
Fixes it for us too. Thanks
We've installed the 4.1.0.1 version and still got the problem.
The processing queue display this error for one of our project (.Net Core app 2.2) using the new Optimized instrumentation
[08:43:37.3733-LocalBuildTask-29] ERROR (Internal): nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type 'ABC.DEF' due to exception: nCrunch.Compiler.Cil.Types.CilResolutionFailedException: The expected type with identifier '9234630561816887799' was not found in this assembly
at nCrunch.Compiler.Cil.Types.CilExportedTypeTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeDefTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilExportedTypeTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeDefTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeDefinition.ResolveBaseType()
at nCrunch.Compiler.Cil.Methods.CilMethodsWithInheritanceEnumerator.MoveNext()
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..()
The processing queue display this error for one of our project (.Net Core app 2.2) using the new Optimized instrumentation
[08:43:37.3733-LocalBuildTask-29] ERROR (Internal): nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type 'ABC.DEF' due to exception: nCrunch.Compiler.Cil.Types.CilResolutionFailedException: The expected type with identifier '9234630561816887799' was not found in this assembly
at nCrunch.Compiler.Cil.Types.CilExportedTypeTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeDefTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilExportedTypeTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeDefTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeDefinition.ResolveBaseType()
at nCrunch.Compiler.Cil.Methods.CilMethodsWithInheritanceEnumerator.MoveNext()
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..()
Also have a problem on 4.1.0.1 with optimized builds enabled. Bug report submitted.
System.NullReferenceException: Object reference not set to an instance of an object.
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..()
Also getting a Null reference exception - NCrunch 4.1.0.1
[18:13:30.3805-LocalBuildTask-24] ERROR: System.InvalidOperationException: Das Objekt mit Nullwert muss einen Wert haben.
bei System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
bei nCrunch.Compiler.NewStaticManipulation.InstrumentationConcerns.PerformanceTrackingInstrumentationConcern.CompleteMethodInstrumentation()
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilManipulationOperation , CilMethodDefinition , CilTypeDefinition , CilMethodBody , Boolean )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilTypeDefinition , InstrumentationOutput , CilManipulationOperation , IInstrumentationFilter[] )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.Instrument(IInstrumentationFilter[] instrumentationFilters, PerfTracker perfTracker)
bei nCrunch.Compiler.CilProcessingTasks.CilInstrumentationTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
[18:13:30.3826-LocalBuildTask-24] ERROR (Internal): System.InvalidOperationException: Das Objekt mit Nullwert muss einen Wert haben.
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.ProcessTasks(Int32 backgroundThreadsAllowed)
bei nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
bei nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
bei nCrunch.Core.BuildManagement.BuildEnvironment..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridAddress clientAddress)
bei nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
bei nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
bei nCrunch.Client.Processing.LocalProcessingTask.ProcessTaskAndReturnSuccessFlag()
bei nCrunch.Client.Processing.ProcessingQueue..()
Submitted a bug report.
Solution can be found at
https://github.com/SimControl/SimControl.Reactive
[18:13:30.3805-LocalBuildTask-24] ERROR: System.InvalidOperationException: Das Objekt mit Nullwert muss einen Wert haben.
bei System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
bei nCrunch.Compiler.NewStaticManipulation.InstrumentationConcerns.PerformanceTrackingInstrumentationConcern.CompleteMethodInstrumentation()
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilManipulationOperation , CilMethodDefinition , CilTypeDefinition , CilMethodBody , Boolean )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilTypeDefinition , InstrumentationOutput , CilManipulationOperation , IInstrumentationFilter[] )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.Instrument(IInstrumentationFilter[] instrumentationFilters, PerfTracker perfTracker)
bei nCrunch.Compiler.CilProcessingTasks.CilInstrumentationTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
[18:13:30.3826-LocalBuildTask-24] ERROR (Internal): System.InvalidOperationException: Das Objekt mit Nullwert muss einen Wert haben.
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.ProcessTasks(Int32 backgroundThreadsAllowed)
bei nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
bei nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
bei nCrunch.Core.BuildManagement.BuildEnvironment..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridAddress clientAddress)
bei nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
bei nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
bei nCrunch.Client.Processing.LocalProcessingTask.ProcessTaskAndReturnSuccessFlag()
bei nCrunch.Client.Processing.ProcessingQueue..()
Submitted a bug report.
Solution can be found at
https://github.com/SimControl/SimControl.Reactive
Remco NCrunch Developer
#14043
08 Nov 2019 22:55 UTC
Thanks everyone for these stacktraces. I'm building a list of issues with the new optimised mode right now with a plan to work through these early in the coming week. If you experience any other exceptions that aren't shown here, please do share them so we can get them fixed quickly.
I'll let you know as soon as we can make a new build available with fixes. Switching back to legacy mode should be an effective workaround for now. Note that under advanced configuration, you should be able to do this on a per-project basis.
I'll let you know as soon as we can make a new build available with fixes. Switching back to legacy mode should be an effective workaround for now. Note that under advanced configuration, you should be able to do this on a per-project basis.
Remco NCrunch Developer
#14051
12 Nov 2019 00:59 UTC
I've made an effort to harden the code responsible for kicking up these problems. Unfortunately, the stack traces didn't give me enough information to reproduce the issues themselves, but I'm hoping the build below will have a good chance of solving them:
NCrunch_Console_4.2.0.1.msi
NCrunch_Console_4.2.0.1.zip
NCrunch_GridNodeServer_4.2.0.1.msi
NCrunch_GridNodeServer_4.2.0.1.zip
NCrunch_LicenseServer_4.2.0.1.zip
NCrunch_VS2008_4.2.0.1.msi
NCrunch_VS2010_4.2.0.1.msi
NCrunch_VS2010_4.2.0.1.zip
NCrunch_VS2012_4.2.0.1.msi
NCrunch_VS2012_4.2.0.1.zip
NCrunch_VS2013_4.2.0.1.msi
NCrunch_VS2013_4.2.0.1.zip
NCrunch_VS2015_4.2.0.1.msi
NCrunch_VS2015_4.2.0.1.msi.7z
NCrunch_VS2015_4.2.0.1.zip
NCrunch_VS2017_4.2.0.1.msi
NCrunch_VS2017_4.2.0.1.msi.7z
NCrunch_VS2017_4.2.0.1.zip
NCrunch_VS2019_4.2.0.1.msi
NCrunch_VS2019_4.2.0.1.msi.7z
NCrunch_VS2019_4.2.0.1.zip
Please let me know how you go!
NCrunch_Console_4.2.0.1.msi
NCrunch_Console_4.2.0.1.zip
NCrunch_GridNodeServer_4.2.0.1.msi
NCrunch_GridNodeServer_4.2.0.1.zip
NCrunch_LicenseServer_4.2.0.1.zip
NCrunch_VS2008_4.2.0.1.msi
NCrunch_VS2010_4.2.0.1.msi
NCrunch_VS2010_4.2.0.1.zip
NCrunch_VS2012_4.2.0.1.msi
NCrunch_VS2012_4.2.0.1.zip
NCrunch_VS2013_4.2.0.1.msi
NCrunch_VS2013_4.2.0.1.zip
NCrunch_VS2015_4.2.0.1.msi
NCrunch_VS2015_4.2.0.1.msi.7z
NCrunch_VS2015_4.2.0.1.zip
NCrunch_VS2017_4.2.0.1.msi
NCrunch_VS2017_4.2.0.1.msi.7z
NCrunch_VS2017_4.2.0.1.zip
NCrunch_VS2019_4.2.0.1.msi
NCrunch_VS2019_4.2.0.1.msi.7z
NCrunch_VS2019_4.2.0.1.zip
Please let me know how you go!
Tried NCrunch_VS2019_4.2.0.1.msi
Still getting a build error.
Submitted bug report.
Solution can be found at
https://github.com/SimControl/SimControl.Reactive
[10:02:49.2611-LocalBuildTask-37] ERROR: System.Exception: Unable to instrument type SimControl.Templates.CSharp.OldClassLibrary.Class1 due to exception: System.Exception: Unable to instrument method System.Void SimControl.Templates.CSharp.OldClassLibrary.Class1::.ctor() due to exception: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei nCrunch.Compiler.Cil.Utility.CilAddress.ReadCompressedUInt32AndAdvance()
bei nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSequencePointEnumerator..ctor(CilAddress blobAddress, UInt32 documentRowIndex)
bei nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSequencePointIndex.TryIndexMethodSequencePoints(CilMethodBody methodBody, UInt32 methodTableRowIndex)
bei nCrunch.Compiler.Cil.Methods.CilMethodDefinition.IndexSequencePoints(ICilSequencePointIndex index)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilManipulationOperation , CilMethodDefinition , CilTypeDefinition , CilMethodBody , Boolean )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilTypeDefinition , InstrumentationOutput , CilManipulationOperation , IInstrumentationFilter[] )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilTypeDefinition , InstrumentationOutput , CilManipulationOperation , IInstrumentationFilter[] )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.Instrument(IInstrumentationFilter[] instrumentationFilters, PerfTracker perfTracker)
bei nCrunch.Compiler.CilProcessingTasks.CilInstrumentationTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
[10:02:49.2611-LocalBuildTask-37] ERROR: nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type 'SimControl.Templates.CSharp.OldClassLibrary.Class1' due to exception: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei nCrunch.Compiler.Cil.Utility.CilAddress.ReadCompressedUInt32AndAdvance()
bei nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSequencePointEnumerator..ctor(CilAddress blobAddress, UInt32 documentRowIndex)
bei nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSequencePointHandler.GetFirstRelevantSequencePoint(CilMethodBody methodBody, UInt32 methodTableRowIndex)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(Boolean , ClassMethodData , Dictionary`2 , CilTypeDefinition , FNV64& , CilMethodDefinition )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
bei nCrunch.Compiler.CilProcessingTasks.CilMethodHashingTask..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
[10:02:49.2813-LocalBuildTask-37] ERROR (Internal): System.Exception: nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type 'SimControl.Templates.CSharp.OldClassLibrary.Class1' due to exception: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei nCrunch.Compiler.Cil.Utility.CilAddress.ReadCompressedUInt32AndAdvance()
bei nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSequencePointEnumerator..ctor(CilAddress blobAddress, UInt32 documentRowIndex)
bei nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSequencePointHandler.GetFirstRelevantSequencePoint(CilMethodBody methodBody, UInt32 methodTableRowIndex)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(Boolean , ClassMethodData , Dictionary`2 , CilTypeDefinition , FNV64& , CilMethodDefinition )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
bei nCrunch.Compiler.CilProcessingTasks.CilMethodHashingTask..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.ProcessTasks(Int32 backgroundThreadsAllowed)
bei nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
bei nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
bei nCrunch.Core.BuildManagement.BuildEnvironment..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridAddress clientAddress)
bei nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
bei nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
bei nCrunch.Client.Processing.LocalProcessingTask.ProcessTaskAndReturnSuccessFlag()
bei nCrunch.Client.Processing.ProcessingQueue..()
Still getting a build error.
Submitted bug report.
Solution can be found at
https://github.com/SimControl/SimControl.Reactive
[10:02:49.2611-LocalBuildTask-37] ERROR: System.Exception: Unable to instrument type SimControl.Templates.CSharp.OldClassLibrary.Class1 due to exception: System.Exception: Unable to instrument method System.Void SimControl.Templates.CSharp.OldClassLibrary.Class1::.ctor() due to exception: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei nCrunch.Compiler.Cil.Utility.CilAddress.ReadCompressedUInt32AndAdvance()
bei nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSequencePointEnumerator..ctor(CilAddress blobAddress, UInt32 documentRowIndex)
bei nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSequencePointIndex.TryIndexMethodSequencePoints(CilMethodBody methodBody, UInt32 methodTableRowIndex)
bei nCrunch.Compiler.Cil.Methods.CilMethodDefinition.IndexSequencePoints(ICilSequencePointIndex index)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilManipulationOperation , CilMethodDefinition , CilTypeDefinition , CilMethodBody , Boolean )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilTypeDefinition , InstrumentationOutput , CilManipulationOperation , IInstrumentationFilter[] )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilTypeDefinition , InstrumentationOutput , CilManipulationOperation , IInstrumentationFilter[] )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.Instrument(IInstrumentationFilter[] instrumentationFilters, PerfTracker perfTracker)
bei nCrunch.Compiler.CilProcessingTasks.CilInstrumentationTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
[10:02:49.2611-LocalBuildTask-37] ERROR: nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type 'SimControl.Templates.CSharp.OldClassLibrary.Class1' due to exception: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei nCrunch.Compiler.Cil.Utility.CilAddress.ReadCompressedUInt32AndAdvance()
bei nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSequencePointEnumerator..ctor(CilAddress blobAddress, UInt32 documentRowIndex)
bei nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSequencePointHandler.GetFirstRelevantSequencePoint(CilMethodBody methodBody, UInt32 methodTableRowIndex)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(Boolean , ClassMethodData , Dictionary`2 , CilTypeDefinition , FNV64& , CilMethodDefinition )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
bei nCrunch.Compiler.CilProcessingTasks.CilMethodHashingTask..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
[10:02:49.2813-LocalBuildTask-37] ERROR (Internal): System.Exception: nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type 'SimControl.Templates.CSharp.OldClassLibrary.Class1' due to exception: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei nCrunch.Compiler.Cil.Utility.CilAddress.ReadCompressedUInt32AndAdvance()
bei nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSequencePointEnumerator..ctor(CilAddress blobAddress, UInt32 documentRowIndex)
bei nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSequencePointHandler.GetFirstRelevantSequencePoint(CilMethodBody methodBody, UInt32 methodTableRowIndex)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(Boolean , ClassMethodData , Dictionary`2 , CilTypeDefinition , FNV64& , CilMethodDefinition )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
bei nCrunch.Compiler.CilProcessingTasks.CilMethodHashingTask..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.ProcessTasks(Int32 backgroundThreadsAllowed)
bei nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
bei nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
bei nCrunch.Core.BuildManagement.BuildEnvironment..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridAddress clientAddress)
bei nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
bei nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
bei nCrunch.Client.Processing.LocalProcessingTask.ProcessTaskAndReturnSuccessFlag()
bei nCrunch.Client.Processing.ProcessingQueue..()
Edited 12 Nov 2019 09:27 UTC
NCrunch_VS2019_4.2.0.1.msi fixed my Issue:
[09:51:27.1838-CIL Task Processor-30] ERROR: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei nCrunch.Compiler.NewStaticManipulation.InstrumentationConcerns.PrimaryInstrumentationConcern.InstrumentCurrentInstruction()
bei nCrunch.Compiler.NewStaticManipulation.InstrumentationConcerns.PerformanceTrackingInstrumentationConcern.InstrumentCurrentInstruction()
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilManipulationOperation , CilMethodDefinition , CilTypeDefinition , CilMethodBody , Boolean )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilTypeDefinition , InstrumentationOutput , CilManipulationOperation , IInstrumentationFilter[] )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.Instrument(IInstrumentationFilter[] instrumentationFilters, PerfTracker perfTracker)
bei nCrunch.Compiler.CilProcessingTasks.CilInstrumentationTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
[09:51:27.1838-CIL Task Processor-30] ERROR: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei nCrunch.Compiler.NewStaticManipulation.InstrumentationConcerns.PrimaryInstrumentationConcern.InstrumentCurrentInstruction()
bei nCrunch.Compiler.NewStaticManipulation.InstrumentationConcerns.PerformanceTrackingInstrumentationConcern.InstrumentCurrentInstruction()
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilManipulationOperation , CilMethodDefinition , CilTypeDefinition , CilMethodBody , Boolean )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilTypeDefinition , InstrumentationOutput , CilManipulationOperation , IInstrumentationFilter[] )
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
bei nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
bei nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.Instrument(IInstrumentationFilter[] instrumentationFilters, PerfTracker perfTracker)
bei nCrunch.Compiler.CilProcessingTasks.CilInstrumentationTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
bei nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
Remco NCrunch Developer
#14056
12 Nov 2019 10:01 UTC
wilhelmmedetz wrote:Tried NCrunch_VS2019_4.2.0.1.msi
Still getting a build error.
Submitted bug report.
Solution can be found at
https://github.com/SimControl/SimControl.Reactive
Thanks for sharing this.
I think the reason we're seeing problems with this solution is because of the IL weaver(s) used by the logging. This weavers are not necessarily in error, but they do result in a different assembly structure to what we've been testing with.
I've tried to do some testing with the solution myself, but I can't seem to get it to build in VS. Is there any guidance available for building the solution on a fresh checkout? Or is there any chance you might be able to provide me with some pre-built binaries to perform testing with?
Works fine now with the 4.2.0.1 version
Thanks guys
Thanks guys
jesuissur wrote:We've installed the 4.1.0.1 version and still got the problem.
The processing queue display this error for one of our project (.Net Core app 2.2) using the new Optimized instrumentation
[08:43:37.3733-LocalBuildTask-29] ERROR (Internal): nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type 'ABC.DEF' due to exception: nCrunch.Compiler.Cil.Types.CilResolutionFailedException: The expected type with identifier '9234630561816887799' was not found in this assembly
at nCrunch.Compiler.Cil.Types.CilExportedTypeTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeDefTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilExportedTypeTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeDefTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeDefinition.ResolveBaseType()
at nCrunch.Compiler.Cil.Methods.CilMethodsWithInheritanceEnumerator.MoveNext()
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..()
Hello,
Can also confirm that the 4.2 build linked above seems to have resolved the "1 project failed to build" issue I was having with multiple classic .NET Framework solutions.
Thanks!
Can also confirm that the 4.2 build linked above seems to have resolved the "1 project failed to build" issue I was having with multiple classic .NET Framework solutions.
Thanks!
Hi all,
I am probably facing a related issue, where NCrunch never comes to rest with constantly failing to build one specific test project in a solution.
Using NCrunch 4.0.13 (2/2020) i also hit the "Unable to hash type"-exception with the "Optimized"-Instrumentation mode. As a workaround i can set it back to "Legacy".
Here is the output from the "Processing queue":
--------
[12:45:45.227-LocalBuildTask-20] ERROR (Internal): System.Exception: nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type '***.NotificationsFactoryTest' due to exception: nCrunch.Compiler.NewStaticManipulation.CilHashException: Unable to hash method 'System.Void ***.NotificationsFactoryTest::NotificationsFrom***(System.UInt32, System.UInt32, System.Byte, ***.Notifications.SeverityLevel)' due to exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at nCrunch.Compiler.Cil.AssemblyIdentity.CilAssemblyRefTable.ResolveAssemblyModuleUsingAssemblyId(UInt64 assemblyId)
at nCrunch.Compiler.Cil.CilModule.ResolveTypeByAssemblyQualifiedName(CilQualifiedTypeName qualifiedTypeName)
at nCrunch.Compiler.Cil.Types.CilTypeSignature.GetUnderlyingTypeForEnum()
at nCrunch.Compiler.Cil.CustomAttributes.CilAttributeArgument.get_SizeInBytes()
at nCrunch.Compiler.Cil.CustomAttributes.CilAttributeArgument.get_SizeInBytes()
at nCrunch.Compiler.Cil.CustomAttributes.CilAttributeArgument.get_SizeInBytes()
at nCrunch.Compiler.Cil.CustomAttributes.CilCustomAttributeValue.get_NamedArguments()
at nCrunch.Compiler.NewStaticManipulation.CilMethodHashGenerator.HashCustomAttribute(FNV64& hash, CilCustomAttribute customAttribute)
at nCrunch.Compiler.NewStaticManipulation.CilMethodHashGenerator.(FNV64& , CilMethodDefinition )
at nCrunch.Compiler.NewStaticManipulation.CilMethodHashGenerator.HashMethod(CilMethodDefinition method, Int32 stackSize)
at nCrunch.Compiler.NewStaticManipulation.CilMethodHashGenerator.HashMethod(CilMethodDefinition method, Int32 stackSize)
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.()
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..()
I am probably facing a related issue, where NCrunch never comes to rest with constantly failing to build one specific test project in a solution.
Using NCrunch 4.0.13 (2/2020) i also hit the "Unable to hash type"-exception with the "Optimized"-Instrumentation mode. As a workaround i can set it back to "Legacy".
Here is the output from the "Processing queue":
--------
[12:45:45.227-LocalBuildTask-20] ERROR (Internal): System.Exception: nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type '***.NotificationsFactoryTest' due to exception: nCrunch.Compiler.NewStaticManipulation.CilHashException: Unable to hash method 'System.Void ***.NotificationsFactoryTest::NotificationsFrom***(System.UInt32, System.UInt32, System.Byte, ***.Notifications.SeverityLevel)' due to exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at nCrunch.Compiler.Cil.AssemblyIdentity.CilAssemblyRefTable.ResolveAssemblyModuleUsingAssemblyId(UInt64 assemblyId)
at nCrunch.Compiler.Cil.CilModule.ResolveTypeByAssemblyQualifiedName(CilQualifiedTypeName qualifiedTypeName)
at nCrunch.Compiler.Cil.Types.CilTypeSignature.GetUnderlyingTypeForEnum()
at nCrunch.Compiler.Cil.CustomAttributes.CilAttributeArgument.get_SizeInBytes()
at nCrunch.Compiler.Cil.CustomAttributes.CilAttributeArgument.get_SizeInBytes()
at nCrunch.Compiler.Cil.CustomAttributes.CilAttributeArgument.get_SizeInBytes()
at nCrunch.Compiler.Cil.CustomAttributes.CilCustomAttributeValue.get_NamedArguments()
at nCrunch.Compiler.NewStaticManipulation.CilMethodHashGenerator.HashCustomAttribute(FNV64& hash, CilCustomAttribute customAttribute)
at nCrunch.Compiler.NewStaticManipulation.CilMethodHashGenerator.(FNV64& , CilMethodDefinition )
at nCrunch.Compiler.NewStaticManipulation.CilMethodHashGenerator.HashMethod(CilMethodDefinition method, Int32 stackSize)
at nCrunch.Compiler.NewStaticManipulation.CilMethodHashGenerator.HashMethod(CilMethodDefinition method, Int32 stackSize)
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.()
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..()
Remco NCrunch Developer
#14583
07 Apr 2020 12:23 UTC
Thanks for sharing this. Can you confirm whether you experience this with the latest version of NCrunch? We've been rolling out CIL-related fixes with great frequency in the newer builds.
Sorry for the typo, my bad. It's definitive the latest NCrunch 4.3.0.13
Post a reply
Log in to reply.