# Defold 1.6.4 Beta

**URL:** <https://forum.defold.com/t/defold-1-6-4-beta/75834>\
**Category:** Release notes\
**Created:** [January 29, 2024, 2:55pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834 "2024-01-29T14:55:24Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![jhonny.goransson](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/jhonny.goransson/32/3864_2.png) [@jhonny.goransson](https://forum.defold.com/u/jhonny.goransson)\
**Post date:** [February 8, 2024, 9:06am UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/41 "2024-02-08T09:06:22Z")

</div>

I haven’t taken a look yet, I’ll try to do it today 👍

EDIT: I think I’ve found the issue, a fix is on the way

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 8, 2024, 3:22pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/42 "2024-02-08T15:22:37Z")

</div>

We’ve pushed two fixes to the beta, and will be available for testing within an hour:

- a fix for the sprite flip issue when using trimmed sprite images
- a reference count issue when using the buffer type

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [February 9, 2024, 4:00pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/43 "2024-02-09T16:00:14Z")

</div>

> [@einar](#):
>
> Just to be sure: Isn’t this something that the engine should take care of?

Yes, this is a bug. We will fix that.

---

<div class="post-metadata">

**Author:** ![einar](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/einar/32/31951_2.png) [@einar](https://forum.defold.com/u/einar)\
**Post date:** [February 9, 2024, 7:13pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/44 "2024-02-09T19:13:51Z")

</div>

Great, thanks!

---

<div class="post-metadata">

**Author:** ![d954mas](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/d954mas/32/5401_2.png) [@d954mas](https://forum.defold.com/u/d954mas)\
**Post date:** [February 10, 2024, 8:29am UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/45 "2024-02-10T08:29:10Z")

</div>

Some of leaks fixed.  
This is fixed.

```lua
mesh.buffer_res = resource.create_buffer("/def-mesh/buffers/buffer" .. RES_BUFFER_IDX .. ".bufferc", { buffer = buf, transfer_ownership = true })

```

This not. No transfer\_ownership?  
Creation

```lua
	local name = "/runtime_buffer_water_" .. M.water.idx .. ".bufferc"
	local new_buffer = resource.create_buffer(name, { buffer = water_create_default_native_buffer() })

```

later when change buffer

```lua
	resource.set_buffer(e.water_buffer.buffer, buffer, { transfer_ownership = true })

```

But now sometimes i see leaked, sometime not.  
When i change location(delete old water, create new water)

i see leaked. But every time it different. Sometimes i not see any leaks. Sometimes part of buffer leaks.

```lua
ERROR:RESOURCE: Leaked resources:
ERROR:RESOURCE: Resource: /runtime_buffer_water_5.bufferc ref count: 1
ERROR:RESOURCE: Resource: /runtime_buffer_water_1.bufferc ref count: 1
ERROR:RESOURCE: Resource: /runtime_buffer_water_2.bufferc ref count: 1
ERROR:RESOURCE: Resource: /runtime_buffer_water_3.bufferc ref count: 2
ERROR:RESOURCE: Resource: /runtime_buffer_water_4.bufferc ref count: 1

```

```lua
ERROR:RESOURCE: Leaked resources:
ERROR:RESOURCE: Resource: /runtime_buffer_water_5.bufferc ref count: 2
ERROR:RESOURCE: Resource: /runtime_buffer_water_4.bufferc ref count: 2

```

> **[2024-02-10 11-17-19.mp4](https://drive.google.com/file/d/1cvXxfa4-hVnouyRS3Y1mIVyFbtbd2UQx/view?usp=drive_link)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![jhonny.goransson](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/jhonny.goransson/32/3864_2.png) [@jhonny.goransson](https://forum.defold.com/u/jhonny.goransson)\
**Post date:** [February 10, 2024, 11:22am UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/46 "2024-02-10T11:22:30Z")

</div>

Do I need to do something specific to make the game create all of these? I just ran the project and closed it, and the two leaks originally posted were fixed. So I think I need more information on how to repro this. Or a smaller repro

---

<div class="post-metadata">

**Author:** ![d954mas](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/d954mas/32/5401_2.png) [@d954mas](https://forum.defold.com/u/d954mas)\
**Post date:** [February 10, 2024, 11:45am UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/47 "2024-02-10T11:45:52Z")

</div>

1.This happened when i change location.  
Look at video link.  
1)Open game  
2)Run in green rect. Stop.  
3)Choose battle  
4)Run back to lose  
5)Return to hub location.  
6)Close game

