My app may crash due to LiveChart
See original GitHub issueHello. My project using Avalonia and LiveChart. I have a suspiction that crashes in my app because I updated LiveChart beta.80 to beta.300. If i’m running my app in debug mode from Visual Studio to work fine, but if i’m running publish version, getting crash of the app. If i roll back to beto.80 then work fine again. In Windows event log have a event 1026 .NET Runtime.
Application: SysMonAvalonia.exe
CoreCLR Version: 6.0.522.21309
.NET Version: 6.0.5
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException: An item with the same key has already been added. Key: [9, System.Collections.Generic.List`1[Avalonia.VisualTree.IVisual]]
at System.Collections.Generic.TreeSet`1.AddIfNotPresent(T )
at System.Collections.Generic.SortedDictionary`2.Add(TKey , TValue )
at Avalonia.Rendering.DirtyVisuals.Add(IVisual visual) in /_/src/Avalonia.Visuals/Rendering/DirtyVisuals.cs:line 61
at Avalonia.Rendering.DeferredRenderer.AddDirty(IVisual visual) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 126
at Avalonia.Visual.InvalidateVisual() in /_/src/Avalonia.Visuals/Visual.cs:line 300
at LiveChartsCore.SkiaSharpView.Avalonia.MotionCanvas.OnCanvasCoreInvalidated(MotionCanvas`1 sender)
at LiveChartsCore.Motion.MotionCanvas`1.Invalidate()
at LiveChartsCore.CartesianChart`1.Measure()
at LiveChartsCore.Chart`1.<UpdateThrottlerUnlocked>b__144_1()
at Avalonia.Threading.JobRunner.Job.Avalonia.Threading.JobRunner.IJob.Run() in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 193
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 37
at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in /_/src/Windows/Avalonia.Win32/Win32Platform.cs:line 283
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken) in /_/src/Windows/Avalonia.Win32/Win32Platform.cs:line 210
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 65
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 120
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 209
at SysMonAvalonia.Program.Main(String[] args)
My ChartModel
Issue Analytics
- State:
- Created a year ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
is LiveChart.me not working / having issues for you?
The LiveChart.me app server may be down and that is causing the loading issue. Please try after a few minutes. · Your wifi...
Read more >LiveChart Winform Geared crashes in Cartesian chart for ...
I am evaluating the Winform livechart.Geared because our customers might have about 20K+ data points. I am doing the cartesian chart for ...
Read more >Crash in ChartUpdater.cs async issues #336
How to reproduce? The problem seems to occur if you try to keep a fixed length amount of data so I am trying...
Read more >FAQ - Frequently Asked Questions (with answers)
If there is any chance that you may have used a different password when signing up, even by accident, please try resetting your...
Read more >LiveCharts.Wpf.dll - DLL Issues (How to Download and Fix)
Generally, DLL errors are caused by missing or corrupt files. Learn how to download and replace your correct version of LiveCharts.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@hahagu probably a threading issue and maybe different to this report. I am seriously thinking on change the way tooltips work in the library, maybe you should try https://github.com/beto-rodriguez/LiveCharts2/issues/225#issuecomment-1012488255.
I will close this for now, since it seems that it is fixed win the latest version of Avalonia.
That helps a lot thanks, I actually changed the Avalonia renderer some versions ago, I will check that up.