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 & HelpSyntax Questions › error running exported applet
Page Index Toggle Pages: 1
error running exported applet (Read 326 times)
error running exported applet
Sep 23rd, 2008, 6:37am
 
Hello!

Please help.  I had my applet already deployed and everything. (see here: http://jeiki.awardspace.com/processing/recursive_circles/)

I went back to the source to fix a tiny bug, I only changed one line. The fix works and it runs fine in processing, but when I export it does not run.  The java console gives the following error:

"Error while running applet.
java.lang.RuntimeException: use textFont() before text()

at processing.core.PGraphics.text(PGraphics.java:2511)

at processing.core.PApplet.text(PApplet.java:7680)

at recursive_circle_motion.display(recursive_circle_motion.java:228)

at recursive_circle_motion.draw(recursive_circle_motion.java:71)

at processing.core.PApplet.handleDisplay(PApplet.java:1465)

at processing.core.PGraphics.requestDisplay(PGraphics.java:690)

at processing.core.PApplet.run(PApplet.java:1562)

at java.lang.Thread.run(Unknown Source)
java.lang.RuntimeException: use textFont() before text()

at processing.core.PGraphics.text(PGraphics.java:2511)

at processing.core.PApplet.text(PApplet.java:7680)

at recursive_circle_motion.display(recursive_circle_motion.java:228)

at recursive_circle_motion.draw(recursive_circle_motion.java:71)

at processing.core.PApplet.handleDisplay(PApplet.java:1465)

at processing.core.PGraphics.requestDisplay(PGraphics.java:690)

at processing.core.PApplet.run(PApplet.java:1562)

at java.lang.Thread.run(Unknown Source)
"

I am calling textFont() in setup() and text() in draw(), so textFont() should be called first.  Is this an issue with multi-threading?
Re: error running exported applet
Reply #1 - Sep 23rd, 2008, 6:07pm
 
Maybe Bug 726 : use textFont() before text() is relevant...

It says it is fixed in 0145 (I have already hit the issue with 0143), perhaps you should upgrade (we don't know which Processing version you use).
Just tried my little code snippet in the linked message, and it works without problem in 0148.
Re: error running exported applet
Reply #2 - Sep 27th, 2008, 11:15pm
 
Hey PhiLho,

Thanks for your help.  I was running an older version of processing.  But now I have an even bigger problem!  I downloaded 0148 (with Java).  Now I can not run any sketch!  When I press Play, the button turns yellow but nothing launches.  There is no message in the console.  I'm sure this has something to do with Processing not being able to find Java.  Does anyone know how to fix this?

Thanks!
Page Index Toggle Pages: 1