Stopping the sketch with escape sometimes fails.

Hi,

I usually use Processing on Windows (XP, don't tell) and I usually stop the sketch with the escape key. Often Processing ignores the escape key. Alternatively there's Alt-space-C or the top right X which I think always work.

After I've closed all the Processing windows, I sometimes I find one or two Processing.exe in Task-Manager. I'm thinking these must be from sketches that haven't ended cleanly.

Does anyone know what causes this unreliability? I think it's more likely as sketches become more complicated.

(I mainly ask because I use Processing to introduce programing to young people and the fewer things that are going astray the better.)

Richard.

Answers

  • Offhand, are you:

    1. defining an exit() function and not calling super.exit() at the end?
    2. using keyPressed() etc. to catch the key event and then defining it to something else?

    You say unreliable, which makes it sound like this sometimes doesn't and sometimes does happen with almost any sketch. If you are using an up-to-date version of Processing then that sounds like perhaps it should be a bug report -- if it isn't listed in Issues already:

  • edited December 2017

    Windows XP

    Does anyone know what causes this unreliability?

    I think you just answered your own question. :p

  • Thanks for your comments.

    I've just retested a new install of Processing 3.3.6, on Windows-7 (Enterprise SP1 64). Examples: 'Topics, Motion, CircleCollision'. 'esc' will sometimes stop it, sometimes not. Does not have exit(), keyevent().

    Glanced at the first 5 pages of those bug reports, nothing obviously relevant.

  • I wonder if this is a regression for XP specifically -- that is, had you used earlier versions of 3.x on XP and not encountered the problem? Or has it always been like that?

    Also: are the young people using XP in the environment where you introduce it? Not a fix, but if it is OS version specific that might make it less of an issue.

  • Jeremy, Sorry don't understand your implication re XP or not. As I see it the issue happens on either OS, and I've been vaguely aware of it for some time. I've used CircleCollision with students so they might have encountered it - however most prefer the mouse (as is the way these days).

  • Sorry @RichardDL, I somehow missed loading your last post in my previous reply -- I was responding to KevinWorkman.

    If it is on happening on multiple versions of Windows / multiple computers then this definitely sounds like it should be filed as a bug report on https://github.com/processing/processing/issues

Sign In or Register to comment.