Maui App crash: Collection was modified; enumeration operation may not execute.
Posted: Wed Mar 13, 2024 5:12 pm
Using TeeChart released version: 6.2024.2.19
Build: Maui Application, Platform: Windows
Run on a Windows 11 operating system
Development Environment: Visual Studio 2022 (64 bit) 17.8.7
I randomly see the following error just after my page is loaded. My page has five different charts. This occurs 5-10% of the time. I click an item that then loads data for the charts and the application crashes. I do not have a simple example nor one that is 100% reproducible, but I was hoping you might be able to look at your source and have a guess as to what would be the most likely cause. Seems like there is some sort of timing issue.
Any help would be appreciated.
Exception = {"Collection was modified; enumeration operation may not execute."}
at Steema.TeeChart.Chart.InternalMinMax(Axis aAxis, Boolean isMin, Boolean isX)
at Steema.TeeChart.Axis.CalcMinMax(Double& min, Double& max)
at Steema.TeeChart.Axis.AdjustMaxMin()
at Steema.TeeChart.Axes.AdjustMaxMin()
at Steema.TeeChart.Chart.CalcAxisRect()
at Steema.TeeChart.Chart.InternalDraw(Boolean noTools)
at Steema.TeeChart.Chart.InternalDraw()
at Steema.TeeChart.Maui.TChart.Draw(ICanvas g, RectF rect)
at Microsoft.Maui.Graphics.Win2D.W2DGraphicsView.OnDraw(CanvasControl sender, CanvasDrawEventArgs args)
at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_global__Microsoft_Graphics_Canvas_UI_Xaml_CanvasControl__global__Microsoft_Graphics_Canvas_UI_Xaml_CanvasDrawEventArgs_.EventState.<GetEventInvoke>b__1_0(CanvasControl sender, CanvasDrawEventArgs args)
at ABI.Windows.Foundation.TypedEventHandler`2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)
Build: Maui Application, Platform: Windows
Run on a Windows 11 operating system
Development Environment: Visual Studio 2022 (64 bit) 17.8.7
I randomly see the following error just after my page is loaded. My page has five different charts. This occurs 5-10% of the time. I click an item that then loads data for the charts and the application crashes. I do not have a simple example nor one that is 100% reproducible, but I was hoping you might be able to look at your source and have a guess as to what would be the most likely cause. Seems like there is some sort of timing issue.
Any help would be appreciated.
Exception = {"Collection was modified; enumeration operation may not execute."}
at Steema.TeeChart.Chart.InternalMinMax(Axis aAxis, Boolean isMin, Boolean isX)
at Steema.TeeChart.Axis.CalcMinMax(Double& min, Double& max)
at Steema.TeeChart.Axis.AdjustMaxMin()
at Steema.TeeChart.Axes.AdjustMaxMin()
at Steema.TeeChart.Chart.CalcAxisRect()
at Steema.TeeChart.Chart.InternalDraw(Boolean noTools)
at Steema.TeeChart.Chart.InternalDraw()
at Steema.TeeChart.Maui.TChart.Draw(ICanvas g, RectF rect)
at Microsoft.Maui.Graphics.Win2D.W2DGraphicsView.OnDraw(CanvasControl sender, CanvasDrawEventArgs args)
at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_global__Microsoft_Graphics_Canvas_UI_Xaml_CanvasControl__global__Microsoft_Graphics_Canvas_UI_Xaml_CanvasDrawEventArgs_.EventState.<GetEventInvoke>b__1_0(CanvasControl sender, CanvasDrawEventArgs args)
at ABI.Windows.Foundation.TypedEventHandler`2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)