-
Notifications
You must be signed in to change notification settings - Fork 678
Description
Describe the bug
We have received multiple reports from customers that they are facing app crashes that seem to originate from LiveCharts2 and SkiaSharp. I was able to capture the following stack strace:
System.Runtime.InteropServices.COMException: Element not found.
at void Marshal.ThrowExceptionForHR(int errorCode)() in Marshal.cs:line 856
at new BaseActivationFactory(string typeNamespace, string typeFullName)()
at static PropertySetExtensions()()
System.TypeInitializationException: The type initializer for 'SkiaSharp.Views.WinUI.Native.PropertySetExtensions' threw an exception.
at IObjectReference PropertySetExtensions.get__objRef_global__SkiaSharp_Views_WinUI_Native_IPropertySetExtensionsStatics()()
at void PropertySetExtensions.AddSingle(PropertySet propertySet, string key, float value)()
at void GlesContext.CreateSurface(SwapChainPanel panel, Size? renderSurfaceSize, float? resolutionScale)()
at void AngleSwapChainPanel.EnsureRenderSurface()()
at void AngleSwapChainPanel.OnLoaded(object sender, RoutedEventArgs e)()
at RoutedEventHandler EventState.GetEventInvoke()+(object sender, RoutedEventArgs e) => { }()
at int RoutedEventHandler.Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr e)()
I have reported this problem to the SkiaSharp team as well but they are slow to respond. I understand this issue comes from SkiaSharp, but is there a way for LiveCharts to handle underlying issues and crashes without crashing the entire app? Any other insight into this matter would be appreciated.
To Reproduce
We have not identified the root cause or what software/hardware combination triggers this issue.
Expected behavior
I would expect LiveCharts to handle any internal exceptions in a better way as there seems to be no way for the user to control this behavior. I would rather that the element is not rendered and/or shows a error text then the exceptions propagate and crash the parent app.
Desktop (please complete the following information):
- OS: Windows
- Version: *