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
160
System.ArgumentException: Destination array was not long enough
posted

Hello,

We've encountered a rather strange bug. We have several UltraButtons on a WinForms view.

Application crashes with the following exceptions:

---

System.ArgumentException: Destination array was not long enough.
Check destIndex and length, and the array's lower bounds.
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at Infragistics.Win.AppStyling.StyleInfo.Add(RoleState state, StateInfo stateInfo)
at Infragistics.Win.AppStyling.StyleInfo.LoadContents(StyleInfo style, XmlReader reader, StyleParseInfo parseInfo)
at Infragistics.Win.AppStyling.StyleInfo.LoadContents(StyleInfo style, StyleParseInfo parseInfo)
at Infragistics.Win.AppStyling.StyleInfo.Parse()
at Infragistics.Win.AppStyling.StyleInfo.get_StateFlags()
at Infragistics.Win.AppStyling.StyleManager.CreateStyleInfo(UIRole role)
at Infragistics.Win.AppStyling.UIRole.VerifyCache()
at Infragistics.Win.AppStyling.UIRole.ResolveAppearance(AppearanceData& appearance, AppearancePropFlags& requestedProps, RoleState state)
at Infragistics.Win.Misc.UltraButtonBase.ResolveAppearanceHelper(UIElementButtonState buttonState, AppearanceData& appearance, AppearancePropFlags& requestedProps, UIRole buttonRole)
at Infragistics.Win.Misc.UltraButtonBase.ResolveAppearance(UIElementButtonState buttonState, AppearanceData& appearance, AppearancePropFlags& requestedProps)
at Infragistics.Win.Misc.UltraButtonUIElement.InitAppearance(AppearanceData& appearance, AppearancePropFlags& requestedProps)
at Infragistics.Win.Misc.UltraButtonUIElement.PositionChildElements()
at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
at Infragistics.Win.UIElement.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.UltraControlBase.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)

---

System.ArgumentException: Parameter is not valid.
at System.Drawing.Image.get_Width()
at System.Drawing.Image.get_Size()
at Infragistics.Win.DrawUtility.DrawImageBackground(Graphics g, AppearanceData& appearanceData, AlphaBlendMode alphaMode, Rectangle invalidRect, Control control, Rectangle relativeRect, ImageAttributes imgAttributes, ColorRenderMode colorRenderMode, Boolean isEnabled)
at Infragistics.Win.UIElementDrawParams.DrawImageBackground(AppearanceData& appearance, Rectangle rect, Rectangle invalidRect, Boolean enabled)
at Infragistics.Win.Misc.UltraPanelClientAreaUIElement.DrawImageBackground(UIElementDrawParams& drawParams)
at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams)
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.Misc.UltraPanelClientArea.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region transparentRegion)
at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset)
at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle)
at System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent)
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)

---

Any idea why?

Thanks in advance.

Parents Reply Children
No Data