FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Bug Fixes, Implemented Suggestions
(Moderator: fry)
   Memory leak with println
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Memory leak with println  (Read 1276 times)
mflux

fluxhavoc WWW
Memory leak with println
« on: Sep 22nd, 2003, 12:20am »

Put this code in Processing and compile:
 
void setup()
{
 
}
 
void loop()
{
  println("rawr");
}
 
 
Now view your CPU usage history.
 
Here's what I saw
 
http://www.design.ucla.edu/~mflux/posted/memoryleak.jpg
 
I don't know what's causing this but I think it is a memory leak. The CPU gets taxed more and more until it redlines at 100% at which Processing slows to a halt and the debug window stops refreshing.
 
 
Is this a known issue? Someone help me out, because it's really annoying to debug without using print.
 
fry


WWW
Re: Memory leak with println
« Reply #1 on: Sep 22nd, 2003, 2:00am »

yeah, it's a known issue. it's a problem with the swing-based console we're using.  
 
though the problem is that with your program, you'll be running loop() maybe 100 times per second, meaning that 100 lines are being added every second, which is a bit much. so your machine has difficulty keeping up.  
 
we hope to try and repair this soon. but for now, a super-minimal program like that is really gonna hose things.
 
Euskadi


Re: Memory leak with println
« Reply #2 on: Dec 17th, 2003, 11:10pm »

Here's my workaround.  In 067, Win XP I just bring up Task Manager and kill the process. Then I resurrect Processing and go to the history list (a lifesaver!) and bring up my latest run.
 
I think I've got the whole process down to under a minute.
 
fry


WWW
Re: Memory leak with println
« Reply #3 on: Feb 2nd, 2004, 11:02pm »

ok, i've fixed this for rev 68, coming soon..
 
Pages: 1 

« Previous topic | Next topic »