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)
Maui App crash: Collection was modified; enumeration operation may not execute.
-
- Newbie
- Posts: 15
- Joined: Mon Jan 29, 2024 12:00 am
Re: Maui App crash: Collection was modified; enumeration operation may not execute.
Hello,
it's difficult to check what could be the cause without having an example to reproduce it, but we're going to try.
Does this also happens by using SampleValues for all the series in your aplication ? this will help in order to find where problem is.
Also if the problem happens when user clicks in any specific series type.
Thanks
it's difficult to check what could be the cause without having an example to reproduce it, but we're going to try.
Does this also happens by using SampleValues for all the series in your aplication ? this will help in order to find where problem is.
Also if the problem happens when user clicks in any specific series type.
Thanks
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 15
- Joined: Mon Jan 29, 2024 12:00 am
Re: Maui App crash: Collection was modified; enumeration operation may not execute.
Problem solved. Lesson learned. Don't update your charts on a background thread.
Re: Maui App crash: Collection was modified; enumeration operation may not execute.
Thanks for the feedback,
Regards,
Marc
Regards,
Marc
Steema Support