FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 1284 : Use textFont() before text()
Last modified: 2010-06-05 03:15
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
INVALID -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
Ash
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2009-06-27 12:33
This bug...
http://dev.processing.org/bugs/show_bug.cgi?id=726
Exception in thread "Animation Thread" java.lang.RuntimeException: Use textFont()
before text()
at processing.core.PGraphics.showTextFontException(PGraphics.java:5006)
at processing.core.PGraphics.text(PGraphics.java:2797)
at processing.core.PApplet.text(PApplet.java:7363)
Note: This occurs on multiple platforms - Windows XP, 2000, MacOs, etc... using a
mixture of Java 5, Java 6u13, etc...
This occurs even when defensively calling textFont() within the body of draw() --
basically all the things mentioned in the previous bug report have been tried. This
issue occurs sporadically but 'almost reproducibly' and very frequently. Also, as other
posters mention, this is probably a threading issue; it occurs with all recent versions
that we've attempted to use (1.0.3, 1.0.5, etc).
Specifically we embed Processing Applets within a Swing GUI (which itself has been
painful -- mostly due to this kind of issue).
The previous reports talked of 'fixing'/improving Processings core threading
infrastructure... is this actually going to happen (anytime soon)/would it be
reasonable to expect that this will be fixed 'properly'.
I could sequentially trawl through each revision and see if it magically happens to
work, but if that is my only option then perhaps it is time to consider an alternate
toolkit... We have a number of Processing based visualizations and it would be preferable to not switch; also I suspect that sorting out the threading would be a
significant benefit to all users who use Processing in a more complex context than as
a 'top-level app window'.
Any suggestions for a temporary fix/workaround?
Thanks,
Ash
Additional Comment
#1 From fry 2009-06-29 13:37
that bug has long been fixed. you'd need to post a minimal example that
shows the problem so that it can be reproduced. my guess would be that
something is incorrect in how things have been embedded in your code.
Additional Comment
#2 From fry 2010-06-05 03:15
no response, closing bug.