C#写的winform程序,使用了第三方控件DevExpress,页面每隔2秒有数据刷新。
程序多数时间运行正常,但有时运行一段后出现如下错误:
请技术大牛帮忙看看
stackTrace中信息
在 DevExpress.Utils.AppearanceObject.CalcDefaultTextSize(Graphics g)
在 DevExpress.XtraEditors.ViewInfo.BaseControlViewInfo.CalcTextSizeCore(GraphicsCache cache, String text, Int32 maxWidth)
在 DevExpress.XtraEditors.ViewInfo.BaseControlViewInfo.CalcTextSizeCore(Graphics g, String text, Int32 maxWidth)
在 DevExpress.XtraEditors.ViewInfo.BaseControlViewInfo.CalcTextSize(Graphics g, Boolean useDisplayText)
在 DevExpress.XtraEditors.ViewInfo.BaseEditViewInfo.CalcBestFit(Graphics g)
在 DevExpress.XtraEditors.ViewInfo.TextEditViewInfo.CalcMinHeightCore(Graphics g)
在 DevExpress.XtraGrid.Views.Base.ViewInfo.BaseViewInfo.CalcMinEditorHeight(AppearanceObject[] styles)
在 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcMinRowHeight()
在 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcRectsConstants()
在 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcRects(Rectangle bounds, Boolean partital)
在 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcCore(Graphics g, Rectangle bounds)
在 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.Calc(Graphics g, Rectangle bounds)
在 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.FullRecalcScroll(Graphics g, Rectangle bounds)
在 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcAfterVertScrollCore(Graphics g, Rectangle bounds, Boolean useCache)
在 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcAfterVertScroll(Graphics g, Rectangle bounds, Boolean useCache)
在 DevExpress.XtraGrid.Views.Grid.GridView.RefreshRows(Boolean useCache, Boolean afterScroll)
在 DevExpress.XtraGrid.Views.Grid.GridView.CalculateDataCore()
在 DevExpress.XtraGrid.Views.Grid.GridView.CalculateData()
在 DevExpress.XtraGrid.Views.Base.BaseView.Draw(GraphicsCache e)
在 DevExpress.XtraGrid.Views.Grid.GridView.Draw(GraphicsCache e)
在 DevExpress.XtraGrid.GridControl.OnPaint(PaintEventArgs e)
在 DevExpress.Utils.Drawing.ControlPaintHelper.PaintWithErrorHandling(PaintEventArgs paintEventArgs, Int32 layer)
在 DevExpress.Utils.Drawing.ControlPaintHelper.ProcessWMPaint(Message& m)
在 DevExpress.XtraGrid.GridControl.CheckProcessMsg(Message& m)
在 DevExpress.XtraGrid.GridControl.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)