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
215
Random InvalidOperationException in using UltraWinToolbars
posted

I'm using ultrawintoolbars(version 9.2.20092.2017) in a project (VS.net C# windows app).Randomly I get the error "the object is currently in use elsewhere."

Below is the stack trace:

 ************** Exception Text **************

System.InvalidOperationException: the object is currently in use elsewhere.
   at System.Drawing.Image.get_Width()
   at System.Drawing.Image.get_Size()
   at Infragistics.Win.UltraWinToolbars.PopupToolBase.CalculateLogicalSizeOfToolInstance()
   at Infragistics.Win.UltraWinToolbars.PopupControlContainerToolBase.CalculateLogicalSizeOfToolInstance()
   at Infragistics.Win.UltraWinToolbars.ToolBase.CalculateLogicalSizeOfToolInstanceHelper()
   at Infragistics.Win.UltraWinToolbars.ToolBase.CalculateHeightResolved(Boolean useCalculateLogicalSize)
   at Infragistics.Win.UltraWinToolbars.ToolBase.get_Height()
   at Infragistics.Win.UltraWinToolbars.UltraToolbarBase.ToolGroup..ctor(ToolbarMetrics metrics, ToolBase firstVisibleTool)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarBase.ToolbarMetrics.CalculateFloatingMetrics(Size cachedSize, Size delta)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarBase.GetMetrics(Size cachedSize, Size delta)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarBase.ToolAreaInformation.FromToolbar(UltraToolbarBase toolbar, Rectangle overallArea)
   at Infragistics.Win.UltraWinToolbars.ToolbarUIElement.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 Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.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)

Parents
No Data
Reply
  • 71886
    Offline posted

    Hello wangchanel,

    I did some research about this issue. I made it clear to myself that this might be caused by a bug in the framework, fixed in the latest versions. The following is a quote from Andrew Smith regarding the same type of exception throwed with a red drawed symbol similar to an 'X' in place of a control:

    This sounds like a very old issue that I thought was worked around in a hotfix although v2 is a very old version and its possible that the issue was reported and worked around (its actually an issue in the .net framework) in a later release.

    You could take a look at the following thread too: http://forums.infragistics.com/forums/p/9284/88839.aspx. This kind of issue is discussed there also.

    Please do not hesitate to ask if something comes up.

Children
No Data