Hi,
Some users have reported this kind of exception when using our software component which is built on XamSpreadsheet. I have not managed to reproduce this exception, but I think it's related to scrolling.
System.IndexOutOfRangeException: Index was outside the bounds of the array.at Infragistics.Collections.MDList`1.get_Item(Int32 row, Int32 column)at Infragistics.Controls.Grids.Core.ExcelSheetPaneManager.VerifyPaneInfoImpl()at Infragistics.Controls.Grids.Core.ExcelSheetPaneManager.VerifyPaneInfo()at Infragistics.Controls.Grids.Core.ExcelSheetPaneManager.Measure(Size availableSize)at Infragistics.Controls.Grids.Core.SpreadsheetAreaLayoutManager.Measure(Size availableSize)at Infragistics.Controls.Grids.Primitives.WpfSpreadsheetAreaLayoutManager.Measure(Size availableSize)at Infragistics.Controls.Grids.Primitives.SpreadsheetLayoutPanel.MeasureOverride(Size availableSize)at System.Windows.FrameworkElement.MeasureCore(Size availableSize)at System.Windows.UIElement.Measure(Size availableSize)at System.Windows.ContextLayoutManager.UpdateLayout()at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)at System.Windows.Threading.DispatcherOperation.InvokeImpl()at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)at System.Windows.Threading.DispatcherOperation.Invoke()at System.Windows.Threading.Dispatcher.ProcessQueue()at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)at System.Windows.Application.RunDispatcher(Object ignore)at System.Windows.Application.RunInternal(Window window)at Desktop.App.Main()
Can you give any advice what might be causing this?
Thanks,
-Antti
Hi Antti,
A wild guess would be that they are using a parameterless constructor of the Workbook class
xamSpreadSheet1.Workbook = new Workbook();
xamSpreadSheet1.Workbook = new Workbook(WorkbookFormat.Excel2007);
But it will be best if you could provide us a sample where the issue is reproducible in order to investigate it further.
You can also try to update to our latest service release and see whether you will continue receiving this exception.
Sincerely,Teodor TenevSoftware Developer
I have found a similar issue logged in our bug tracking system - TFS235995 "IndexOutOfRangeException is thrown from XamSpreadSheet when changing Windows's size", with similar stacktrace to yours. The fix for this bug will be available in our next Service Release, so you can try after that whether it will be resolved at your side as well.
Sincerely,Teodor