Build/Test Issues

Optimized Instrumentation does not work with Avalonia.

Started by yusuf on 2,069 views

Hi,

Some projects in Avalonia fail to build with NCrunch using instrumentation mode: optimised. Logs have errors similar to the following:

ENGINE - [10:52:43.5599-CIL Task Processor-53] ERROR: System.Exception: Unable to instrument type CompiledAvaloniaXaml.!EmbeddedResource due to exception: System.Exception: Unable to instrument method System.Void CompiledAvaloniaXaml.!EmbeddedResource::Populate:Avalonia.Controls.DataGrid.Themes.Default.xaml(System.IServiceProvider, Avalonia.Styling.Styles) due to exception: System.IO.IOException: File path must be absolute with disk root: Avalonia.Controls.DataGrid.Themes.Default.xaml
   at nCrunch.Common.IO.FilePath..ctor(String absoluteFilePath, Boolean isAbsoluteFilePathChecked)
   at nCrunch.Compiler.NewStaticManipulation.InstrumentationConcerns.PrimaryInstrumentationConcern.InstrumentCurrentInstruction()
   at nCrunch.Compiler.NewStaticManipulation.InstrumentationConcerns.PerformanceTrackingInstrumentationConcern.InstrumentCurrentInstruction()
   at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilManipulationOperation , CilMethodDefinition , CilTypeDefinition , CilMethodBody , Boolean )
   at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilTypeDefinition , CilManipulationOperation , IInstrumentationFilter[] )
   at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(CilTypeDefinition , CilManipulationOperation , IInstrumentationFilter[] )
   at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
   at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
   at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
   at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
   at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
   at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.Instrument(IInstrumentationFilter[] instrumentationFilters, PerfTracker perfTracker)
   at nCrunch.Compiler.CilProcessingTasks.CilInstrumentationTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
   at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()

You can reproduce the issue by cloning Avalonia.
Thanks for sharing this problem. Can you confirm whether switching the instrumentation mode to 'Legacy' suppresses the issue?
Sorry, I forgot to mention that the legacy mode works without issues.
Thanks. I recommend the legacy option for now as a workaround. We've scoped a task to look into this and get it fixed. I appreciate the time you've taken to report it.
Would you mind trying the build below?

NCrunch_Console_4.7.0.2.msi
NCrunch_Console_4.7.0.2.zip
NCrunch_GridNodeServer_4.7.0.2.msi
NCrunch_GridNodeServer_4.7.0.2.zip
NCrunch_LicenseServer_4.7.0.2.zip
NCrunch_VS2008_4.7.0.2.msi
NCrunch_VS2010_4.7.0.2.msi
NCrunch_VS2010_4.7.0.2.zip
NCrunch_VS2012_4.7.0.2.msi
NCrunch_VS2012_4.7.0.2.zip
NCrunch_VS2013_4.7.0.2.msi
NCrunch_VS2013_4.7.0.2.zip
NCrunch_VS2015_4.7.0.2.msi
NCrunch_VS2015_4.7.0.2.msi.7z
NCrunch_VS2015_4.7.0.2.zip
NCrunch_VS2017_4.7.0.2.msi
NCrunch_VS2017_4.7.0.2.msi.7z
NCrunch_VS2017_4.7.0.2.zip
NCrunch_VS2019_4.7.0.2.msi
NCrunch_VS2019_4.7.0.2.msi.7z
NCrunch_VS2019_4.7.0.2.zip
Problem is fixed. Thanks for the quick response.

Post a reply

Log in to reply.