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
40
"The Object is currently in use elsewhere"
posted

I'm using ultrawintoolbars 5.3 in a project (VS.net C# windows app) on terminal server. Randomly I get the error "the object is currently in use elsewhere." I've searched your forums and found a discussion about this that ended without a stated resolution in the thread. The Infragistics employee that answered was Andrew Smith. He though there was a hotfix for this somewhere. This thread happened Oct 12,2006. Here is the link to the thread:

 http://news.archive.infragistics.com/readmessage?id=%3C7e787976$4227cd95$50f3b@news.infragistics.com%3E&group=infragistics.products.netadvantage.windowsforms.wintoolbars

I'm getting the same exact JIT details as in the thread.

Here is the JIT details:

> ************** Exception Text **************
> System.InvalidOperationException: The object is currently in use
> elsewhere.
>   at System.Drawing.Image.get_Height()
>   at System.Drawing.Image.get_Size()
>   at
> Infragistics.Win.UltraWinToolbars.PopupToolBase.CalculateLogicalSizeOfToolInstance()
>   at Infragistics.Win.UltraWinToolbars.ToolBase.get_WidthResolved()
>   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.DrawElement(UIElementDrawParams&
> defaultDrawParams)
>   at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle
> invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode,
> Boolean
> clipText, Boolean forceDrawAsFocused)
>   at Infragistics.Win.UIElement.Draw(Graphics graphics, Rectangle
> invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode)
>   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, Boolean disposeEventArgs)
>   at System.Windows.Forms.Control.WmPaint(Message& m)
>   at System.Windows.Forms.Control.WndProc(Message& m)
>   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
>   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
>   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
> IntPtr wparam, IntPtr lparam)

Parents
  • 125
    posted

    Phruby, did you try a hotfix, and did it work around the problem?  I'm also seeing it in my use of the toolbars.  I should add I'm using v 7.3.

    Also, to Infragistics support, it doesn't compute that an old hotfix is mentioned here and in the other thread, but we're on 7.3.  Have there been no more recent examples of this still occurring?  Can you tell me more about how I can work around this in my own code?  What I think is happening is that I'm using the same image resource from more than one tool, and some kind of race condition is occuring on accessing the image resource.  Can you confirm, or suggest anything else that might be a problem?

Reply Children