Sketch only works first time after opening, can't run second time unless restarting Processing

edited February 2014 in Using Processing

When I open a file in processing, I am able to run it only once. After that, I have to quit Processing and reopen the file, at which point I can run it again.

Any ideas?

Answers

  • edited February 2014

    Worked briefly after uninstalling Google Drive and Citrix Receiver, but the problem has returned...

  • Is it for any sketch or just for one particular program?

  • hey..

    apparently Processing has some issues regarding "Sketches wont run..." since release of 2.0. They are working on it but there doesnt seem to be any pattern of when it works and when it doesnt. i had similar issues like you have. i could run a sketch but not 2 or 3 times in a row, i had to do some other stuff (browsing, emailing ... ) inbetween and then i can run a sketch again, really weird!

    long story short, i solved my issues by changing the preferences of the "maximum available memory" back to 512 MB rather than 1024 MB which i had before! now i can start my sketch whenever i want! YEah

    hope that helps you?!

  • edited February 2014

    I use 1024 MB option w/o any problems. Although it's v2.0.2 and it's running under 64-bit OpenJDK 7!

  • I've tried various setups / files / and with & without max memory settings...and it keeps happening. Though I did discover that when running the sketch, I should quit it fully (using cmd-Q) in which case I am able to relaunch it subsequently...!

  • edited February 2014

    I have not found a way that works for me flawlessly.

    In my activity monitor I can see that java process has started, but not yet renamed itself into the sketch name, like it's paused.

    Workaround: If I spam cmb+r a few times it will usually spawn a functioning sketch, but it will also spawn a few which are not starting.

    Downside: When I quit processing, all "paused" java processes will start up.

    Is there a bug report on Github? I can't find any.

  • And when I force quit the java process console spits this text:

    Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help → Troubleshooting.

    Not sure if it helps anyone or not.

  • I have the same problem. Other than the restarting workaround you already use, I find that I can usually have the sketch run a second time by first pressing run, waiting a couple seconds then hitting stop, then hitting run again twice. I can offer no explanation as to why this works. (latest version of Processing, OS X Mavericks)

Sign In or Register to comment.