2.Add new code. So now it happened when you close game.  
game\_world.lua. Look at commit “add test to fix leaked”

```lua
--create 5 waters
	local waters_test = {}
	local FACTORY_URL = msg.url("game_scene:/factory#water")

	local PARTS = {
		ROOT = COMMON.HASHES.hash("/root"),
		MESH = COMMON.HASHES.hash("/mesh"),
	}

	local function water_create_default_native_buffer()
		return buffer.create(1, {
			{ name = hash("position"), type = buffer.VALUE_TYPE_FLOAT32, count = 3 },
			{ name = hash("normal"), type = buffer.VALUE_TYPE_FLOAT32, count = 3 },
			{ name = hash("texcoord0"), type = buffer.VALUE_TYPE_FLOAT32, count = 2 },
		})
	end

	for i = 1, 5 do
		local e = { }
		local collection = collectionfactory.create(FACTORY_URL, vmath.vector3(1))

		local name = "/leaked buffer" .. i .. ".bufferc"
		local new_buffer = resource.create_buffer(name, { buffer = water_create_default_native_buffer() })
		
		e.water_buffer = {
			name = name,
			buffer = new_buffer
		}

		e.water_go = {
			root = msg.url(assert(collection[PARTS.ROOT])),
			mesh = nil
		}
		e.water_go.mesh = COMMON.LUME.url_component_from_url(e.water_go.root, "mesh")
		-- assign cloned buffer to a mesh component
		go.set(e.water_go.mesh, "vertices", e.water_buffer.buffer)
		print("create water buffer", e.water_buffer.name)
		table.insert(waters_test, e)
	end

	for _, w in ipairs(waters_test) do
		print("delete water buffer", w.water_buffer.name)
		assert(w.water_go)
		go.delete(w.water_go.root, true)
		w.water_go = nil
		w.water_buffer = nil
	end
	collectgarbage("collect")
	collectgarbage("collect")
	collectgarbage("collect")

```

```lua
DEBUG:SCRIPT: [INFO 14:45:12] none: world/game/game_world.lua:97: create water buffer	/leaked buffer1.bufferc
DEBUG:SCRIPT: [INFO 14:45:12] none: world/game/game_world.lua:97: create water buffer	/leaked buffer2.bufferc
DEBUG:SCRIPT: [INFO 14:45:12] none: world/game/game_world.lua:97: create water buffer	/leaked buffer3.bufferc
DEBUG:SCRIPT: [INFO 14:45:12] none: world/game/game_world.lua:97: create water buffer	/leaked buffer4.bufferc
DEBUG:SCRIPT: [INFO 14:45:12] none: world/game/game_world.lua:97: create water buffer	/leaked buffer5.bufferc
DEBUG:SCRIPT: [INFO 14:45:12] none: world/game/game_world.lua:102: delete water buffer	/leaked buffer1.bufferc
DEBUG:SCRIPT: [INFO 14:45:12] none: world/game/game_world.lua:102: delete water buffer	/leaked buffer2.bufferc
DEBUG:SCRIPT: [INFO 14:45:12] none: world/game/game_world.lua:102: delete water buffer	/leaked buffer3.bufferc
DEBUG:SCRIPT: [INFO 14:45:12] none: world/game/game_world.lua:102: delete water buffer	/leaked buffer4.bufferc
DEBUG:SCRIPT: [INFO 14:45:12] none: world/game/game_world.lua:102: delete water buffer	/leaked buffer5.bufferc
DEBUG:SCRIPT: [INFO 14:45:12] GameSceneController: scenes/game/game_scene_controller.script:15: total level load:0.42450660000031
DEBUG:SCRIPT: [INFO 14:45:12] ContextManager: libs/contexts_manager.lua:86: Context register:GAME_GUI
DEBUG:SCRIPT: [INFO 14:45:12] ContextManager: libs/contexts_manager.lua:86: Context register:GAME_WORLD_GUI
DEBUG:SCRIPT: [INFO 14:45:12] Render: render/my.render_script:149: screen size changed. from w:1200 h:675 to w:1440 h:810
DEBUG:SCRIPT: [INFO 14:45:12] none: world/game/ecs/systems/draw_interact_aabb_system.lua:53: ZONE
DEBUG:SCRIPT: [INFO 14:45:12] SCENE: libs/sm/scene.lua:95: GameScene show
DEBUG:SCRIPT: [INFO 14:45:12] SCENE: libs/sm/scene.lua:115: GameScene resumed
DEBUG:SCRIPT: [INFO 14:45:13] ContextManager: libs/contexts_manager.lua:99: Context unregister:MAIN
DEBUG:SCRIPT: [INFO 14:45:13] ContextManager: libs/contexts_manager.lua:99: Context unregister:TOP_PANEL
DEBUG:SCRIPT: [INFO 14:45:13] ContextManager: libs/contexts_manager.lua:99: Context unregister:GAME
DEBUG:SCRIPT: [INFO 14:45:13] none: def-mesh/texture.lua:97: free texture:[/__anim_bones_Character.002_2.texturec]
DEBUG:SCRIPT: [INFO 14:45:13] ContextManager: libs/contexts_manager.lua:99: Context unregister:GAME_GUI
DEBUG:SCRIPT: [INFO 14:45:13] ContextManager: libs/contexts_manager.lua:99: Context unregister:GAME_WORLD_GUI
DEBUG:SCRIPT: [INFO 14:45:13] ContextManager: libs/contexts_manager.lua:99: Context unregister:LIVEUPDATE_COLLECTION
ERROR:RESOURCE: Leaked resources:
ERROR:RESOURCE: Resource: /leaked buffer5.bufferc ref count: 1
ERROR:RESOURCE: Resource: /leaked buffer4.bufferc ref count: 1
ERROR:RESOURCE: Resource: /leaked buffer3.bufferc ref count: 1
ERROR:RESOURCE: Resource: /leaked buffer2.bufferc ref count: 1
ERROR:RESOURCE: Resource: /leaked buffer1.bufferc ref count: 1
INFO:DLIB: SSDP: Done on address 192.168.0.102
INFO:DLIB: SSDP: Done on address 192.168.56.1

```

