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
762
NullReferenceException at GetRowCalcIndex
posted

Hello, we are updating an old .NET 3.5 WinForm application that used an old version of Infragistics .NET Advantage 2 to .NET 4.5 and Infragistics 4, and are occasionally getting a NullReferenceException at GetRowCalcIndex while running the app. Stack trace follows:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Infragistics.Win.UltraWinGrid.RefUtils.GetRowCalcIndex(UltraGridRow row, FormulaRowIndexSource rowIndexType)
   at Infragistics.Win.UltraWinGrid.RefRowIterator.GetNextRow()
   at Infragistics.Win.UltraWinGrid.RefRowIterator.MoveNext()
   at Infragistics.Win.UltraWinGrid.RefRowIterator.MoveNext()
   at Infragistics.Win.UltraWinGrid.RefCellCollection.RefCellCollectionEnumerator.MoveNext()
   at Infragistics.Win.CalcEngine.RangeCalcInfo.EvaluateNextRow()
   at Infragistics.Win.CalcEngine.UltraCalcEngine.Evaluate(Int64 ticks)
   at Infragistics.Win.CalcEngine.UltraCalcEngine.Recalc(Int64 ticks, Boolean isStartOfRecalcOperation)
   at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.ReCalcInternal(Int64 ticks)
   at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.ReCalc(Int64 millis)
   at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.ReCalcSynchronous()
   at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.VerifyReCalc()
   at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.DirtyCalc(IUltraCalcReference reference, ValueDirtiedAction action)
   at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.Infragistics.Win.CalcEngine.IUltraCalcManager.RowsCollectionVisibilityChanged(IUltraCalcReference reference)
   at Infragistics.Win.UltraWinGrid.ViewStyleBase.OnAfterRowListCreated_ProcessBand(UltraGridBand band)
   at Infragistics.Win.UltraWinGrid.ViewStyleBase.OnAfterRowListCreated(RowScrollRegion rsr)
   at Infragistics.Win.UltraWinGrid.ViewStyleBase.RecreateRowList(RowScrollRegion rsr, Boolean syncWithCalcManager)
   at Infragistics.Win.UltraWinGrid.RowScrollRegion.RegenerateVisibleRows(Boolean resetScrollInfo)
   at Infragistics.Win.UltraWinGrid.RowScrollRegion.WillScrollbarBeShown(ScrollbarVisibility assumeColScrollbarsVisible)
   at Infragistics.Win.UltraWinGrid.ViewStyleBase.FitColumnsToWidth()
   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.RowScrollRegion.RegenerateVisibleRows(Boolean resetScrollInfo)
   at Infragistics.Win.UltraWinGrid.RowScrollRegion.WillScrollbarBeShown(ScrollbarVisibility assumeColScrollbarsVisible)
   at Infragistics.Win.UltraWinGrid.RowScrollRegion.PositionScrollbar(Boolean resetScrollInfo)
   at Infragistics.Win.UltraWinGrid.ScrollRegionBase.SetOriginAndExtent(Int32 origin, Int32 extent)
   at Infragistics.Win.UltraWinGrid.RowScrollRegion.SetOriginAndExtent(Int32 origin, Int32 extent)
   at Infragistics.Win.UltraWinGrid.DataAreaUIElement.ResizeRowScrollRegions()
   at Infragistics.Win.UltraWinGrid.DataAreaUIElement.PositionChildElements()
   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UltraWinGrid.DataAreaUIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UltraWinGrid.DataAreaUIElement.set_Rect(Rectangle value)
   at Infragistics.Win.UltraWinGrid.UltraGridUIElement.PositionChildElements()
   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UltraWinGrid.UltraGridUIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics)
   at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics)
   at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode)
   at Infragistics.Win.UltraWinGrid.UltraGridUIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode)
   at Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe)
   at Infragistics.Win.UltraWinGrid.UltraGrid.OnPaint(PaintEventArgs pe)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.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)

We have an Infragistics.Win.UltraWinGrid.UltraGrid with a .CalcManager.CalcSettings property of:

"count ( [//_orderGrid/Order/OrderNumber] )"

where _orderGrid is the UltraGrid, Order is the band, and OrderNumber one of the columns of the band.

I suspect it has something to do with the grid filter, as we can most often trigger the exception by quickly toggling the filter.

Parents Reply Children
No Data