程序接收雷达站送来的飞机经纬度数据,在Gmap.net控件上实时显示飞机的飞行动态,当飞机一多,控件运行不到5分钟就出现大红叉,如果飞机数量少,运行几个小时都没事。 是不是该控件为了显示飞机的实时位置,不停地重绘导致的啊? 还是其他原因呢
************** 异常文本 **************
System.InvalidOperationException: 集合已修改;可能无法执行枚举操作。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Collections.Generic.List`1.Enumerator.MoveNextRare()
在 System.Collections.Generic.List`1.Enumerator.MoveNext()
在 GMap.NET.WindowsForms.GMapOverlay.OnRender(Graphics g)
在 GMap.NET.WindowsForms.GMapControl.OnPaintOverlays(Graphics g)
在 GMap.NET.WindowsForms.GMapControl.DrawGraphics(Graphics g)
在 GMap.NET.WindowsForms.GMapControl.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.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.UserControl.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)