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

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Karen,

    It looks like the exception is occurring while the grid is trying to lay out the column headers of the grid using RowLayouts.

    So my guess is that something really unusual is causing it, like maybe the grid control has a very large or very small size at this point, and some measurement calculation is coming out either way too high or way too low. 

    But I'm afraid without being able to reproduce the issue, there's very little we can do to try to debug it. You say it doesn't happen all the time - but can you reproduce the issue reliably? If you do the same steps 10 times, does it happen at least once? Or is it completely random and unpredictable?

Children