FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Software Bugs
(Moderator: fry)
   win 68/69 - code folder + keyPressed() causes hang
« Previous topic | Next topic »

Pages: 1 2 
   Author  Topic: win 68/69 - code folder + keyPressed() causes hang  (Read 4802 times)
mKoser

WWW Email
win 68/69 - code folder + keyPressed() causes hang
« on: Apr 8th, 2004, 8:48pm »

i am working on a project which uses Marius' SimplePostscript (placed in the code-folder) ... all of a sudden keyboard events causes the applet (the one that opens when hitting run) to hang.
 
so, i've tried to narrow it down.
 
-
 
at first i thought i had found another occurance of this bug:
http://processing.org/discourse/yabb/board_Proce55ing_software__bugs_action_display_num_1078957094.html
 
but when copying the win32com.dll, comm.jar and javax.comm.properties into my code-folder of the sketch (see code below) it still hangs.
 
Code:

void setup(){
}
 
void loop(){
}
 
void keyPressed(){
  background((int)random(255));
}

 
bug ideas hacks solutions
 
+ m
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
fry


WWW
Re: win 68/69 - code folder + keyPressed() causes
« Reply #1 on: Apr 13th, 2004, 7:50pm »

odd.. could you post a copy of your sketch folder somewheres so i can try it out?
 
mKoser

WWW Email
Re: win 68/69 - code folder + keyPressed() causes
« Reply #2 on: Apr 14th, 2004, 12:52am »

here's the stripped down version (as written above) if you cannot reproduce the error with that, let me know, and i can send one of the more buffy sketches.
 
http://proce55ing.beyondthree.com/testing/0069/keyboard_input.zip
 
+ m
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
fry


WWW
Re: win 68/69 - code folder + keyPressed() causes
« Reply #3 on: Apr 14th, 2004, 4:28am »

hrm, weird.. not crashing or hanging for me  
 
just keeps changing the background as expected (rev 69 on xp, java 1.4.2_03, p4 2.5ghz)
 
mKoser

WWW Email
Re: win 68/69 - code folder + keyPressed() causes
« Reply #4 on: Apr 14th, 2004, 11:29am »

ok, this is freaking me out then.
 
i just downloadet a fresh version of 0069 and tried it again - i am still able to produce the error. I tried with both 0069 expert and standard.
 
it also makes no difference whether i use the .bat file or the .exe file (just trying everything at the moment).
 
( winXP, java 1.4.2_02, Centrino 1.3 gHz )
 
...i'll keep banging against it, but i might be off for a few days (going to Denmark).  
 
+ m
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
fry


WWW
Re: win 68/69 - code folder + keyPressed() causes
« Reply #5 on: Apr 14th, 2004, 7:16pm »

yeah, i'm not sure. i wouldn't doubt there's trouble, and it prolly has to do with the descrepancy between java versions installed on your machine (are you using standard or expert?) let me know if you find anything.  
 
anyone else having similar trouble or can reproduce this?
 
toxi_
Guest
Email
Re: win 68/69 - code folder + keyPressed() causes
« Reply #6 on: Apr 14th, 2004, 7:43pm »

okay, i'm getting no hanging either, but the simple presence of the "code" folder (empty or not) causes keyPressed() to be ignored and the sketch window to appear in AWT style (ie. the java icon is used in place of the P5 one). i've got pretty similar config to mikkel's setup:
 
winXP home, j2sdk1.4.2, dell inspiron8500
 
Code:
void loop() {
  background(random(255));
}
 
void keyPressed() {
  println(key);
}

 
running that, i can see the intended flickering in the main loop, but no console output when pressing keys. also, when hovering over the applet, the mouse cursor changes to the "system wait" one... maybe that's what mikkel meant with "hanging"?
 
remove the code folder again, and it all works as usual
 
can this possibly be related to that issue with no key presses coming through in present mode (regardless of a code folder, though)?
 
k.
 
fry


WWW
Re: win 68/69 - code folder + keyPressed() causes
« Reply #7 on: Apr 15th, 2004, 12:24am »

ahh.. that's a clue.
 
