Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with avalonia preview 6 #972

Closed
hahagu opened this issue Mar 31, 2023 · 2 comments
Closed

Incompatible with avalonia preview 6 #972

hahagu opened this issue Mar 31, 2023 · 2 comments

Comments

@hahagu
Copy link

hahagu commented Mar 31, 2023

Describe the bug
LiveCharts2 will crash when used with avalonia preview 6

To Reproduce
Steps to reproduce the behavior:

  1. Use avalonia preview 6 with LiveCharts2
  2. Observe crash

Expected behavior
Working as intended

Additional context
Stacktrace:

System.TypeInitializationException
  HResult=0x80131534
  Message=The type initializer for 'LiveChartsCore.SkiaSharpView.Avalonia.CartesianChart' threw an exception.
  Source=LiveChartsCore.SkiaSharpView.Avalonia
  StackTrace:
   at LiveChartsCore.SkiaSharpView.Avalonia.CartesianChart.!XamlIlPopulateTrampoline(CartesianChart )
   at LiveChartsCore.SkiaSharpView.Avalonia.CartesianChart..ctor()
   at GUI.Views.Controls.Cards.MonitorCard.!XamlIlPopulate(IServiceProvider , MonitorCard ) in C:\Users\Mingu\Documents\Projects\SW\GUI\Views/Controls/Cards/MonitorCard.axaml:line 35
   at GUI.Views.Controls.Cards.MonitorCard.!XamlIlPopulateTrampoline(MonitorCard )
   at GUI.Views.Controls.Cards.MonitorCard.InitializeComponent(Boolean loadXaml) in C:\Users\Mingu\Documents\Projects\SW\GUI\Avalonia.Generators\Avalonia.Generators.NameGenerator.AvaloniaNameSourceGenerator\GUI.Views.Controls.Cards.MonitorCard.g.cs:line 25
   at GUI.Views.Controls.Cards.MonitorCard..ctor(ISensor bindingSensor) in C:\Users\Mingu\Documents\Projects\SW\GUI\Views\Controls\Cards\MonitorCard.axaml.cs:line 88
   at GUI.Views.Pages.MonitorPage.AddCards(IList sensorIds) in C:\Users\Mingu\Documents\Projects\SW\GUI\Views\Pages\MonitorPage.axaml.cs:line 47
   at GUI.Views.Pages.MonitorPage.<>c__DisplayClass3_0.<SensorMonitorsOnCollectionChanged>b__0() in C:\Users\Mingu\Documents\Projects\SW\GUI\Views\Pages\MonitorPage.axaml.cs:line 63
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
   at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
   at GUI.Program.Main(String[] args) in C:\Users\Mingu\Documents\Projects\SW\GUI\Program.cs:line 26

  This exception was originally thrown at this call stack:

Inner Exception 1:
MissingMethodException: Method not found: 'Avalonia.StyledProperty`1<!!1> Avalonia.AvaloniaProperty.Register(System.String, !!1, Boolean, Avalonia.Data.BindingMode, System.Func`2<!!1,Boolean>, System.Func`3<Avalonia.AvaloniaObject,!!1,!!1>, System.Action`2<Avalonia.AvaloniaObject,Boolean>)'.
@qfmee
Copy link

qfmee commented Apr 14, 2023

I have also encountered such a problem. Have you solved it now?

@Mrxx99
Copy link

Mrxx99 commented Apr 14, 2023

I think that is only solvable by upgrading the library to target preview 6 of Avalonia 11, there is a PR here: #978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants