FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 587 : double output from draw()
Last modified: 2007-10-16 06:41
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
FIXED -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
petros
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2007-06-25 04:56
Version: 0124 (no Java)
OS: Vista Ult.
AMD 3400+, 1GB RAM
From discourse thread:
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1180546722
Issue: If size() is not called within setup(), code within draw() is
executed twice, even if noLoop() is used.
* This issue does not appear when using processing with Java included.
The following example produces double output:
Example 3:
---------
void setup() {
noLoop();
}
void draw() {
print("hello"); //TEXT AREA OUTPUT: hellohello
}
Workaround:
This problem can be overcome by calling size() within setup().
Example 3:
---------
void setup() {
size(320,240); // <-- FIXES THE DOUBLE OUTPUT PROBLEM
noLoop();
}
void draw() {
print("hello"); //TEXT AREA OUTPUT: hello
}
Additional Comment
#1 From fry 2007-10-16 06:41
found and fixed in release 0128.