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 › Problem on delay function
Page Index Toggle Pages: 1
Problem on delay function (Read 1421 times)
Problem on delay function
Aug 21st, 2008, 7:13am
 
I found a problem with delay function, error shown as below: (framescycle as my program name), I have check in Java website, it was said that it requires syncronize objects (http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=27&t=001604) just wonder how it handle in progressing on thread issue.

Exception in thread "Animation Thread" java.lang.IllegalMonitorStateException: current thread not owner
at java.lang.Object.wait(Native Method)
at processing.core.PApplet.delay(PApplet.java:1948)
at framesCycle.draw(framesCycle.java:68)
at processing.core.PApplet.handleDraw(PApplet.java:1400)
at processing.core.PApplet.run(PApplet.java:1305)
at java.lang.Thread.run(Thread.java:595)
Re: Problem on delay function
Reply #1 - Aug 21st, 2008, 7:21am
 
I found this problem only happens on ver 148, it works fine in 0135 Beta. May be it is a bug?
Re: Problem on delay function
Reply #2 - Aug 21st, 2008, 3:03pm
 
what function are you calling delay() from?
Re: Problem on delay function
Reply #3 - Oct 25th, 2008, 9:10pm
 
I can confirm this problem. I was running a  delay(); call inside the draw function and was getting the same error as above in 0148.  After upgrading to 0154 the same code worked as expected, with no errors.
Page Index Toggle Pages: 1