something about how key events are being handled by a window (and passed to the applet). perhaps between java 1.4.1 (included with p5) vs 1.4.2 (installed elsewhere on the machine). the former being used when run without a code folder, the latter being used when run with the code folder. or something like that, at least.
 
mKoser

WWW Email
Re: win 68/69 - code folder + keyPressed() causes
« Reply #8 on: Apr 16th, 2004, 6:58pm »

what i ment by *hanging* is that, i am not able to kill the applet-window, after clicking the x-button (close-window) a few times, i get a system error-message (system, as in Windows) saying the 'Program Not Responding' ... where i get to click 'End Now'.
 
however - the 'not being able to close the window' ONLY occurs if i have used the keyboard (ie. pressed some keys) otherwise the applet window closes fine.
 
-
 
reg. standard/expert, i have produced the error with both 0069 standard and expert. (as far as i've understood it, the standard uses the java-version that it is shipped with right? so my systems setup shouldn't interfer in that case? or..?)
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
fry


WWW
Re: win 68/69 - code folder + keyPressed() causes
« Reply #9 on: Apr 16th, 2004, 7:37pm »

re: the hanging, i follow you, it's just that the event model might be triggering an exception that's killing things (which is why i was thinking toxi's find might be a clue)
 
re: java standard/expert.. theoretically it's supposed to be using the java that's included with it, but you know.. this is alpha software, so who knows what it might be up to
 
fry


WWW
Re: win 68/69 - code folder + keyPressed() causes
« Reply #10 on: Apr 26th, 2004, 2:54pm »

is this a more widespread problem? i saw that some of the sonia guys were having trouble.. can anyone else get it to reproduce often with a particular sketch? if so, could you post a .zip of the sketch folder?
 
pitaru

WWW Email
Re: win 68/69 - code folder + keyPressed() causes
« Reply #11 on: Apr 26th, 2004, 4:00pm »

Ben, i can't reproduce the problem again with Sonia 2.7, which makes me think that it was a non related sonia bug (since fixed?) with a similar error message.
 
so on my end - looks a false alarm. sorry!
 
-amit
 
baffo

WWW
Re: win 68/69 - code folder + keyPressed() causes
« Reply #12 on: Apr 27th, 2004, 10:11pm »

Ben,
    this
 
http://people.interaction-ivrea.it/w.aprile/tmp/wedger-code-XP.zip
 
    is a minimal case that hangs reliably. Processing 69, Windows XP, Professional edition, regularly updated.
 
    I noticed that my JRE was 1.4.2, so I downgraded to 1.4.1 - at least I hope that I managed to completely banish 1.4.2 - and the hanging is still happening.
 
    For me this has turned into a noncritical problem, because I have solved my problem with a partially nonProcessing solution, but for others this could be a real showstopper.
 
    regards
  W.
 

-- art is not where you think you're going to find it
dmchan


Re: win 68/69 - code folder + keyPressed() causes
« Reply #13 on: Jun 9th, 2004, 12:05am »

i'm having applets hang in the pde on windows xp, java 1.5.0b2, and processing 68 and 69. as i searched through the forum, i was (skeptically) convinced that it was norton antivirus that was causing the hangs, but uninstalling that did not solve anything.  
 
now, i'm pretty sure i can reproduce this reliably.
 
take any example sketch and add an empty code folder to the sketch. the applet will hang about 4 out of 5 times. the behavior i'm noticing is not related to mouse or keyboard events in the sketch at all. take the code folder out and it will work just fine.
 
i've used the examples/cellular_automata_1 applet as an example and it's hung on my windows xp installation with java 1.5.0b2 and a fresh(*) windows 2000 installation with java 1.5.0b2.
 
dave
 
(*) by fresh, i mean without any antivirus software or process/service monitors like microsoft debug monitor.
 
fry


WWW
Re: win 68/69 - code folder + keyPressed() causes
« Reply #14 on: Jun 11th, 2004, 6:39pm »

thanks for all the investigative work, this helps me a lot.
 
can anyone confirm whether it's just that the sketch freezes entirely, versus it's just that it stops responding to events?
 
Pages: 1 2 

« Previous topic | Next topic »