473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1732
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
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...

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.