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

Notification

Icon
Error

Ncrunch cannot build my project
BrilliantSkies
#1 Posted : Thursday, April 18, 2024 2:10:24 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/16/2024(UTC)
Posts: 1
Location: United Kingdom

Hello,

Error reads:


NCrunch has encountered an internal error: System.Exception: System.Exception: Unable to instrument type BrilliantSkies.Core.Maths.CircShift due to exception: System.Exception: Unable to instrument method !!0[,] BrilliantSkies.Core.Maths.CircShift::CircularShift(!!0[,], System.Int32, System.Int32) due to exception: System.InvalidOperationException: Nullable object must have a value.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at nCrunch.Compiler.Cil.Types.CilTypeSignature.ResolveGenericArgumentsIntoNewSignature(CilExpandableBuffer signatureBuffer, Nullable`1 typeInstantiation, Nullable`1 methodInstantiation)
at nCrunch.Compiler.StaticManipulation.InstrumentationConcerns.LoggedDataValueResolvedSignature.(MethodInstrumentationContext , CilTypeSignature , Nullable`1 , Nullable`1 )
at nCrunch.Compiler.StaticManipulation.InstrumentationConcerns.LoggedDataValueResolvedSignature..ctor(MethodInstrumentationContext context, CilModule module, CilTypeSignature typeSignature, Nullable`1 contextualType, Nullable`1 contextualMethod)
at nCrunch.Compiler.StaticManipulation.InstrumentationConcerns.RdiInstrumentationConcern.(CilMetadataToken , Code )
at nCrunch.Compiler.StaticManipulation.InstrumentationConcerns.RdiInstrumentationConcern.InstrumentCurrentInstruction()
at nCrunch.Compiler.StaticManipulation.InstrumentationConcerns.TryFinallyInstrumentationConcern.InstrumentCurrentInstruction()
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly.(CilManipulationOperation , CilMethodDefinition , CilTypeDefinition , CilMethodBody , Boolean )
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly.(CilTypeDefinition , CilManipulationOperation , IInstrumentationFilter[] )
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly.(CilTypeDefinition , CilManipulationOperation , IInstrumentationFilter[] )
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly..()
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly.Instrument(IInstrumentationFilter[] instrumentationFilters, PerfTracker perfTracker)
at nCrunch.Compiler.CilProcessingTasks.CilInstrumentationTask.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)


If I remove this function it will continue to error on all sorts of other issues such as generic function calls. A few years ago I used Ncrunch very successfully, now it cannot build my most basic DLL. Any ideas?
It's a DLL for a unity game that references a bunch of unityengine modules and obviously builds fine in visual studio 2022.
Remco
#2 Posted : Thursday, April 18, 2024 11:32:45 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for sharing this issue.

This looks to be an IL sequence that we aren't handling right. Are you able to isolate this problem in a code sample that you can share with me? If I can reproduce the sequence on my side, I should hopefully be able to get you a prompt fix.

It may be possible to work around this problem by disabling RDI (set 'Enable RDI' to 'False'), or by placing RDI suppression comments around the code involved, for example:

Code:

//ncrunch: rdi off
public void ThisMethodHasRdiDisabled()
{
Console.WriteLine("No RDI data collection");
}
//ncrunch: rdi default
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.039 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download