473,568 Members | 3,164 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GDI+ Exception

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.InvalidO perationExcepti on: The object is currently in use
elsewhere.
at System.Drawing. Graphics.EndCon tainer(Graphics Container container)
at System.Windows. Forms.DibGraphi csBufferManager .ReleaseBuffer
(GraphicsBuffer buffer)
at System.Windows. Forms.GraphicsB uffer.Dispose()
at System.Windows. Forms.Control.W mPaint(Message& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at Syncfusion.Wind ows.Forms.Scrol lControl.WndPro c(Message& msg)
at Syncfusion.Wind ows.Forms.Grid. GridControlBase .WndProc(Messag e&
msg)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr 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!
Nov 16 '05 #1
2 2086
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" <ma***********@ gawab.com> wrote in message
news:ep******** ******@TK2MSFTN GP14.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.InvalidO perationExcepti on: The object is currently in use
elsewhere.
at System.Drawing. Graphics.EndCon tainer(Graphics Container container)
at System.Windows. Forms.DibGraphi csBufferManager .ReleaseBuffer
(GraphicsBuffer buffer)
at System.Windows. Forms.GraphicsB uffer.Dispose()
at System.Windows. Forms.Control.W mPaint(Message& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at Syncfusion.Wind ows.Forms.Scrol lControl.WndPro c(Message& msg)
at Syncfusion.Wind ows.Forms.Grid. GridControlBase .WndProc(Messag e&
msg)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr 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!

Nov 16 '05 #2
Thanx for such quick and prompt answer. I have posted this issue to
SyncFusion support forum. I hope they'll look into it ASAP.

Maqsood Ahmed
Kolachi Advanced Technologies

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3759
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black and white CCITT4 compressed files (frames) inside the tiff. Every now and then I receive a mixture of black and white CCITT4 and JPEG compressed...
5
4129
by: anonymous | last post by:
I'm writing a program that deals extensively with the printer. For the most part my application runs fine, but occasionally I run into some Exceptions. The most common exceptions I run into are NullReferenceException and InvalidOperationException : The object is currently in use elsewhere. Unfortunately this appears to be a race condition. ...
5
2687
by: Pohihihi | last post by:
I am getting a generic GDI+ error on following code. Basically it is trying to capture screen image and save in a file. Is there a way to find more details on this error? Thanks for the help. --------------------------- ERROR MSG --------------------------- System.Runtime.InteropServices.ExternalException: A generic error occurred in...
6
1943
by: Phillip N Rounds | last post by:
I have an application which is heavily graphics intensive, all the graphics being custom. Scattered throughout by app, I have MyView->OnDraw( this->GetDC() ); Apparently, each call to this->GetDC() creates a GDI object and, 16,000 or so calls to OnDraw() results in the Application hanging because it can no longer create any new GDI...
2
22285
by: Alphonse Giambrone | last post by:
I am currently reading 'Programming The Web with Visual Basic .NET' and have so far found it to be excellent. Downloaded all the code from Apress and working in chapter 4, I get the error shown below. I am running IIS5 on WinXP Pro. Server Error in '/Chapter04' Application....
3
5859
by: T. Davis | last post by:
In C#, I am able to successfully stream a TIFF image that comes from a BLOB field in a database, save it to file, then convert the pages within TIFF file into jpegs (using GDI+) and display on the web (using ASP.NET). However, when I generate the Image object using FromStream (passing in the MemoryStream containing image bytes), an...
3
6363
by: Ger | last post by:
I have a form with a panel (Panel1) in which I dynamically create picturebox controls. Works like a dream with static pictures, but not when the picturebox.image is an animated gif. GDI+ throws the following error in this case: "An unhandled exception of type 'System.Runtime.InteropServices.ExternalException' occurred in...
15
5312
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run...
7
10373
by: j4richard | last post by:
Help please, I am getting this "Unhandled Exception has occurred in your application" " A Generic error occurred in GDI+" See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text **************...
0
7692
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7913
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7659
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.