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
577
UltraFontNameEditor OutOfMemory exception on drawing drop down list of fonts
posted

I get an OutOfMemory exception either immediately when the list of fonts drop down (my own app) or when I scroll the font list (test app).

I can reproduce that in a solution with a default control on an otherwise empty form. This is the error message:


System.OutOfMemoryException: Out of memory.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)
at Infragistics.Win.DrawUtility.DrawStringHelper(Graphics gr, String text, Font font, SolidBrush brush, Rectangle bounds, StringFormat stringFormat, GdiDrawStringFlags drawStringFlags)
at Infragistics.Win.DrawUtility.DrawString(Graphics gr, String text, Font font, SolidBrush brush, RectangleF bounds, StringFormat stringFormat, GdiDrawStringFlags drawStringFlags)
at Infragistics.Win.FontNameEditor.OnDrawValueListItem(Object sender, DrawValueListItemEventArgs args)
at Infragistics.Win.ValueList.FireDrawValueListItem(DrawValueListItemEventArgs args)
at Infragistics.Win.ValueListItemUIElement.FireDrawValueListItemHelper(UIElementDrawParams drawParams)
at Infragistics.Win.ValueListItemUIElement.DrawBackColor(UIElementDrawParams& drawParams)
at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams)
at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams)
at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams)
at Infragistics.Win.UIElement.DrawChildElements(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, Nullable`1 zoomFactor)
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 Infragistics.Win.ValueListDropDownUnsafe.WndProc(Message& message)
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)

Is it a known bug or am I doing something wrong?

This in Infragistics version: 17.2.20172.2006 on Net 4.7.1 on Windows 7. My app is quite old and this has worked for me before.

Parents Reply Children
No Data