I have a form containing an UltraCombo control that is instantiated from a .NET application, as well as a legacy app through COM interop. After upgrading to Infragistics v10.1, instantiating the form in the legacy application causes an exception when the the UltraCombo is painted. Calling the form from .NET works as before.
stack trace:
System.ArithmeticException: Overflow or underflow in the arithmetic operation. at Infragistics.Win.EditorWithTextUIElement.GetImageSize(Size originalImageSize, Size& imageSize) at Infragistics.Win.EditorWithTextUIElement.GetLargestImageWidth() at Infragistics.Win.EditorWithTextUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) 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 Infragistics.Win.UltraWinGrid.UltraCombo.OnPaint(PaintEventArgs e) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) 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)
Hello Monica,
Could you please describe when this is happening or if possible provide a small sample project reproducing this behavior, I will be happy to take a look at it.
I'm also interested in a solution for that!
Hello,
Have you found a solution ? I have exactly the same problem. After calling to an unmanaged function, my ultracomboBoxes throw a system.arithmeticexception. I use Infragitics 11.1
Thank you
Kiven
Yes. My customers got the same problem in v9.2. it happens several times since my infragistics is updated from v8.2 to 9.2.
Hi,
What version were you using before you upgraded?
The call stack indicates that this is blowing up in the GetLargestImageWidth method, which has undergone some changes. So it seems reasonable that this change might have caused an issue in an untested scenario like COM interop.
I'm fairly sure that COM Interop is not an environment that we officially support. And I'm certain that we don't do any testing specific to that environment.
Be that as it may, are you able to reproduce this Exception in a small sample project? If so, it should be a fairly simple matter for us to look into it and see if there's anything we can do to fix it.