Defold on macOS won't launch

Greetings!

I’m trying to run Defold on a brand new Macbook Pro, but it is unable to launch. The icon just bounces at the bottom of the screen for about 2 minutes before giving up. After which, if I right click the icon, it says the application isn’t responding and I have to force close. I see there was a previous similar issue that was resolved with restoring their system fonts. I’ve tried this, but it didn’t resolve the issue. Please help! I’d really like to get starting learning how to create with this engine.

I’ve also tried running from the terminal, here is the output:
brandons-mbp:~ brandonshea$ /Applications/Defold.app/Contents/MacOS/Defold ; exit;

INFO:TOOLS: Launcher version 8def4b50c9aa049670e698d7dff3dc00d77e42d5

DEBUG:TOOLS: arg 0: /Applications/Defold.app/Contents/Resources/packages/jre/bin/java

DEBUG:TOOLS: arg 1: -cp

DEBUG:TOOLS: arg 2: /Applications/Defold.app/Contents/Resources/packages/defold-e064eb3537e95db69e4882fd990b46c41d3d25c2.jar

DEBUG:TOOLS: arg 3: -Xdock:icon=/Applications/Defold.app/Contents/Resources/logo.icns

DEBUG:TOOLS: arg 4: -Xdock:name=Defold

DEBUG:TOOLS: arg 5: -Djna.nosys=true

DEBUG:TOOLS: arg 6: -Ddefold.launcherpath=/Applications/Defold.app/Contents/MacOS/Defold

DEBUG:TOOLS: arg 7: -Ddefold.resourcespath=/Applications/Defold.app/Contents/Resources

DEBUG:TOOLS: arg 8: -Ddefold.version=1.2.144

DEBUG:TOOLS: arg 9: -Ddefold.editor.sha1=e064eb3537e95db69e4882fd990b46c41d3d25c2

DEBUG:TOOLS: arg 10: -Ddefold.engine.sha1=8def4b50c9aa049670e698d7dff3dc00d77e42d5

DEBUG:TOOLS: arg 11: -Ddefold.buildtime=2019-01-10T10:41:43.402686

DEBUG:TOOLS: arg 12: -Ddefold.channel=editor-alpha

DEBUG:TOOLS: arg 13: -Djava.ext.dirs=/Applications/Defold.app/Contents/Resources/packages/jre/lib/ext

DEBUG:TOOLS: arg 14: -Djava.net.preferIPv4Stack=true

DEBUG:TOOLS: arg 15: -Dsun.net.client.defaultConnectTimeout=30000

DEBUG:TOOLS: arg 16: -Dsun.net.client.defaultReadTimeout=30000

DEBUG:TOOLS: arg 17: -Djogl.texture.notexrect=true

DEBUG:TOOLS: arg 18: -Dglass.accessible.force=false

DEBUG:TOOLS: arg 19: com.defold.editor.Start

DEBUG:TOOLS: arg 20: (null)

New development; I had my Macbook closed while plugged into an external monitor when I was unable to open Defold. It appears now that I’ve disconnected, I’m able to open Defold while in regular laptop mode. This seems like an odd behavior. I’ll attempt again once I can sneak back into my office, gotta get my son to sleep!

1 Like

Tested again with external monitor. It opened fine when I hooked up to the monitor without restarting. However, once I restarted while connected, it replicated the same behavior of not being able to open as I described before.

1 Like

Hmm, I don’t recognise this behavior and most of us in the team are using Mac and dual screens. @mats.gisselson, any ideas?

Not much to go on here, really. Do you get anything interesting if you run the Java command directly from the Terminal?

/Applications/Defold.app/Contents/Resources/packages/jre/bin/java -cp /Applications/Defold.app/Contents/Resources/packages/defold-e064eb3537e95db69e4882fd990b46c41d3d25c2.jar -Djna.nosys=true -Ddefold.launcherpath=/Applications/Defold.app/Contents/MacOS/Defold -Ddefold.resourcespath=/Applications/Defold.app/Contents/Resources -Djava.ext.dirs=/Applications/Defold.app/Contents/Resources/packages/jre/lib/ext -Djava.net.preferIPv4Stack=true -Dsun.net.client.defaultConnectTimeout=30000 -Dsun.net.client.defaultReadTimeout=30000 -Djogl.texture.notexrect=true -Dglass.accessible.force=false com.defold.editor.Start

Thanks for further responding.

I’ve run the command directly in the terminal, as seen below, but it just hangs.

16%20PM

Very strange. Never seen anything like this. Could be an unfortunate hardware incompatibility issue, I guess.

One thing to try might be to disable the discrete GPU if you have one and see if that makes a difference. Or possibly trying a different screen or using different type of connection.

If you’re running Mojave, you could try to add Defold to the list under System Preferences > Security & Privacy > Accessibility. Seems to solve some issues people are having with crashes. See here for more info.

One thing I’ve noticed on a fresh install (just formatted my Macbook and installed Mojave):

When focusing out of the “loading dependencies” window, Defold crashes. Sometimes the crash message doesn’t appear. If you keep the focus on it, it runs normally.

2 Likes

I’ve attached two crash reports here: https://gist.github.com/endel/2e394bb3262d70621d5dd8384e0ca864

1 Like

@endel
This looks like the known issue with Mojave, more info and workaround here: Defold Editor and Mac OS Mojave

2 Likes

I’ll give this a try later. I can also turn off the automatic switching on/off of the gpu that macOS Mojave does.

I’m hooking into my monitors and other hardware from a relatively new Targus USB-C hub with HDMI ports. It using some Displaylink software. Think that would have any influence?

Yes! It seems some users are having trouble running Java-based applications when using DisplayLink: https://displaylink.org/forum/showthread.php?t=66393

The Defold editor is a Java application and the description of the issue seem to match your own experience. One user reports getting it to work if they keep the lid of their MacBook open. Might be worth a try. Hopefully an updated DisplayLink will be released that solves the issue.

2 Likes

I’ll keep an eye out for Displaylink to release a fix. Thanks for looking into this!