# Editor starts, programs (sketches) won't run

**URL:** https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237
**Category:** Processing
**Created:** [December 7, 2019, 10:24pm UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237 "2019-12-07T22:24:44Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![OldNick](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/oldnick/32/7464_2.png) [@OldNick](https://discourse.processing.org/u/OldNick)
#### Post date: [December 7, 2019, 10:24pm UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237/1 "2019-12-07T22:24:44Z")

</div>

Hello all, I’m new to this forum.

Processing 3.3.7 & 3.5.3 on Windows 10 home x64.

I had used Processing quite some time ago, and everything worked fine, but now → see title.

The editor works, I can load, save and edit programs. But when I try to run them everything freezes and nothing happens, even with something as simple as this, which should just open a small window:

```auto
void setup(){
  size(200,300);
}

```

What I tried (and didn’t work, of course):

- rebooting Windows
- running Processing as administrator
- verifying that my antivirus wasn’t blocking something
- using the latest version (3.5.3)
- removing the preferences.txt file
- removing the whole AppData/Roaming/Processing folder

As the editor console generates no error message, I ran Processing with the --l4j-debug command, which generated this log file:

> Version: 3.9  
> CmdLine: D:\System2\Prog\processing-3.3.7\_x64\processing.exe --l4j-debug  
> WOW64: yes  
> Working dir: D:\System2\Prog\processing-3.3.7\_x64.  
> Bundled JRE: java  
> Check launcher: D:\System2\Prog\processing-3.3.7\_x64\java\bin\javaw.exe (OK)  
> Heap -Xmx: Requested 256 MB / 0%, Available: 7896 MB, Heap size: 256 MB  
> Substitute: EXEDIR = D:\System2\Prog\processing-3.3.7\_x64  
> Add classpath: lib\pde.jar  
> Add classpath: core\library\core.jar  
> Add classpath: lib\jna.jar  
> Add classpath: lib\jna-platform.jar  
> Add classpath: lib\antlr.jar  
> Add classpath: lib\ant.jar  
> Add classpath: lib\ant-launcher.jar  
> Launcher: D:\System2\Prog\processing-3.3.7\_x64\java\bin\javaw.exe  
> Launcher args: -Xmx256m -Djava.ext.dirs=“D:\System2\Prog\processing-3.3.7\_x64\java\lib\ext” -Djna.nosys=true -Djna.boot.library.path=lib -Djna.nounpack=true -Dsun.java2d.d3d=false -Dsun.java2d.ddoffscreen=false -Dsun.java2d.noddraw=true -classpath “lib;lib\pde.jar;core\library\core.jar;lib\jna.jar;lib\jna-platform.jar;lib\antlr.jar;lib\ant.jar;lib\ant-launcher.jar” processing.app.Base  
> Args length: 375/32768 chars  
> Exit code: 259

And in the AppData/Roaming/Processing/console folder I found some small xxx.err files:

> déc. 07, 2019 10:19:58 AM java.util.prefs.WindowsPreferences   
> WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(…) returned error code 5.
> 
> Could not run the sketch (Target VM failed to initialize).  
> Make sure that you haven’t set the maximum available memory too high.

Any help would be appreciated. 😉  
And sorry for the wall of text.

---

<div class="post-metadata">

### Author: ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)
#### Post date: [December 8, 2019, 4:07am UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237/2 "2019-12-08T04:07:51Z")

</div>

I found an exit code 259 in a previous github issue: [https://github.com/processing/processing/issues/5188](https://github.com/processing/processing/issues/5188)

I understand your issue is different as you are able to run Processing but you cannot run an actual sketch. When was the last time it worked fine? I guess you did some update or did you install Processing from scratch?

Can you try two things and report if there is any change?

1. Try having a setup and draw, is there any difference?
2. Try running a completely empty sketch. Any difference?

Also I suggest you try running the sketch from the command prompt using **processing-java** and see if you get additional info there. You need to run a command prompt (Click the Windows icon and start typing cmd and it will be the first option, then modify the next lines to adapt to your case using absolute paths, all in a single line:

```auto
processing-java 
--force 
--sketch=C:\Users\usr\Documents\Processing\multiple_cube_rotations 
--output=C:\Users\usr\Documents\Processing\multiple_cube_rotations\tmp
--run

```

Finally, you can keep the format of your text above if you surround your text with triple back ticks ```.  
Hopefully there is more information to troubleshoot further.

Kf

---

<div class="post-metadata">

### Author: ![OldNick](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/oldnick/32/7464_2.png) [@OldNick](https://discourse.processing.org/u/OldNick)
#### Post date: [December 9, 2019, 4:13am UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237/3 "2019-12-09T04:13:37Z")

</div>

_Thanks for the reply, the help, and the interesting link._

The last time I successfully ran Processing must have been ~ 3 years ago. 🙄 (Not sure about that.)  
I did no update (apart from Windows, of course) and a fresh download of the current version shows the same problems.

- setup + draw: no change;
- void sketch: ditto.

I ran your command line (from a .bat file) and Processing executed but never terminated. The files created in the /tmp folder don’t seem very informative, but I’m no expert.

What I tried/noticed since:

- every time a loaded sketch is run, the Java SE binary stays in memory (so there can be multiple instances) till I close the first (void) editor;
- I get the same behavior (editor opening, sketches doing nothing) on my laptop and my desktop (both run W10 home x64);
- **but** I successfully ran sketches on Win7 (in a virtual machine);
- yet tweaking the compatibility settings in Win10 didn’t help,

So for now my take is that it is some Win10/Processing incompatibility fluke. It’s just strange that I seem to be the only one affected, and that on two different machines: ?!?

Anyway, thanks again for your help. 😄

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [December 9, 2019, 4:31am UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237/4 "2019-12-09T04:31:00Z")

</div>

> [@OldNick](#):
>
> It’s just strange that I seem to be the only one affected, and that on two different machines: ?!?

yes, bad.  
hmm, some you triggered the same windows event / or go the same ( not working ) install or operation way??

but yes,  
nearly impossible that you have the same problem with graphic card… on 2 machines.

* * *

let’s only talk

> win 10, 64bit ( i use Win 10 Pro 1903 )

just download a NEW  
[http://download.processing.org/processing-3.5.3-windows64.zip](http://download.processing.org/processing-3.5.3-windows64.zip)

please, use easy path: and unzip to:  
c:\Users\ \< Users \> \Documents  
as  
c:\Users\ \< Users \> \Documents\processing-3.5.3  
start  
c:\Users\ \< Users \> \Documents\processing-3.5.3\processing.exe  
get new directory:  
c:\Users\ \< Users \> \AppData\Roaming\Processing  
c:\Users\ \< Users \> \Documents\Processing\

if processing can not make that 2 directories or finds a bad  
c:\Users\ \< Users \> \AppData\Roaming\Processing\preferences.txt  
delete that directory first and restart.

---

<div class="post-metadata">

### Author: ![OldNick](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/oldnick/32/7464_2.png) [@OldNick](https://discourse.processing.org/u/OldNick)
#### Post date: [December 10, 2019, 3:28am UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237/5 "2019-12-10T03:28:20Z")

</div>

↑ Thanks for your suggestions. After cleaning all the Processing leftovers I could find (files, folders, reg keys) I installed as you said but nothing has changed.

The folder c:\Users\ \< Users \> \Documents\Processing\ is **not** created (but c:\Users\ \< Users \> \AppData\Roaming\Processing is, and I deleted it and restarted).

I also tried running P with antivirus disabled.

So for now I’m stuck. ☹

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [December 10, 2019, 3:42am UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237/6 "2019-12-10T03:42:13Z")

</div>

> [@OldNick](#):
>
> The folder c:\Users\ \< Users \> \Documents\Processing\ is **not** created

at the beginning you say like:  
processing / install / editor working  
but can not run/execute any sketch, even from command line.

now you can not even install processing?

if the sketchpath can not be created /  
default if new systems dir / preferences.txt is  
c:\Users\ \< Users \> \Documents\Processing\   
you have no modes/examples/libraries/own sketches

does  
c:\Users\ \< Users \> \Documents  
exist or you moved that?

---

<div class="post-metadata">

### Author: ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)
#### Post date: [December 10, 2019, 5:29am UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237/7 "2019-12-10T05:29:26Z")

</div>

> [@OldNick](#):
>
> The folder c:\Users\ \< Users \> \Documents\Processing\ is **not** created

1. You download the zip file from the website
2. you place it in the Documents folder
3. then unzip it.
4. Go inside this folder and you double click in **processing.exe**.

What happens? Please show screenshots of any errors.

You can also launch processing from a command prompt window. Do the following:

1. Click on the window logo to get your Windows menu
2. Start typing “cmd” and you will get a list of options. Click on “Command prompt”
3. This will open a command prompt terminal Type: `cd c:\Users\<user>\Documents\<unzip-processing-folder>` where you replace `<user>` with your Windows user name.
4. Type `processing.exe`, press ENTER and this should launch Processing. Tell us if you get any error messages.
5. To copy any message from this _command prompt window_ you need to do the following:

- Press Ctrl+M → This will allow you to highlight any text in the command prompt window
- Select the text
- Press the ENTER key  
This will copy the selected text into the clipboard. Then you can copy the text here. Make sure you add three back ticks ``` before and after the text so the format of the pasted text is preserved.

Kf

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [December 10, 2019, 6:41am UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237/8 "2019-12-10T06:41:32Z")

</div>

> **changed**
>
> > [@kfrajer](#):
> >
> > The last step is to rename it Processing
> 
> you do that?
> 
> so later your sketchbook dir and your program dir is same?  
> c:\Users\ \< Users \> \Documents\Processing\
> 
> sorry, i still think it is not a very good idea?  
> how you use a Processing-3.5.3 and add install 4.0.0…
> 
> * * *
> 
> add and in this question it would not help to do that,

i expect that processing can create its sketchbook dir

- on install ( first start )
- on change per preferences

---

<div class="post-metadata">

### Author: ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)
#### Post date: [December 10, 2019, 6:46am UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237/9 "2019-12-10T06:46:54Z")

</div>

@kll You are right, let me edit that as what I said is not correct.

Kf

---

<div class="post-metadata">

### Author: ![OldNick](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/oldnick/32/7464_2.png) [@OldNick](https://discourse.processing.org/u/OldNick)
#### Post date: [December 12, 2019, 3:35am UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237/10 "2019-12-12T03:35:22Z")

</div>

First, thanks again to all for the suggestions! 😊

@kll

You wrote (emphasis mine):

> [@kll](#):
>
> **start**  
> c:\Users\ \< Users \> \Documents\processing-3.5.3\processing.exe  
> get **new** directory:  
> c:\Users\ \< Users \> \AppData\Roaming\Processing  
> \*\* c:\Users\ \< Users \> \Documents\Processing\ \*\*

So of course I searched for these directories. (I never use the Documents folder, so it was quite possible that something had landed there without me noticing.)

But don’t worry, I can “install” Processing, no problem there.

@kfrajer

Launched Processing from the command line as you suggested, but same result and no messages in the P. console or the Windows console.

What I tried and didn’t work (same result, editor opens, executed sketch hangs):

- running P. sandboxed (with Comodo);
- switching the graphic processor (my laptop has both a NVIDIA card and an integrated Intel chip).

What worked:

Running P. in a Windows **10** virtual machine (I had tried W7 before).

What finally gave me an error message:

Booting W10 into safe mode (I don’t know if P. is compatible or not with safe mode):

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/c549177f5a543b76a0f7fb121383b3dd2b349349.png)

At that point I have two questions:

- does the Java runtime have to access the Internet? (It tries.)
- is there some documentation or cheat sheet for the parameters used to execute a sketch file with processing-java.exe, but from another editor?

Thanks for the support!

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [December 12, 2019, 4:51am UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237/11 "2019-12-12T04:51:24Z")

</div>

why now have the question about  
processing and internet connection?

as far i know you should be online for

- use contribution manager  
( update / get libraries & tools )
- some help functions  
( while the reference and also some library help reference and examples should be local available )

just run a sketch is possible while OFFLINE

* * *

> [@OldNick](#):
>
> parameters used to execute a sketch file with processing-java.exe, but from another editor?

[Command Line · processing/processing Wiki · GitHub](https://github.com/processing/processing/wiki/Command-Line) ,

actually  
-a- you say your PDE works, but can not start sketch  
-b- you say starting from command line give same ERROR

so using other editor is not the question / possible solution here.  
but sure can use other editor or IDE  
search  
eclipse / Atom / VS code / Geany / note pad plus plus /  
ok, the  
[https://processing.org/tutorials/eclipse/](https://processing.org/tutorials/eclipse/)  
is just down here?

and even teach it to start via command line tool  
like from GEANY i use

```auto
processing-java --sketch=%d --run

```

 ![RPI_GEANY_processing](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/5dea274ec142ca9b8d9a41db8096b13a2dc1f159.jpeg)

---

<div class="post-metadata">

### Author: ![OldNick](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/oldnick/32/7464_2.png) [@OldNick](https://discourse.processing.org/u/OldNick)
#### Post date: [December 16, 2019, 1:00am UTC](https://discourse.processing.org/t/editor-starts-programs-sketches-wont-run/16237/12 "2019-12-16T01:00:57Z")

</div>

Update: **solved!**

It was my firewall software blocking a port. Normally it pings me when something new happens, but apparently not for ports, so it escaped me.

Thanks for the answers, and happy coding! 😁
