FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 894 : Exception in thread "Animation Thread" when using delay()
Last modified: 2008-09-19 08:38
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
FIXED -
Pr
i
ority:
P1
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
laurence
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2008-08-24 15:19
I get the error with rev 0148 on an intel pc (windows XP spanish) using the following
code:
void setup() {
}
void draw() {
println("Now");
delay(1000);
println("Now");
delay(1000);
}
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 sketch_080824a.draw(sketch_080824a.java:8)
at processing.core.PApplet.handleDraw(PApplet.java:1400)
at processing.core.PApplet.run(PApplet.java:1305)
at java.lang.Thread.run(Thread.java:595)
the code works fine with rev 0135.
Additional Comment
#1 From fry 2008-08-25 08:10
confirmed, will try to fix for 0149. thanks for the report.
Additional Comment
#2 From fry 2008-08-25 08:11
Or if you're curious and want to get things working in the meantime... My
guess is that the problem is that the delay() is still occurring when
draw() gets called again (as it tries to keep running at 60 fps), so it's
possible that using noLoop() and redraw() might work better in your case.
However I'll hopefully have a fix in the next few days.
Additional Comment
#3 From Lobz 2008-09-03 22:21
I downloaded version 148 in hope of making my code work, instead all codes
stopped working.
Each time I hit RUN, a new run window opened, but they wouldn't close, so I
had many bugged open windows for the same program.
To close those windows I had to close the code window.
I searched the bug list and discovered the delay
bug 894
,
removed all delays and the codes now work
but there's one window that still hasn't closed.
I can minimize and drag it, but not close it anyhow.
I have actually ran the respective code after that with no problems (it
created a new window, of course)
Additional Comment
#4 From fry 2008-09-19 08:30
fixed for 0149.