Our application uses 10.1.20101.2013 build of WinForms. Our customers reporting, the same crash, that originates from UltraWinToolbars. The crash occurs randomly but on a regular basis. Below is the stack trace:
************** Exception Text **************System.ArgumentException: Parameter is not valid. at System.Drawing.Graphics.GetHdc() at System.Windows.Forms.Internal.WindowsGraphics.FromGraphics(Graphics g, ApplyGraphicsProperties properties) at System.Windows.Forms.WindowsGraphicsWrapper..ctor(IDeviceContext idc, TextFormatFlags flags) at System.Windows.Forms.TextRenderer.MeasureText(IDeviceContext dc, String text, Font font, Size proposedSize, TextFormatFlags flags) at Infragistics.Win.DrawUtility.MeasureStringHelper(Graphics gr, String text, Font font, Size layoutArea, StringFormat stringFormat, Int32& charactersFitted, Int32& linesFilled, Boolean returnElementsFitted, GdiDrawStringFlags drawStringFlags) at Infragistics.Win.DrawUtility.MeasureString(Graphics gr, String text, Font font, Int32 width, StringFormat stringFormat, GdiDrawStringFlags drawStringFlags) at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.MeasureString(AppearanceData& appearance, Font font, String stringToMeasure, Boolean isVertical, HotkeyPrefix hotkeyPrefix, ToolBase tool) at Infragistics.Win.UltraWinToolbars.ToolBase.MeasureString(AppearanceData& appearance, Font font, String stringToMeasure) at Infragistics.Win.UltraWinToolbars.ToolBase.GetTextSize() at Infragistics.Win.UltraWinToolbars.ButtonTool.CalculateLogicalSizeOfToolInstanceHelper(ToolBase tool) at Infragistics.Win.UltraWinToolbars.PopupToolBase.CalculateLogicalSizeOfToolInstance() at Infragistics.Win.UltraWinToolbars.ToolBase.CalculateLogicalSizeOfToolInstanceHelper() at Infragistics.Win.UltraWinToolbars.ToolBase.CalculateWidthResolved(Boolean useCalculateLogicalSize) at Infragistics.Win.UltraWinToolbars.ToolBase.get_WidthResolved() at Infragistics.Win.UltraWinToolbars.UltraToolbarBase.AdjustToolWidths(Int32 extent) at Infragistics.Win.UltraWinToolbars.DockRow.GetToolbarLogicalPositions(Int32 extent, Int32[]& widths) at Infragistics.Win.UltraWinToolbars.DockRow.CalculateMetrics() at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.AddToolbar(UltraToolbarBase toolbar, Int32 row, Int32 col, Boolean refreshDockAreaSize, Boolean exclusiveOnRow) at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.AddToolbar(UltraToolbar toolbar, Boolean restoreOldPosition) at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.AddToolbarToDockArea(UltraToolbar toolbar, Boolean restoreOldPosition) at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.AddToolbarsToDockArea(List`1 toolbarList) at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.AddToolbarsToDockArea(DockedPosition targetDockArea) at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.InitializeDockAreaToolbars() at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.InternalSetActiveMdiChildManager(UltraToolbarsManager newActiveMdiChildManager, Boolean calledFromMdiChildActivate, Boolean remergeIfUnchanged) at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnFormMdiChildActivated(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Forms.Form.OnMdiChildActivate(EventArgs e) at System.Windows.Forms.Form.ActivateMdiChildInternal(Form form) at System.Windows.Forms.Form.WmMdiActivate(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at ?.?.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)
Is this a known bug, is there a hotfix?
Thanks
So this is a dead-end?
Has anyone reported this bug to Infragistics? Any developments on that?
Infragistics Support is aware of this bug?
Hello,
I have tried a few experiments with UltraWinToolbars but they are always worked fine. If you have any specific version of NetAdvnatage for WinForms giving you a trouble please feel free to specify it and I will be glad to look further into it for you.
I have tried using the latest version for 10.3, 11.1 and 11.2 and I was not able to reproduce such behavior.
Please feel free to contact us if you have any other questions with this matter.
Have you tried the latest volume release of Infragistics Windows Forms. Does this issue is also reproducible there ?
Are your application use methods implemented externally ?
I am waiting for your feedback.
Hi,
Some of our users are getting similar errors after upgrade to Infragistics 15.2 from 11.2. It is not consistent. The users are on .NET Framework 4.0.
System.ArgumentException: Parameter is not valid.
at System.Drawing.Image.get_FrameDimensionsList()
at System.Drawing.ImageAnimator.CanAnimate(Image image)
at Infragistics.Win.AnimatedImageManager.CanAnimate(Image image)
at Infragistics.Win.AnimatedImageManager.AnimateHelper(Image image, UIElement owningElement, Boolean isBackgroundImage)
at Infragistics.Win.ImageUIElementBase.DrawImage(UIElementDrawParams& drawParams)
at Infragistics.Win.ImageAndTextUIElement.ImageAndTextDependentImageUIElement.DrawImage(UIElementDrawParams& drawParams)
at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams)
at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams)
at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics)
at Infragistics.Win.UIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, 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, Size elementSize)
at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode)
at Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe)
at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.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.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Hi Anuroopa,
In order to investigate this issue further for you, I will need more information about on what operating system, .NET framework and model of the video card this issue is reproducible most of the times. Ideally an isolated sample will decrease the time of troubleshooting it, but as you already mentioned the issue has lack of perseverance and I believe that it is more hardware related (video card driver incompatibility) than related to specific operating system and .NET framework.
There is not a great chance to fix this specific issue, but if you hadn’t already upgraded to the last service release of Infragistics Windows Forms 15.2, I recommend you to keep our controls up to date. The latest service release patch can be download from my keys & downloads.
While I get the hardware details, there are few more details I would like to add. This error is seen while running our automated tests in QTP, which had to be upgraded to TestAdvantage 15.2 Version Free for the application to continue to be tested with QTP. These errors crop up every couple of hours or so when the test suite is running. These tests worked with previous Infragistics 11.2 and TestAdvantage 11.2 CLR4. And we are using the version free dlls of Infragistics 15.2.
Hi, one of my clients get's this error too quite often. Are there any new insights of this? The client uses Windows 7 and there are dozens of other clients within the same environment without any issue.
Thanks!
Error:
Ungültiger Parameter. bei System.Drawing.Image.get_FrameDimensionsList() bei System.Drawing.ImageAnimator.CanAnimate(Image image) bei Infragistics.Win.AnimatedImageManager.CanAnimate(Image image) bei Infragistics.Win.AnimatedImageManager.AnimateHelper(Image image, UIElement owningElement, Boolean isBackgroundImage) bei Infragistics.Win.UIElementDrawParams.DrawImageBackground(AppearanceData& appearance, Rectangle rect, Rectangle invalidRect, Boolean enabled) bei Infragistics.Win.UIElementDrawParams.DrawImageBackground() bei Infragistics.Win.UIElement.DrawImageBackground(UIElementDrawParams& drawParams) bei Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) bei Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) bei Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) bei Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) bei Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) bei Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) bei Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) bei Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) bei Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) bei Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) bei Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) bei Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) bei Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) bei Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics) bei Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics) bei Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) bei Infragistics.Win.UltraWinGrid.UltraGridUIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) bei Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe) bei Infragistics.Win.UltraWinGrid.UltraGrid.OnPaint(PaintEventArgs pe) bei System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer) bei System.Windows.Forms.Control.WmPaint(Message& m) bei System.Windows.Forms.Control.WndProc(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Additional Information: System.Drawing