---

<div class="post-metadata">

**Author:** ![jhonny.goransson](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/jhonny.goransson/32/3864_2.png) [@jhonny.goransson](https://forum.defold.com/u/jhonny.goransson)\
**Post date:** [February 12, 2024, 11:08am UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/48 "2024-02-12T11:08:21Z")

</div>

Got a fix for this, a new beta is building

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [February 12, 2024, 11:23am UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/49 "2024-02-12T11:23:17Z")

</div>

> [@einar](#):
>
> Great, thanks!

The bug has been fixed; it is now building.

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [February 12, 2024, 1:06pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/50 "2024-02-12T13:06:48Z")

</div>

Updated beta is available now

---

<div class="post-metadata">

**Author:** ![einar](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/einar/32/31951_2.png) [@einar](https://forum.defold.com/u/einar)\
**Post date:** [February 12, 2024, 1:30pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/51 "2024-02-12T13:30:49Z")

</div>

I have tested it now and the new dimensions match correctly. I noticed two things:

1. It doesn’t work properly when Allow Dynamic Transforms is set to true in game.project. When that flag is true, changing the diameter of a sphere doesn’t do anything. Resizing a box works but it resets to pos=(0,0,0) even if another position is set in the editor. Maybe it is not supposed to work with that setting on and in that case you can disregard this.
2. I get a crash:  
`Assertion failed: area > 1.192092896e-07F, file ..\src\box2d\Box2D\Collision\Shapes\b2PolygonShape.cpp, line 361` when exiting the application after setting the width or height to zero. I guess this is not a problem since setting the dimensions to zero doesn’t make much sense.

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [February 12, 2024, 1:48pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/52 "2024-02-12T13:48:46Z")

</div>

> [@einar](#):
>
> It doesn’t work properly when Allow Dynamic Transforms is set to true in game.project. When that flag is true, changing the diameter of a sphere doesn’t do anything. Resizing a box works but it resets to pos=(0,0,0) even if another position is set in the editor. Maybe it is not supposed to work with that setting on and in that case you can disregard this.

Yes, I think it’s not comparable with `Allow Dynamic Transforms` option.

> [@einar](#):
>
> I get a crash:  
> `Assertion failed: area > 1.192092896e-07F, file ..\src\box2d\Box2D\Collision\Shapes\b2PolygonShape.cpp, line 361` when exiting the application after setting the width or height to zero. I guess this is not a problem since setting the dimensions to zero doesn’t make much sense.

It’s not critical, because this value isn’t valid. We will add a Lua error for it, but maybe in the next version

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 12, 2024, 2:17pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/53 "2024-02-12T14:17:22Z")

</div>

if @d954mas is happy with the fix, then I think we’ll happy too, and will continue with the stable release?

---

<div class="post-metadata">

**Author:** ![d954mas](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/d954mas/32/5401_2.png) [@d954mas](https://forum.defold.com/u/d954mas)\
**Post date:** [February 12, 2024, 3:35pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/54 "2024-02-12T15:35:35Z")

</div>

I am happy) 😁  
All errors fixed. Worked stable)  
🥳 👍 👍 👍

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 12, 2024, 3:39pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/55 "2024-02-12T15:39:08Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![Visionaire](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/visionaire/32/34415_2.png) [@Visionaire](https://forum.defold.com/u/Visionaire)\
**Post date:** [February 12, 2024, 5:31pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/56 "2024-02-12T17:31:17Z")

</div>

😌 Hello how are you?  
I just resumed my internship with Defold after a while, however I noticed that they started asking me for an update every time I open the editor, is this normal? 🤔

PS. I use KDENeon as OS, I did a hard reset to my pc. 🐧

I apologize in advance if this was not the topic to express my doubts. 😉

 ![Screenshot_20240212_111802](https://forum-defold-uploads.b-cdn.net/original/3X/9/c/9c47df758e5734efb812fbb1d8eb8946d301fe5b.png)  
 ![Screenshot_20240212_111910](https://forum-defold-uploads.b-cdn.net/original/3X/9/f/9f1de2cb6d47d5392e77f6b2e5b1d5c0177b3ca1.png)

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [February 12, 2024, 6:11pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/57 "2024-02-12T18:11:07Z")

</div>

> [@Visionaire](#):
>
> I noticed that they started asking me for an update every time I open the editor, is this normal?

Could you please share an editor log?

> **[Editor Logs - Editor overview](https://defold.com/manuals/editor/#editor-logs)**
>
> The editor allows you to browse and manipulate all files and folders in your game project in an efficient manner. Editing files brings up a suitable editor and shows all relevant information about the file in separate views. | This manual gives an...

Also, which version of Defold are you using?

---

<div class="post-metadata">

**Author:** ![Visionaire](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/visionaire/32/34415_2.png) [@Visionaire](https://forum.defold.com/u/Visionaire)\
**Post date:** [February 12, 2024, 6:18pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/58 "2024-02-12T18:18:38Z")

</div>

Updated to 1.6.4 😲

 ![Screenshot_20240212_121657](https://forum-defold-uploads.b-cdn.net/original/3X/e/1/e15d136fa1eda865a03cdb645c88ba35c54a2ae9.png)

---

<div class="post-metadata">

**Author:** ![Visionaire](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/visionaire/32/34415_2.png) [@Visionaire](https://forum.defold.com/u/Visionaire)\
**Post date:** [February 12, 2024, 6:31pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/59 "2024-02-12T18:31:00Z")

</div>

🧐 Britzl, I read the information you suggest me , thank you for your prompt help.  
P.S. Version 1.6.4 was released a few minutes ago. 🤓

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [February 15, 2024, 2:17pm UTC](https://forum.defold.com/t/defold-1-6-4-beta/75834/60 "2024-02-15T14:17:53Z")

</div>

> [@einar](#):
>
> I have tested it now and the new dimensions match correctly. I noticed two things:
> 
> 1. It doesn’t work properly when Allow Dynamic Transforms is set to true in game.project. When that flag is true, changing the diameter of a sphere doesn’t do anything. Resizing a box works but it resets to pos=(0,0,0) even if another position is set in the editor. Maybe it is not supposed to work with that setting on and in that case you can disregard this.
> 2. I get a crash:  
> `Assertion failed: area > 1.192092896e-07F, file ..\src\box2d\Box2D\Collision\Shapes\b2PolygonShape.cpp, line 361` when exiting the application after setting the width or height to zero. I guess this is not a problem since setting the dimensions to zero doesn’t make much sense.

I think we will fix both in the next version

[Previous page](https://forum.defold.com/t/defold-1-6-4-beta/75834.md?page=2)
