Defold 1.2.173 has been released

Defold 1.2.173

ANR’s

In an effort to drastically reduce the number of ANR’s on Android, we’ve moved the main game thread to a different thread.
This change removes any stalls between the UI thread and the engine thread (e.g. from long running user functions).
Please try it out and let us know how this works for you.

dmSDK

Api

We’ve updated dmSDK with some new functionality regarding sockets and connections. These are the new namespaces.

We have also released new extension-websocket where many of these functions are used.
This extension will replace the defold-websocket as the official websocket implementation.

defoldsdk.zip

We’ve also made the defoldsdk.zip available on the download page.
This package contains all the prebuilt libraries for each platform, as well as headers.

Switch

  • We’ve added support for LuaJIT (the interpreter, not jit)
  • We’ve added hot reload support
  • Fixed support for https requests
  • Better error logging for remote builds

Engine

  • Issue-5116 - Added: Add defoldsdk.zip to releases
  • Issue-5124 - Added: Added dmCrypt to dmSDK
  • Issue-5126 - Added: Added dmURI to dmSDK
  • Issue-5128 - Added: Added dmSocket, dmSSLSocket, dmDNS, dmConnectionPool to dmSdk
  • Issue-4835 - Added: Added dmThread to dmSdk
  • Issue-4901 - Fixed: Fixed issue of uploading font vertex buffer multiple times
  • Issue-4930 - Fixed: Unify Android build pipeline
  • Issue-5038 - Fixed: Move engine to a new thread (Android)
  • Issue-5046 - Fixed: Enable error logging for bob.jar when doing remote builds
  • Issue-5080 - Fixed: Sound didn’t pause when app was mimimized
  • Issue-5101 - Fixed: Fixed Windows code signing for the editor
  • Issue-5129 - Fixed: Liveupdate zip publisher can now copy result to a different file store
  • Issue-5190 - Fixed: Headless builds on Linux now won’t requires OpenAL/OpenGL
  • Issue-5188 - Fixed: Live update zip publishing path is now relative to project dir
20 Likes


Info about creation of Keystore file.

4 Likes

:star_struck::+1:

2 Likes

Also in the Android manual: https://defold.com/manuals/android/#creating-a-keystore

5 Likes

Almost all the times I launch the project from the editor (CMD + B) while the game is already running, I get the message “connection refused” and I have to manually shut down the game. This is quite annoying. This issue started with the 1.2.173, I have seen it only very rarely in the previous versions.

Moreover each time I launch the game it takes about 5 seconds to start showing only the first of the following lines in the console:

INFO:DLIB: Log server started on port 50580
WARNING:DLIB: No IP found for local hostname iMac-di-Rocco.local. Fallbacks to localhost
INFO:ENGINE: Target listening with name: iMac-di-Rocco.local - ::1 - Darwin
INFO:ENGINE: Engine service started on port 50581
INFO:ENGINE: Defold Engine 1.2.173 (fe2b689)

This issue has already happened in previous versions of the build in the past.

Is there something I can do to mitigate these two problems?

Thanks!

Ciao, Rocco.

1 Like

Not exactly sure that is going on or how to fix it. Looking at your log, it mentions an Ipv6 address ("::1"). I’m used to seeing an ipv4 address there. Perhaps that’s a hint you can investigate with your setup?

1 Like

Thanks @Mathias_Westerdahl How can I investigate? What is “my setup”? My apologizes for the basic questions…

By setup, I mean what configurations you have with your network interfaces. You can for instance run ifconfig in a Terminal window to see these. Here’s the two relevant for my setup:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
	inet 127.0.0.1 netmask 0xff000000 
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
	nd6 options=201<PERFORMNUD,DAD>

en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	options=400<CHANNEL_IO>
	ether 3c:22:fb:3e:34:da 
	inet6 fe80::867:9bd3:8ba5:ffc8%en1 prefixlen 64 secured scopeid 0x9 
	inet 192.168.10.210 netmask 0xffffff00 broadcast 192.168.10.255
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect
	status: active

The 192.168.10.210 is my (local) Ipv4 address that the engine/editor uses when communicating. Your device may be named “en0” (en for “EtherNet”).

Also you see that ::1 is the Ipv6 equivalent of “localhost”.

1 Like

I didn’t see this, but it further supports my theory that there is something different in your network settings from our usual setup.

1 Like

Thanks @Mathias_Westerdahl.

This is (a part of) what I see with ifconfig:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
     options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
     inet 127.0.0.1 netmask 0xff000000 
     inet6 ::1 prefixlen 128 
     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
     nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
     stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
     options=50b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV,CHANNEL_IO>
     ether 78:7b:8a:d9:e4:f9 
     inet6 fe80::50:2f9b:f642:eedd%en0 prefixlen 64 secured scopeid 0x4 
     inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255
     nd6 options=201<PERFORMNUD,DAD>
     media: autoselect (1000baseT <full-duplex,energy-efficient-ethernet>)
     status: active
en1: flags=8823<UP,BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
     options=400<CHANNEL_IO>
     ether 14:20:5e:03:a5:82 
     nd6 options=201<PERFORMNUD,DAD>
     media: autoselect (<unknown type>)
     status: inactive
 en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
     options=460<TSO4,TSO6,CHANNEL_IO>
     ether 82:d1:15:47:a8:00 
     media: autoselect <full-duplex>
     status: inactive
en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
     options=460<TSO4,TSO6,CHANNEL_IO>
     ether 82:d1:15:47:a8:01 
     media: autoselect <full-duplex>
     status: inactive

Is this fine? wrong? there is something I have to change?

I have never touched such things on my Mac, nor on some other computer to be honest.

Many, many thanks!

I think that looks ok.

Digging into the error message, it comes from the engine, trying to figure out the ip of the host machine.
It uses gethostbyname, which in your case will get info from your /etc/hostsfile.

Here’s what mine looks like:

~/work/defold $ cat /etc/hosts                                                                                            [dev] 14:54:18
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost
1 Like

I remember getting that 5s delay when I was at a hotel with only ipv6 wifi, really odd. Workaround for me was to disable wifi, obviously inconvenient but…

@Mathias_Westerdahl cat /etc/hosts gives identical result for me

@Erik_Angelin wifi is already disabled (and it always was, I use an ethernet cable).

What if you add a 127.0.0.1 entry for iMac-di-Rocco.local?

1 Like

thanks @Erik_Angelin!!!

But how I do that? as you may guess I am a really noob with these system configurations…

If you add a new row “127.0.0.1 iMac-di-Rocco.local” in /etc/hosts

Another diagnostic would be interesting to see is if you run this in your terminal:

python -c 'import socket;print socket.gethostbyname("iMac-di-Rocco.local")'

and

python -c 'import socket;print socket.getaddrinfo("iMac-di-Rocco.local","http")'
2 Likes

I have added the line as you suggested. Now /etc/hosts is:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	    localhost
255.255.255.255	broadcasthost
::1             localhost


127.0.0.1	    iMac-di-Rocco.local

But the two issues are still there. Moreover I have tried the two commands suggested by Matthias. Here the output from gethostbyname

   127.0.0.1

and this is from getaddrinfo

[(2, 2, 17, '', ('127.0.0.1', 80)), (2, 1, 6, '', ('127.0.0.1', 80))]

Ok, in my case it returns “192.168.10.210” from those python commands.
I’d start looking into that then, to see why you don’t get your local IP as expected.

1 Like

Some time ago this command from the terminal helped me solve a similar issue.

sudo hostname localhost
2 Likes