You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Could not parse -1 for --display / Could not run the sketch (Target VM failed to initialize) when starting a sketch #5118
Could not parse -1 for --display
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help ? Troubleshooting.
I'd like to work with this package but I have no idea what to do with this error.
changed the title [-]Processing 3 fails on Windows 7[/-][+]Could not parse -1 for --display / Could not run the sketch (Target VM failed to initialize) when starting a sketch[/+]on Jun 8, 2017
@Bennettd77 Post code like the content of the hosts file between backticks:
```
# code
```
gives
# code
rather than
code
Anyway, was there a # before every line of the snippet of hosts file you posted? That would mean that the code was commented out (i.e. disabled), so it can't be the relevant part. Unless your hosts file is confidential to the university or for any other reason you can't post it, could you post the whole thing as an attachment?
I have the same problem with OSX Sierra using processing 3.3.4. I see Could not parse -1 for --display. I can get a trivial example to work, but calls to size throw an error that results in no rendering. If there's anything else I can add that would be helpful for debugging, let me know.
quick update. i was able to resolve my problem after looking through the troubleshooting guide and moving the files of my sketch to a more standard location. not sure if that will help others on OSX, but I thought I'd mention it.
I tried what deanmalmgren suggested and moved a sketch folder somewhere else (the Desktop) and executed from there. Same error with two different sketches.
I have multiple monitors, to fix the bug and get it to work for now, I went to File -> Preferences and changed the "Run sketched on display:" property to my 2nd monitor which was actually labeled # 1 by processing.
I can see a fix was committed 2 days ago but has yet to be released.
i had same error and fixed it by moving Processing folder to desktop, but now i don't have this error and i still can't run sketch. Here is just empty field when i'm tryin to run sketch.
Activity
gohai commentedon Jun 7, 2017
Are you running a 64-bit version of Windows 7? Which version of Processing are you running (there are 32-bit and 64-bit versions of it as well).
What happens when you hit play on an empty sketch?
Bennettd77 commentedon Jun 7, 2017
Windows 7 64 bit.
I am using P3 3.3.4 64 bit
The error I posted was in fact hitting play on an empty sketch.
gohai commentedon Jun 7, 2017
Can you post your
%windir%\system32\drivers\etc\hosts? Do you have any esoteric firewall or proxy running perhaps?Bennettd77 commentedon Jun 7, 2017
Well I am behind a firewall as I am on a University computer.
I think this is the relevant part of the 'hosts' file you are looking for:
[-]Processing 3 fails on Windows 7[/-][+]Could not parse -1 for --display / Could not run the sketch (Target VM failed to initialize) when starting a sketch[/+]GKFX commentedon Jun 8, 2017
@Bennettd77 Post code like the content of the hosts file between backticks:
gives
rather than
code
Anyway, was there a
#before every line of the snippet of hosts file you posted? That would mean that the code was commented out (i.e. disabled), so it can't be the relevant part. Unless your hosts file is confidential to the university or for any other reason you can't post it, could you post the whole thing as an attachment?Bennettd77 commentedon Jun 8, 2017
hosts.txt
Every line in my host file is like this. Essentially I have nothing in my hosts file.
BojidarLyutskanov commentedon Jun 10, 2017
I have the exact same problem on Windows 10 64 bit. I am using the processing 3.3.4 version aswell.
BojidarLyutskanov commentedon Jun 10, 2017
I disabled the firewall but the problem still persists and my hosts.txt file is fully commented
FrancisBourre commentedon Jun 11, 2017
Got the same message displayed in the console when I compile on Mac OSX Sierra from PDE (play button pressed):
Could not parse -1 for --displaydeanmalmgren commentedon Jun 12, 2017
I have the same problem with OSX Sierra using processing 3.3.4. I see
Could not parse -1 for --display. I can get a trivial example to work, but calls tosizethrow an error that results in no rendering. If there's anything else I can add that would be helpful for debugging, let me know.deanmalmgren commentedon Jun 12, 2017
quick update. i was able to resolve my problem after looking through the troubleshooting guide and moving the files of my sketch to a more standard location. not sure if that will help others on OSX, but I thought I'd mention it.
Bennettd77 commentedon Jun 12, 2017
I tried what deanmalmgren suggested and moved a sketch folder somewhere else (the Desktop) and executed from there. Same error with two different sketches.
panwarab commentedon Jun 15, 2017
Getting the same error on Windows 8 64-bit.
ptr2null commentedon Jun 16, 2017
Can confirm this on Windows 10 64-bit (latest build). Versions 3.3.2 and 3.3.3 don't have this issue.
Fix "Could not parse -1 for --dsiplay" error
shah253kt commentedon Jun 20, 2017
Happened to me as well. Windows 10 x64
efroim102 commentedon Jun 21, 2017
I have multiple monitors, to fix the bug and get it to work for now, I went to File -> Preferences and changed the "Run sketched on display:" property to my 2nd monitor which was actually labeled # 1 by processing.
I can see a fix was committed 2 days ago but has yet to be released.
shah253kt commentedon Jun 21, 2017
That actually fixed the problem for me. Thanks!
Bennettd77 commentedon Jun 21, 2017
I followed efroim102's instructions and was met with the following new error:
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help ? Troubleshooting.
efroim102 commentedon Jun 22, 2017
@Bennettd77 There's a reported issue (#4853, #4863), with a Nvidia Driver, If you have a Nvidia Graphics card it might be related.
I personally have a Nvidia GeForce GTX 1060 Graphics card, but changing the monitor selected in preferences fixed it.
Swayin commentedon Jun 22, 2017
i had same error and fixed it by moving Processing folder to desktop, but now i don't have this error and i still can't run sketch. Here is just empty field when i'm tryin to run sketch.

benfry commentedon Mar 5, 2018
(Locking to prevent confusion/further posts because the issue was resolved almost a year ago)