Hello,
We have unsolicited random untrapped exception from 10.3 FormattedLinkLabel. Please find the thread stack dump attached.
Someone on the forum suggest to get the latest SR, but the SR release note are not mentioning any fix for this one.
Please advice.
System.ArgumentException: Parameter is not valid.
at System.Drawing.Graphics.MeasureCharacterRanges(String text, Font font, RectangleF layoutRect, StringFormat stringFormat)
at Infragistics.Win.FormattedLinkLabel.PositionElementsCache.ReMeasureParts(String text, Int32[] parts, Single[] widths, Int32 partStartIndex, Int32 partEndIndex, Font font, Single& lineHeight)
at Infragistics.Win.FormattedLinkLabel.NodeText.TextLayoutInfo.ReMeasure(PositionElementsInfo& info, Int32 startWordIndex, Int32 endWordIndex)
at Infragistics.Win.FormattedLinkLabel.NodeText.CreateLineItemHelper(TextLayoutInfo textInfo, Int32 startWordIndex, Int32 endWordIndex, PositionElementsInfo& info)
at Infragistics.Win.FormattedLinkLabel.NodeText.SplitFromLastBreakPoint(PositionElementsInfo& info, LineItem item, LineItem& item1, LineItem& item2)
at Infragistics.Win.FormattedLinkLabel.PositionElementsInfo.SplitLineItemAtBreakPointHelper(Int32 itemIndex)
at Infragistics.Win.FormattedLinkLabel.PositionElementsInfo.WrapLine(Boolean wrapFromBreakPoint, Boolean dontWrapIfThereIsEmptySpace)
at Infragistics.Win.FormattedLinkLabel.PositionElementsInfo.AddLineItem(LineItem item, Boolean cacheItem)
at Infragistics.Win.FormattedLinkLabel.NodeBase.PositionSelfFromCache(PositionElementsInfo& info)
at Infragistics.Win.FormattedLinkLabel.NodeNBSP.PositionSelf(PositionElementsInfo& info)
at Infragistics.Win.FormattedLinkLabel.NodeBase.PositionHelper(PositionElementsInfo& info)
at Infragistics.Win.FormattedLinkLabel.NodeBase.Position(PositionElementsInfo& info)
at Infragistics.Win.FormattedLinkLabel.NodeBase.PositionChildNodes(PositionElementsInfo& info)
at Infragistics.Win.FormattedLinkLabel.NodeBlock.PositionChildNodes(PositionElementsInfo& info)
at Infragistics.Win.FormattedLinkLabel.NodeBase.PositionElements(IFormattedLinkLabelOwner owner, UIElement containerElem, Rectangle containerRect, Boolean calcIdealLayoutSize, Size& layoutSize)
at Infragistics.Win.FormattedLinkLabel.FormattedTextUIElement.PositionElementsHelper(Rectangle layoutRect, Boolean setElemRectToIdealSize)
at Infragistics.Win.FormattedLinkLabel.FormattedTextUIElement.PositionChildElements()
at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
at Infragistics.Win.FormattedLinkLabel.FormattedLinkEmbeddableUIElement.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, 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)
Could you please give me more information about your problem, because I try to simulate this exception, but I couldn`t. Please try to send us small solution with this exception or tell us what are you doing to get this error.
Please keep me in touch.
Regards
Georgi
Hello Georgi,
This error appears from our Production Infrastructure only, really hard even impossible to reproduce so far (up to know).As you notice, we can't trap this exception raised from the windows internal invoking Infragistic code.
May I suggest you check the code of the function : Infragistics.Win.FormattedLinkLabel.PositionElementsCache.ReMeasureParts
Verifify if a try catch is present for safety, If not strongly considere to add one, at least to avoid customer application to crash!
I found similar problem on the net and feel we are not alone in this bad shape.
Thanks!
Hello again,
Our team work a lot of your issue (together with our colleagues in USA and Bulgaria) and we think that the reasons to appear suck kind of issue is that you didn`t instal vol. 10.3 SR.
Please try to instal vol.10.3 SR and keep us in touch. Also if you have possibility, try to get a pattern how to reproduce such kind of issue.
Here is a sample application to reproduce the problem.
Bug is triggered by a docked ultraformattedlink control inside an ultragroup with autoscroll properties set to true.
If I enter a small text it works, but if the text is too long then the bug is triggered.
Is this fix in the latest SR ?
Hi,
I test your sample with our latest service release (10.3.20103.2083) and this issue is fixed. You could download the latest SR from our web site: Infragistics.com -> MyIG -> Keys & Downloads