Defold 1.2.149 doesn't start on Windows

#1

Hey guys,
I just updated to the newest version of Defold, but it won’t start on Windows.
There’s no logs and the processes (Defold and OpenJDK Platform binary) still run on the background, with no visual feedback at all.

I’m running Windows 10 (Version 1809, build 17763.379) and my graphics card is the AMD R9 380.
My guess is that there’s issues with graphics card compatibility as I’ve had that before.

Thanks!

1 Like

Defold won't open
Slime Defense - Idle Tower Defense
#2

I think that issue with drivers should have been fixed by now. Can you end Defold and OpenJDK tasks and try running editor again? Can you share latest editor logs? They should be available at C:\Users\your-username\AppData\Local\Defold

0 Likes

#3

The log for today is empty if I open the newest version of Defold. If I open the previous one, it starts filling it out.

0 Likes

#4

I’d recommend to try a fresh install, but before you do it, can you please check, what channel are you on? In folder where Defold is installed should be a file called config. In it there should be a line like “channel=stable” or “channel=editor-alpha”.

0 Likes

#5

I’ve actually tried a fresh install already, and the result is the same. I’ve also tried updating the graphics driver to the latest version, but that didn’t work either. I’m using the previous version, which works fine until this is fixed…
I’m on editor-alpha. Let me know how else I can help!

1 Like

#6

Do you get any hs_err_pidXXX.log files created?

1 Like

#7

Nope. There’s nothing else in the Defold folder besides the necessary files.

0 Likes

#8

You should be able to see at least some logs if you will start editor from the command line. To do it on windows, open command prompt (cmd.exe), then change directory to where Defold is located, for example:

cd Downloads\Defold

then run this command:

.\packages\jdk11.0.1\bin\java.exe -Djna.nosys=true -Ddefold.launcherpath=,-Ddefold.resourcespath= -Ddefold.version=xxx -Ddefold.editor.sha1=d0c8b4bdd890a5ae34dc3eb2f5fde65741d2b192 -Ddefold.engine.sha1=34bb9603dfcb145c74fbb4f36f4146acea4c4252 -Ddefold.buildtime=2019-03-19T14:03:01.657137 -Ddefold.channel=editor-alpha -Djava.net.preferIPv4Stack=true -Dsun.net.client.defaultConnectTimeout=30000 -Dsun.net.client.defaultReadTimeout=30000 -Djogl.texture.notexrect=true -Dglass.accessible.force=false --illegal-access=warn --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.java2d.opengl=ALL-UNNAMED --add-opens=java.xml/com.sun.org.apache.xerces.internal.jaxp=ALL-UNNAMED -jar .\packages\defold-d0c8b4bdd890a5ae34dc3eb2f5fde65741d2b192.jar com.defold.editor.Main

Hopefully that way we will be able to see whats wrong and help you.

2 Likes

#9

This is the error I get!

Exception in thread "WindowsNativeRunloopThread" java.lang.NoSuchMethodError: <init>
        at com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native Method)
        at com.sun.glass.ui.Screen.initScreens(Screen.java:412)
        at com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
        at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "WindowsNativeRunloopThread" java.lang.NoSuchMethodError: <init>
        at com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native Method)
        at com.sun.glass.ui.Screen.initScreens(Screen.java:412)
        at com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
        at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
        at com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
        at com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:738)
        at com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:334)
        at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:279)
        at com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
        at java.base/java.lang.Thread.run(Thread.java:834)
1 Like

#10

And when I force quit, I get an additional one

Exception in thread "Glass/Prism Shutdown Hook" java.lang.NullPointerException
        at com.sun.javafx.tk.quantum.QuantumToolkit.dispose(QuantumToolkit.java:841)
        at com.sun.javafx.tk.quantum.QuantumToolkit$1.run(QuantumToolkit.java:252)
0 Likes

#11

I could be totally incorrect - but the error message leads me to believe it’s a Java version issue.

On Windows 10 you can check by typing “Configure Java” @ the start menu, then open the app.

Under the “Update” tab, there are options to change auto-update frequency, and an “Update Now” button to manually update.

1 Like

#12

That worked! I also added the _JAVA_OPTIONS variable to the environment system variables (I had it in the local user variables)

Thank you!

2 Likes

#13

You shouldn’t have to add any of that stuff. The editor should be self contained and run without you having to mess with Java setup on your own. At least that is the idea. @vlaaad will probably be able to figure stuff out now that we have some exceptions and more knowledge of the problem.

1 Like

#14

I wonder how it worked since we provide our own OpenJDK in Defold and don’t use system one at all…

1 Like

#15

My guess is that you had some environment variables that were picked up by our jdk that led to an error… Can you share what’s in your java-related env vars?

1 Like

#16

I’ll be more detailed in how it got solved, hopefully that helps.

So, I followed what decoded said, but while the newest version was installing, an error came up:
“Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit”
I googled how to solve this problem and they suggested adding _JAVA_OPTIONS with a value of Xmx512M to my System Variables.
I had a previous configuration in my User variables: “-Xmx4G -Xms[forgot what I put here]G”.
I deleted that and instead, placed the variable to my System Variables with “-Xmx4G”.
The Java update worked, and Defold finally opened.

1 Like

#17

Interesting. Has Defold always done that?

For some reason I thought Java was required separately to run Defold. However, I just un-installed Java completely, and Defold still works fine. :thinking:

So, I was totally incorrect - but somehow we got lucky :four_leaf_clover:

1 Like

#18

Yes. Or at least for a very long time.

1 Like

#19

I guess our Java runtime picked up the options you had set and that was too little memory for Defold. Thanks for discovering this, we will investigate how to prevent this in the future!

2 Likes

#20

I have the same issue on Windows 10, and I can confirm that it’s something with environmental variables.

Though, tinkering with _JAVA_OPTIONS didn’t work for me.

I have two java environments installed: 8 and 11. I can start Defold if I make “11” the default one in PATH, but it’s not that handy as there is lots of legacy software relying on JRE8.

I think you may find it interesting, @markus.gustavsson

Best regards,
Ved

2 Likes