|
Author |
Topic: java mode or external class "hangs" sketch (Read 547 times) |
|
amoeba
|
java mode or external class "hangs" sketch
« on: Oct 26th, 2003, 7:35pm » |
|
[bug as seen in Processing 0065] Sketches hang when I try to use Java mode or load external classes. The IDE is unaffected, but sketches stop executing without reporting any errors. It has showed up before when I tried to do a simple Java mode example, and now when I tried to experiment with Pitaru's sonia lib. From using println to give debug messages, I've figured out that setup() runs, then loop() runs once or twice before hanging. The window comes up correctly, but does not update. If I press stop the window will sometimes display the drawn frame correctly. When using println to debug I sometimes get the following error: Code: PdeMessageSiphon err java.lang.NullPointerException java.lang.NullPointerException at PdeRuntime.message(PdeRuntime.java:459) at PdeMessageSiphon.run(PdeMessageSiphon.java:55) at java.lang.Thread.run(Thread.java:536) |
| This is when executing the following program: Code: public class MyDemo extends BApplet { void setup() { size(200, 200); background(255); rectMode(CENTER_DIAMETER); noStroke(); fill(255, 204, 0); println("setup"); } void loop() { println("loop"); background(255); rect(width-mouseX, height-mouseY, 50, 50); rect(mouseX, mouseY, 50, 50); } } |
| I was thinking I'd be patient and wait for Java mode to become more stable in future releases, but sound input is too tempting... m
|
« Last Edit: Oct 26th, 2003, 7:54pm by amoeba » |
|
marius watz // amoeba http://processing.unlekker.net/
|
|
|
fry
|
Re: java mode or external class "hangs" sketch
« Reply #1 on: Oct 27th, 2003, 2:35am » |
|
ahhhhh... good catch. that's a really nasty one, actually. all the System.out messages (like println) were getting sent to System.err, so p5 thought that your "loop" messages were a long stack trace for an exception.. the happy ending is that it's all fixed for 67. amit was running into something similar, but i was confused about what was going on. i'm glad you opted to report this one, otherwise you'd have been waiting a long time for java mode to get better and i wouldn't have had a clue that this was even broken as badly as it was
|
|
|
|
amoeba
|
Re: java mode or external class "hangs" sketch
« Reply #2 on: Oct 27th, 2003, 11:44pm » |
|
de rien, baby. can't wait for 0067. m
|
marius watz // amoeba http://processing.unlekker.net/
|
|
|
trip
|
Re: java mode or external class "hangs" sketch
« Reply #3 on: Oct 29th, 2003, 7:56am » |
|
I'm running 0067, and it still "hangs" with the above code. Exactly like 65. No more PdeMessageSiphon err though. If I remove all the println()'s though, it hangs pretty much like 65, no messages, just a non working window. c
|
|
|
|
trip
|
Re: java mode or external class "hangs" sketch
« Reply #5 on: Oct 31st, 2003, 2:14am » |
|
I just redownloaded 67 and java mode still hangs the sketch. I am using the code that was mentioned above.. and I'm in winXP c
|
|
|
|
|