标题:C# winform 画chart时,出现红叉,异常log如下,如何解决
只看楼主
xhrain
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2009-7-19
 问题点数:0 回复次数:0 
C# winform 画chart时,出现红叉,异常log如下,如何解决
运行一段时间后,会出现,概率很低。
如下异常log什么原因。
************** 异常文本 **************
System.InvalidOperationException: 集合已修改;可能无法执行枚举操作。
   在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   在 System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   在 System.Collections.Generic.List`1.Enumerator.MoveNext()
   在 System.Windows.Forms.DataVisualization.Charting.ChartArea.GetPointsInterval(List`1 seriesList, Boolean isLogarithmic, Double logarithmicBase, Boolean checkSameInterval, Boolean& sameInterval, Series& series)
   在 System.Windows.Forms.DataVisualization.Charting.ChartArea.SetDefaultFromData(Axis axis)
   在 System.Windows.Forms.DataVisualization.Charting.ChartArea.SetDefaultFromIndexesOrData(Axis axis, AxisType axisType)
   在 System.Windows.Forms.DataVisualization.Charting.ChartArea.SetDefaultAxesValues()
   在 System.Windows.Forms.DataVisualization.Charting.ChartArea.SetData(Boolean initializeAxes, Boolean checkIndexedAligned)
   在 System.Windows.Forms.DataVisualization.Charting.ChartArea.ReCalcInternal()
   在 System.Windows.Forms.DataVisualization.Charting.ChartPicture.Paint(Graphics graph, Boolean paintTopLevelElementOnly)
   在 System.Windows.Forms.DataVisualization.Charting.Chart.OnPaint(PaintEventArgs e)
   在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   在 System.Windows.Forms.Control.WmPaint(Message& m)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
搜索更多相关主题的帖子: Forms 异常 System Windows Control 
2021-09-14 13:56



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-506841-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.108594 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved