Defold 1.6.3 has been released

Defold 1.6.3

Summary

  • NEW: (#8225) Detect renderable float and half float texture formats on OpenGL ES 2.0 / WebGL 1.0 devices
  • NEW: (#8227) Exclude headless dmengine from bob.jar
  • NEW: (#8267) Fix small memory leak in json.decode()
  • NEW: (#8289) Print generic error when OpenGL shader compilation or program linking fails
  • NEW: (#8270) Improve memory usage in large projects
  • FIX: (#8247) Wrap glfw calls in dmPlatform library
  • FIX: (#8244) Add support for luminance_alpha in image.load
  • FIX: (#8242) Use the WebGL 1.0 specific constant for the half float format.
  • FIX: (#8260) Set HTML5 AudioContext sample rate to 44100
  • FIX: (#8295) Fix rare multipage atlas issue with compressed textures (HTML5).
  • FIX: (#8299) Fixed triggers and back button for controllers on macOS
  • FIX: (#8283) Fix “Optimization pass failed” issue
  • FIX: (#8283) Fix issue when usage of semicolons in Lua may break compilation.
  • FIX: (#8345) Model multi material doesn’t respect the sampler names

Engine

NEW: (#8225) Detect renderable float and half float texture formats on OpenGL ES 2.0 / WebGL 1.0 devices
Adds the ability to render to 16-bit and 32-bit floating-point color buffers on OpenGL ES 2.0 and WebGL 1.0 if the device supports them. The support depends on the extensions EXT_color_buffer_half_float and WEBGL_color_buffer_float.

Closes Webgl 1 support for float render targets · Issue #8172 · defold/defold · GitHub

NEW: (#8227) Exclude headless dmengine from bob.jar
Now “vanilla” dmengine_headless (headless dmengine binary without native extensions) will be downloaded from the server if needed. It’s rarely used, but was shipped with each bob.jar for all the platforms.

NEW: (#8267) Fix small memory leak in json.decode()
Each json.decode() call allocates 1kb of memory, which should be freed after.

NEW: (#8289) Print generic error when OpenGL shader compilation or program linking fails
Adds generic error message when OpenGL shader compilation or program linking fails. Previously, the shader error message was only printed if the GPU driver provided it. Depending on the implementation, the driver may not do this and so the developer would not get any message and could not understand why the game crashed.
Also for OpenGL program linking the warning is replaced by an error, because after this failure the game cannot continue to work.

Closes #8287

FIX: (#8247) Wrap glfw calls in dmPlatform library
We have added a new engine platform library, which is the first step into upgrading and simplifying our GLFW library.

Migration plan:

  • fix console to support the new changes
  • remove building glfw in the engine
  • migrate desktop platforms to use vanilla glfw3
  • move our web and mobile code from glfw into their own implementations within the engine
  • remove the custom glfw 2.7 implementation from the engine

FIX: (#8244) Add support for luminance_alpha in image.load
Moved internal dmImage functionality into the dmsdk for loading images from binary data. The API looks like this:

namespace dmImage
{
  Result Load(const void* buffer, uint32_t buffer_size, bool premult, HImage image);
  void Free(HImage image);
  Type GetType(HImage image);
  uint32_t GetWidth(HImage image);
  uint32_t GetHeight(HImage image);
  const void* GetData(HImage image);
}

NOTE: that this also changes the API for the script image.load function since we now will return image.TYPE_LUMINANCE_ALPHA for PNGs with both grayscale and alpha channels. This is considered a bugfix so please be aware of this if you are using that function!

FIX: (#8242) Use the WebGL 1.0 specific constant for the half float format.
WebGL 1.0 supports loading half float textures. But it requires the use of HALF_FLOAT_OES constant, which has a different value from the HALF_FLOAT constant from WebGL 2.0 / OpenGL ES 3.0. This fix enables to use half float texture format on WebGL 1.0 devices.

FIX: (#8260) Set HTML5 AudioContext sample rate to 44100
HTML5 AudioContext sample rate wasn’t specified and varied depending on the output device and it could be default 44100, or it could be 8000, 16000, 22050, 32000, 48000 etc. If the sample rate of the device was less than the sample rate of your sounds, they would not be played at all. So the AudioContext is now created with sampleRate = 44100.

FIX: (#8295) Fix rare multipage atlas issue with compressed textures (HTML5).
Some old devices don’t work with multipage atlases if texture transcoded to ASTC format. For such devices, ASTC will be marked as non-supported format and the next best fits will be used (most of the time it will be ETC2).

FIX: (#8299) Fixed triggers and back button for controllers on macOS
Fixed an issue when triggers and back button on macOS weren’t caught by the gamepads input system.

FIX: (#8299) Fix issue when usage of semicolons in Lua may break compilation
Fixed an issue when our Lua parser removes semicolons which shouldn’t be removed, which breaks Lua compilation.

FIX: (#8345) Fix issue when usage of semicolons in Lua may break compilation
In some cases, a model with multiple textures would get them assigned to incorrect texture units.

Editor

NEW: (#8270) Improve memory usage in large projects

  • Improved memory usage in large projects.
  • We now report resources that fail to build due to an out-of-memory error to the Build Errors tab.

FIX: (#8283) Fix “Optimization pass failed” issue
Make sure pipeline tools use DLLs from jdk/bin folder to prevent Optimization pass failed: error on windows.

Update 2024-01-12:
Fixes for

  • Sprite material batch fix
  • Material texture sampler fix
  • Gui ShowKeyboard fix
  • Sprite missing animation fix

Update 2024-01-15:
Fixes for:

  • Fix for calculating size of sprite vertex buffer data
  • Workaround check if texture set doesn’t have any image name hashes
  • Fix for slice 9 sprites with rotated uvs
  • Fix for building atlasbuilder test main function
  • Fixed erroneous duplication errors on animation groups
25 Likes

I cannot anymore visualize spinemodel nor spinescene in the editor with 1.6.3. I have updated spine-extension to 2.14.0 but invane. Spinemodel and spinescene are rendered as empty while a gameobject with the same spinemodel shows a strange image instead of the spinemodel.

If I build and run the game from the editor everything is fine. So I am safe and I can go on working… :slight_smile:

2 Likes

I also found the issue.
Suppose you have 2 or more sprites with different materials on the scene.
Render picks only material from the first added sprite and renders all sprites with it.

In the editor everything is fine:

But in build:

Minimal project:

custom_sprite_shader_problem.zip (22.9 KB)

p. s. It is probably related to the issue above
p. s. s. If broke the batch for example set constant from code It takes correct material

1 Like

I think this was fixed in our dev branch, @jhonny.goransson ? Should be easy to add to the release tomorrow

2 Likes

Yeah, must be this one: Add material resource to the batch key for sprites by Jhonnyg · Pull Request #8387 · defold/defold · GitHub

I agree that we should cherry pick it into the current release.

I have a crash when click on the input in the dev build for Windows:
How to reproduce open GitHub - britzl/gooey: Defold GUI system in Defold (1.6.3) → Project → Build → click on input

Successfully wrote Crashdump to file: ....\Defold/_crash
ERROR:CRASH: CALL STACK:

ERROR:CRASH:  0 0x7FF716D18260 dmCrash::GenerateCallstack D:\a\defold\defold\engine\crash\src\backtrace_win32.cpp:144

ERROR:CRASH:  1 0x7FF716E0EEBC _seh_filter_exe minkernel\crts\ucrt\src\appcrt\misc\exception_filter.cpp:219

ERROR:CRASH:  2 0x7FF716E538E4 `__scrt_common_main_seh'::`1'::filt$0 D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:304

ERROR:CRASH:  3 0x7FF716D900FC __C_specific_handler D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\riscchandler.cpp:389

ERROR:CRASH:  4 0x7FFB73C342F0 __chkstk <unknown>:0

ERROR:CRASH:  5 0x7FFB73BAD9D0 RtlFindCharInUnicodeString <unknown>:0

ERROR:CRASH:  6 0x7FFB73C333E0 KiUserExceptionDispatcher <unknown>:0

ERROR:CRASH:  7 0x7FF716C08170 dmHID::ShowKeyboard D:\a\defold\defold\engine\hid\src\native\hid_native.cpp:366

ERROR:CRASH:  8 0x7FF716CF82E0 dmGui::LuaShowKeyboard D:\a\defold\defold\engine\gui\src\gui_script.cpp:3588

ERROR:CRASH:  9 0x7FF71695582E lj_BC_FUNCC <unknown>:0

ERROR:CRASH: 10 0x7FF716B739B0 lua_pcall <unknown>:0

ERROR:CRASH: 11 0x7FF716B459C0 dmScript::PCallInternal D:\a\defold\defold\engine\script\src\script.cpp:1388

ERROR:CRASH: 12 0x7FF716D0FBE0 dmGui::RunScript D:\a\defold\defold\engine\gui\src\gui.cpp:2071

ERROR:CRASH: 13 0x7FF716D07630 dmGui::DispatchInput D:\a\defold\defold\engine\gui\src\gui.cpp:2330

ERROR:CRASH: 14 0x7FF7169DFEF0 dmGameSystem::CompGuiOnInput D:\a\defold\defold\engine\gamesys\src\gamesys\components\comp_gui.cpp:2389

ERROR:CRASH: 15 0x7FF71698EC60 dmGameObject::DispatchInput D:\a\defold\defold\engine\gameobject\src\gameobject\gameobject.cpp:2861

ERROR:CRASH: 16 0x7FF7169FF900 dmGameSystem::CompCollectionProxyOnInput D:\a\defold\defold\engine\gamesys\src\gamesys\components\comp_collection_proxy.cpp:551

ERROR:CRASH: 17 0x7FF71698EC60 dmGameObject::DispatchInput D:\a\defold\defold\engine\gameobject\src\gameobject\gameobject.cpp:2861

ERROR:CRASH: 18 0x7FF7169766F0 dmEngine::StepFrame D:\a\defold\defold\engine\engine\src\engine.cpp:1594

ERROR:CRASH: 19 0x7FF7169773C0 dmEngineUpdate D:\a\defold\defold\engine\engine\src\engine.cpp:2133

ERROR:CRASH: 20 0x7FF7169775F0 dmEngine::RunLoop D:\a\defold\defold\engine\engine\src\engine_loop.cpp:83

ERROR:CRASH: 21 0x7FF71696FAE0 engine_main D:\a\defold\defold\engine\engine\src\engine_main.cpp:148

ERROR:CRASH: 22 0x7FF716D844F4 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288

ERROR:CRASH: 23 0x7FFB72352560 BaseThreadInitThunk <unknown>:0

ERROR:CRASH: 24 0x7FFB73BEAA30 RtlUserThreadStart <unknown>:0

ERROR:CRASH: Lua Callstack:

ERROR:CRASH:   gooey/internal/input.lua:149: in function input

ERROR:CRASH:   gooey/gooey.lua:171: in function input

ERROR:CRASH:   example/components.gui_script:96: in function fn

ERROR:CRASH:   gooey/gooey.lua:193: in function group

ERROR:CRASH:   example/components.gui_script:67: in function <example/components.gui_script:66>

ERROR:CRASH: 

INFO:CRASH: Successfully wrote Crashdump to file: C:\Users\roma_\AppData\Roaming\Defold/_crash
ERROR:CRASH: CALL STACK:

ERROR:CRASH:  0 0x7FF716C08170 dmHID::ShowKeyboard D:\a\defold\defold\engine\hid\src\native\hid_native.cpp:366

ERROR:CRASH:  1 0x7FF716CF82E0 dmGui::LuaShowKeyboard D:\a\defold\defold\engine\gui\src\gui_script.cpp:3588

ERROR:CRASH:  2 0x7FF71695582E lj_BC_FUNCC <unknown>:0

ERROR:CRASH:  3 0x7FF716B739B0 lua_pcall <unknown>:0

ERROR:CRASH:  4 0x7FF716B459C0 dmScript::PCallInternal D:\a\defold\defold\engine\script\src\script.cpp:1388

ERROR:CRASH:  5 0x7FF716D0FBE0 dmGui::RunScript D:\a\defold\defold\engine\gui\src\gui.cpp:2071

ERROR:CRASH:  6 0x7FF716D07630 dmGui::DispatchInput D:\a\defold\defold\engine\gui\src\gui.cpp:2330

ERROR:CRASH:  7 0x7FF7169DFEF0 dmGameSystem::CompGuiOnInput D:\a\defold\defold\engine\gamesys\src\gamesys\components\comp_gui.cpp:2389

ERROR:CRASH:  8 0x7FF71698EC60 dmGameObject::DispatchInput D:\a\defold\defold\engine\gameobject\src\gameobject\gameobject.cpp:2861

ERROR:CRASH:  9 0x7FF7169FF900 dmGameSystem::CompCollectionProxyOnInput D:\a\defold\defold\engine\gamesys\src\gamesys\components\comp_collection_proxy.cpp:551

ERROR:CRASH: 10 0x7FF71698EC60 dmGameObject::DispatchInput D:\a\defold\defold\engine\gameobject\src\gameobject\gameobject.cpp:2861

ERROR:CRASH: 11 0x7FF7169766F0 dmEngine::StepFrame D:\a\defold\defold\engine\engine\src\engine.cpp:1594

ERROR:CRASH: 12 0x7FF7169773C0 dmEngineUpdate D:\a\defold\defold\engine\engine\src\engine.cpp:2133

ERROR:CRASH: 13 0x7FF7169775F0 dmEngine::RunLoop D:\a\defold\defold\engine\engine\src\engine_loop.cpp:83

ERROR:CRASH: 14 0x7FF71696FAE0 engine_main D:\a\defold\defold\engine\engine\src\engine_main.cpp:148

ERROR:CRASH: 15 0x7FF716D844F4 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288

ERROR:CRASH: 16 0x7FFB72352560 BaseThreadInitThunk <unknown>:0

ERROR:CRASH: 17 0x7FFB73BEAA30 RtlUserThreadStart <unknown>:0

ERROR:CRASH: Lua Callstack:

ERROR:CRASH:   gooey/internal/input.lua:149: in function input

ERROR:CRASH:   gooey/gooey.lua:171: in function input

ERROR:CRASH:   example/components.gui_script:96: in function fn

ERROR:CRASH:   gooey/gooey.lua:193: in function group

ERROR:CRASH:   example/components.gui_script:67: in function <example/components.gui_script:66>

ERROR:CRASH: 

INFO:CRASH: Successfully wrote MiniDump to file: ....Defold/_crash.dmp```
1 Like

Just tested and gui.show_keyboard() instantly crashes on Linux too:
_crash.txt (50.0 KB)

2 Likes

Same happens to me with a Mac dev build using a Druid input component

2 Likes

I also tried out the Dirty Larry GUI components. Same things seems to happen on text input components.

In 1.6.3 I get black color instead of texture when applied to a model component when bundled for HTML5 or Android. Simple material with one texture sampler named tex0. Works on macOS.

1 Like

Do you have any errors or a repro available? :lying_face:

No errors, I’ll prepare the repro project.

1 Like

Here, you should see the defold logo but on HTML5 you get black texture. I found that this particular setup depends on some already generated data from 1.6.2 and clearing the build dir might fix the issue, not sure.
TextureSamplerBug.zip (3.0 MB)

I’ll prepare another repro project with a harder case.

4 Likes

Thanks!
Yeah, I can’t see the image on macOS either. I’m looking into it now.

1 Like

Here is another test project, not sure what’s different but this one is consistent. You should see an image of a key.

TextureSamplerBug2.zip (34.8 KB)

Thanks!
My current guess it’s discrepancy between bob/editor builds.

1 Like

We have now released an update to the 1.6.3 release, with engine version 963e04e63dce23994171b37d60867295e19c2a3a

If contains fixes for all the reported issues:

  • Sprite material batch fix
  • Material texture sampler fix
  • Gui ShowKeyboard fix
  • Sprite missing animation fix

Hopefully this version works as expected.
Sorry for the inconvenience!

14 Likes

Unfortunately it does not work for me… same issue with spine as the previous version…

Yeah, i haven fixed that issue yet.

1 Like