ArgumentOutOfRangeException when customizing XPMenus at runtime

Version 2.1.0.9 At run-time, I''m getting errors when I''m updating my toolbars from the standard Toolbar Customization dialog (from a ToolListBarItem). I can consistantly generate the stack dump below by : 1) Bringing up the dialog 2) Adding a new item to one of the toolbars 3) Closing the dialog 4) Reopening the dialog I''m working with an MDI main form with XPMenus and a ControlBar. I am NOT using a DockingManager. --------------------------------------------- catched at Syncfusion.Windows.Forms.Grid.GridModel.OnQueryCoveredRange(GridQueryCoveredRangeEventArgs e) in :line 0 An unhandled exception of type ''System.ArgumentOutOfRangeException'' occurred in syncfusion.grid.dll Additional information: Index was out of range. Must be non-negative and less than the size of the collection. catched at Syncfusion.Windows.Forms.Grid.GridViewLayout.VisitVisibleCells(GridRangeInfo range, GridRowColRangeInfoHandler[] handler) in :line 0 catched at Syncfusion.Windows.Forms.Grid.GridModel.OnColWidthsChanged(GridRowColSizeChangedEventArgs e) in :line 0 Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at Syncfusion.Windows.Forms.Grid.GridModel.OnColWidthsChanged(GridRowColSizeChangedEventArgs e) at Syncfusion.Windows.Forms.Grid.GridModel.RaiseColWidthsChanged(GridRowColSizeChangedEventArgs e) at Syncfusion.Windows.Forms.Grid.GridModelColWidthsIndexer.OnChanged(GridRowColSizeChangedEventArgs e) at Syncfusion.Windows.Forms.Grid.GridModelRowColSizeIndexer.SetRange(Int32 from, Int32 last, Int32[] values, Boolean discardUndo) at Syncfusion.Windows.Forms.Grid.GridModelRowColSizeIndexer.SetRange(Int32 from, Int32 last, Int32[] values) at Syncfusion.Windows.Forms.Grid.GridModelRowColSizeIndexer.SetRange(Int32 from, Int32 last, Int32 value) at Syncfusion.Windows.Forms.Grid.GridModelRowColSizeIndexer.set_Item(Int32 index, Int32 value) at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGridControlBase.UpdateMenuColors() at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGridControlBase.set_MenuBound(Boolean value) at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGridControlCustomizable.set_MenuBound(Boolean value) at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGridControlBase.Show(ParentBarItem parentItem, Point location, IPopupParent parentUI, Boolean setDefaultSelection) at Syncfusion.Windows.Forms.Tools.XPMenus.CustomizationPanel.RefreshBarItemsList() at Syncfusion.Windows.Forms.Tools.XPMenus.CustomizationPanel.catView_SelectionChanged(Object sender, TreeViewEventArgs e) at System.Windows.Forms.TreeView.OnAfterSelect(TreeViewEventArgs e) at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv) at System.Windows.Forms.TreeView.WmNotify(Message& m) at System.Windows.Forms.TreeView.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m) at System.Windows.Forms.Control.WmNotify(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.NativeWindow.DefWndProc(Message& m) at System.Windows.Forms.Control.DefWndProc(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.TreeView.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 Msg, Int32 wParam, IntPtr lParam) at System.Windows.Forms.TreeNode.Remove(Boolean notify) at System.Windows.Forms.TreeNode.Clear() at System.Windows.Forms.TreeNodeCollection.Clear() at Syncfusion.Windows.Forms.Tools.XPMenus.CustomizationPanel.RefreshCategoryList() at Syncfusion.Windows.Forms.Tools.XPMenus.CustomizationPanel.OnDialogVisibiltyChanged() at Syncfusion.Windows.Forms.Tools.XPMenus.BarCustomizationDialog.OnVisibleChanged(EventArgs e) 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.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow) at System.Windows.Forms.Control.SetVisibleCore(Boolean value) at System.Windows.Forms.Form.SetVisibleCore(Boolean value) at System.Windows.Forms.Control.set_Visible(Boolean value) at System.Windows.Forms.Control.Show() at Syncfusion.Windows.Forms.Tools.XPMenus.BarManager.Customize(IDesignerHost designerHost) at Syncfusion.Windows.Forms.Tools.XPMenus.BarManager.Customize(Boolean start) at Syncfusion.Windows.Forms.Tools.XPMenus.CommandBarManager.StartCustomize() at Syncfusion.Windows.Forms.Tools.XPMenus.CommandBarManager.Customize_Clicked(Object sender, EventArgs e) at Syncfusion.Windows.Forms.Tools.XPMenus.BarItem.OnItemClicked(EventArgs args) at Syncfusion.Windows.Forms.Tools.XPMenus.BarItem.PerformClick() at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGrid.NotifyItem(BarItem item) at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGrid.HidePopup(PopupCloseType popupCloseType) at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGrid.ProcessItemClick(BarItem item) at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGrid.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.ScrollControl.WmMouseUp(Message& msg) at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg) at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGrid.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at TimelineManager.TimelineInterface.Main() in c:\moss adams\holman - timeline\development\timelinemanager\timelineinterface.cs:line 1625The program ''[1564] TimelineManager.exe'' has exited with code 0 (0x0).

2 Replies

AD Administrator Syncfusion Team January 14, 2005 07:46 PM UTC

Hi Lori, I have tested for this issue using the modified version of our ControlBars demo sample in the directory ..\Syncfusion\Essential Suite\2.1.0.9\Tools\Samples\Menus Package\ControlBars, but was not able to see this issue. I have added a new ParentBarItem - "ToolBarList" to the MainMenuBar which contains the ToolbarListBarItem. At runtime, I invoke the Customize dialog and add a the BarItem - "Runtime_Item" (under the category - File under Form1) to this "ToolBarList" menu, and follow the steps outlined above. However, I am not able to see the crash. Please refer to the test sample attached and let me know if I have understood your requirements correctly. Regards, Guru Patwal Syncfusion, Inc.


LO Lori January 19, 2005 04:06 PM UTC

I know why my program was crashing - I had Syncfusion.Windows.Forms.ExceptionManager.PassThroughExceptions set to true. If you use your example do the following steps : - Open the Customize Toolbar dialog from the menu - Go down the the TextForm -> Edit category and add the Cut menu item to the Format toolbar - Close the Customize Toolbar dialog and re-open it. You can see the "catched errors" down in the Output window. catched at Syncfusion.Windows.Forms.Grid.GridModel.OnQueryCoveredRange(GridQueryCoveredRangeEventArgs e) in :line 0

Loader.
Up arrow icon