hi,
my problem is, that the script runs for 2-5 seconds and then the error is shown.
error:
java.lang.NullPointerException
at processing.core.PGraphics.text(PGraphics.java:2007)
at processing.core.PApplet.text(PApplet.java:6468)
at Temporary_8588_3583.draw(Temporary_8588_3583.java:28)
at processing.core.PApplet.display(PApplet.java:1326)
at processing.core.PGraphics.requestDisplay(PGraphics.java:525)
at processing.core.PApplet.run(PApplet.java:1142)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at processing.core.PGraphics.text(PGraphics.java:2007)
at processing.core.PApplet.text(PApplet.java:6468)
at Temporary_8588_3583.draw(Temporary_8588_3583.java:28)
at processing.core.PApplet.display(PApplet.java:1326)
at processing.core.PGraphics.requestDisplay(PGraphics.java:525)
at processing.core.PApplet.run(PApplet.java:1142)
at java.lang.Thread.run(Unknown Source)
java.io.IOException: Stream closed.
at java.net.PlainSocketImpl.available(Unknown Source)
at java.net.SocketInputStream.available(Unknown Source)
at processing.net.Client.run(Client.java:149)
at java.lang.Thread.run(Unknown Source)
java.lang.RuntimeException: Error inside Client.run()
at processing.core.PApplet.die(PApplet.java:2078)
at processing.core.PApplet.die(PApplet.java:2096)
at processing.net.Client.errorMessage(Client.java:441)
at processing.net.Client.run(Client.java:179)
at java.lang.Thread.run(Unknown Source)
Code:
import processing.net.*;
Client test;
String input;
PFont font;
void setup () {
size (200,200);
test = new Client (this,"127.0.0.1",2000);
font = loadFont("font.vlw");
framerate (10);
}
void draw (){
background (0);
input = test.readString();
fill (200);
//translate (0,20);
textFont(font,20);
text (input,10,10);
}
i dont know what i have to do i hope you can help me.
greez
Tschdaeff