473,508 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DrawPath OutOfMemoryException

I've got a PictureBox where the end user can draw rectangles, lines,
ellipses and freehand on an image. Everything works fine, except for an
occasional OutOfMemoryException. It only occurs when drawing freehand and
there's already a figure (StartFigure is called again), the first line is
added to the figure and DrawPath is called. The exception occurs (only
occasionally) when the call is made to DrawPath. It only happens when the
pen width >= 2. I can get around the exception by leaving the mouse over
the image with the left button pressed down, and pressing the space bar to
clear the exception.

Dave
Jul 21 '05 #1
1 1742
Solved the problem by writing my own figure and drawpath.

"Dave" <da************@stgutah.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
| I've got a PictureBox where the end user can draw rectangles, lines,
| ellipses and freehand on an image. Everything works fine, except for an
| occasional OutOfMemoryException. It only occurs when drawing freehand and
| there's already a figure (StartFigure is called again), the first line is
| added to the figure and DrawPath is called. The exception occurs (only
| occasionally) when the call is made to DrawPath. It only happens when the
| pen width >= 2. I can get around the exception by leaving the mouse over
| the image with the left button pressed down, and pressing the space bar to
| clear the exception.
|
| Dave
|
|
Jul 21 '05 #2

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

Similar topics

4
4299
by: Ryan Seghers | last post by:
I've got a program that has no user interface (like a service but not actually a Windows Service yet) in which I'd like to handle OutOfMemoryExceptions. I'd at least like to log the failure before...
0
2729
by: Per Bergland | last post by:
After many woes, I finally managed to get a stack dump of my System Service (written in C#) that insists on crashing when launched at system boot time (see below on how to get this dump - I...
3
4277
by: Tim Bücker | last post by:
Hello. I have a question concerning the Graphics.DrawPath method. Where is the border drawn using a pen with the size of 3? It doesn´t seem that the border is drawn outside of the path (just a...
3
5965
by: Michael | last post by:
I have a problem with catching the OutOfMemoryException in a managed C+ application. When creating small objects on the managed heap neithe the catch handler for OutOfMemoryException nor the...
1
3426
by: Ripul Handa | last post by:
Hi We are running IIS 5.0 cluster with cisco local director. We are running a website on 2 webservers and I have been observing that from past few days we have are getting this error message of...
1
4954
by: SMG - Idealake | last post by:
Hi all, I am getting following error on my error, what could be the reason? Exception of type System.OutOfMemoryException was thrown. Description: An unhandled exception occurred during the...
2
3913
by: Dave | last post by:
We just started getting this error message in our application today (stack trace below). From the OutOfMemoryException, I'm guessing it could be a memory leak. I'm making sure I'm closing all my...
1
449
by: Dave | last post by:
I've got a PictureBox where the end user can draw rectangles, lines, ellipses and freehand on an image. Everything works fine, except for an occasional OutOfMemoryException. It only occurs when...
13
12909
by: Venkatachalam | last post by:
Hi, In my application I have text(flat) file as input and I have to generate an XML file. The maximum input text file size can be 900MB and gererated xml may result 2+ GB. Based on the first...
0
7231
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,...
0
7133
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...
0
7336
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,...
0
7405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7066
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...
0
5643
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3214
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...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
435
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...

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.