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

Notification

Icon
Error

Optimized Instrumentation does not work with Avalonia.
yusuf
#1 Posted : Monday, January 11, 2021 8:16:37 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/7/2019(UTC)
Posts: 3

Was thanked: 1 time(s) in 1 post(s)
Hi,

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

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.
Remco
#2 Posted : Monday, January 11, 2021 8:25:32 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 810 times
Was thanked: 1077 time(s) in 1022 post(s)
Thanks for sharing this problem. Can you confirm whether switching the instrumentation mode to 'Legacy' suppresses the issue?
yusuf
#3 Posted : Monday, January 11, 2021 8:27:06 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/7/2019(UTC)
Posts: 3

Was thanked: 1 time(s) in 1 post(s)
Sorry, I forgot to mention that the legacy mode works without issues.
Remco
#4 Posted : Monday, January 11, 2021 8:38:57 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 810 times
Was thanked: 1077 time(s) in 1022 post(s)
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.
michaelkroes
#5 Posted : Tuesday, January 12, 2021 8:08:31 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 100 times
Was thanked: 50 time(s) in 48 post(s)
yusuf
#6 Posted : Tuesday, January 12, 2021 8:15:19 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/7/2019(UTC)
Posts: 3

Was thanked: 1 time(s) in 1 post(s)
Problem is fixed. Thanks for the quick response.
1 user thanked yusuf for this useful post.
michaelkroes on 1/12/2021(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.222 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download