Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
900
Need help on a crash: Overflow or underflow in the arithmetic operation.
posted

Hi,

I have an MDI application, and one of the MDI Views contains an Ultragrid.  Sometimes, when opening this view, I get the exception below.  It does not always happen.  Also, if we just click "Continue" in the exception handling window, the view appears to load correctly and work fine.  This exception appears to show up before any data (as in cell values) has been loaded into the grid.  We attach to a data source to get our columns, but not for data.   We have a number of grids in our application and have only seen this bug in this one grid.  Does anyone have any ideas what could be causing the crash, how to fix it, or at least where to add a try/catch to handle it?  Any help is appreciated.

Here's the Exception Details:

System.ArithmeticException: Overflow or underflow in the arithmetic operation.
   at Infragistics.Win.Layout.GridBagLayoutManager.GridBagHelper(ILayoutContainer container, Object containerContext, Boolean layoutContainer, Boolean returnItemDimensions)
   at Infragistics.Win.Layout.GridBagLayoutManager.GetLayoutItemDimensions(ILayoutContainer container, Object containerContext)
   at Infragistics.Win.UltraWinGrid.UltraGridBand.VerifyRowLayoutCache()
   at Infragistics.Win.UltraWinGrid.UltraGridBand.GetAllOrderedHeaders()
   at Infragistics.Win.UltraWinGrid.UltraGridBand.CalculateBandMetrics(UltraGridBand priorBand)
   at Infragistics.Win.UltraWinGrid.BandsCollection.CalculateBandMetrics(Int32 pass)
   at Infragistics.Win.UltraWinGrid.BandsCollection.CalculateBandMetrics()
   at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetricsHelper()
   at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetrics()
   at Infragistics.Win.UltraWinGrid.UltraGridLayout.ApplyLoadedBands()
   at Infragistics.Win.UltraWinGrid.UltraGridLayout.ListManagerUpdated(BindingManagerBase bindingManager)
   at Infragistics.Win.UltraWinGrid.UltraGridLayout.ListManagerUpdated()
   at Infragistics.Win.UltraWinGrid.UltraGridBase.Set_ListManager(Object newDataSource, String newDataMember)
   at Infragistics.Win.UltraWinGrid.UltraGridBase.VerifyDataSourceAttached()
   at Infragistics.Win.UltraWinGrid.UltraGridBase.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 

Thanks,

~Karen