Re: GDI+ Exception
From: Bob Powell [MVP] (bob_at__spamkiller_bobpowell.net)
Date: 10/05/04
- Next message: Bob Powell [MVP]: "Re: transform coordinate system"
- Previous message: Dennis Myrén: "Array of value types"
- In reply to: Maqsood Ahmed: "GDI+ Exception"
- Next in thread: Maqsood Ahmed: "Re: GDI+ Exception"
- Reply: Maqsood Ahmed: "Re: GDI+ Exception"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 5 Oct 2004 12:31:11 +0200
Hi, When I made my comments about this exception it was in relation to code
running on version 1.1.
My observation of a similar exception was also made using a very simple
test-case which had only standard Windows Forms controls and no third-party
components. The exception you're seeing here is due to code trying to use a
GDI+ Graphics object in two places at once, possibly due to a threading
issue or some race condition. I have noticed that very occasionally, and
unfortunately it's not repeatable otherwise I would have filed a bug report,
the standard Windows Forms double buffering scheme fails in this manner.
Manual doule buffering seems to prevent this from ever happening.
However, in the case you mention the exception is raised inside one of the
SyncFusion third-party tools and it's obvious that they use built-in double
buffering in their tools. It's unlikely that you can turn this off so you
may be stuck with the problem unless SyncFusion kow of any issues with their
grid product.
I would strongly recommend that you upgrade to .NET 1.1 with the latest
service pack in any case. It's free from Microsoft.
-- Bob Powell [MVP] Visual C#, System.Drawing Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/gdiplus_faq.htm The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml "Maqsood Ahmed" <maqsood_ahmed@gawab.com> wrote in message news:epVZV7qqEHA.3848@TK2MSFTNGP14.phx.gbl... > Hello! > We have experienced following exception in our application that runs > over .net v1.0, I had gone through the internet to find an answer about > it but failed to do so. I had found a comment about this exception by > Mr. Bob Powell (MVP). > Now I want to know that if this problem presists in .net framework > v1.1?? > > --------------- > System.InvalidOperationException: The object is currently in use > elsewhere. > at System.Drawing.Graphics.EndContainer(GraphicsContainer container) > at System.Windows.Forms.DibGraphicsBufferManager.ReleaseBuffer > (GraphicsBuffer buffer) > at System.Windows.Forms.GraphicsBuffer.Dispose() > at System.Windows.Forms.Control.WmPaint(Message& m) > at System.Windows.Forms.Control.WndProc(Message& m) > at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) > at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& > msg) > 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) > ---------------------- > > > Maqsood Ahmed > Kolachi Advanced Technologies > > *** Sent via Developersdex http://www.developersdex.com *** > Don't just participate in USENET...get rewarded for it!
- Next message: Bob Powell [MVP]: "Re: transform coordinate system"
- Previous message: Dennis Myrén: "Array of value types"
- In reply to: Maqsood Ahmed: "GDI+ Exception"
- Next in thread: Maqsood Ahmed: "Re: GDI+ Exception"
- Reply: Maqsood Ahmed: "Re: GDI+ Exception"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|