We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › delay() thread problem
Page Index Toggle Pages: 1
delay() thread problem (Read 494 times)
delay() thread problem
Sep 9th, 2008, 2:22am
 
I keep getting error called "current thread not owner".
It seems to have something to do with delay() function.

And I've just found that your sample code for delay(), which is the following, does not work and gives the same error.

I'm using version 0148.


int pos = 0;
void draw() {
 background(204);
 pos++;
 line(pos, 20, pos, 80);
 if(pos > width) {
   pos = 0;
 }
 delay(250);  // Stops the program for 250 milliseconds
}
Re: delay() thread problem
Reply #1 - Sep 9th, 2008, 12:53pm
 
I can reproduce the issue with Processing 0148 on Windows XP Pro SP2.
Looked in the bug database, found Bug 894 : Exception in thread "Animation Thread" when using delay() which explain the issue (delay is greater than the framerate). Might be fixed in 0149.
Re: delay() thread problem
Reply #2 - Sep 17th, 2008, 8:13pm
 
I receive the same error message on all delay() calls, using the same version.
No luck remedying it so far. Any fixes yet?
Page Index Toggle Pages: 1