Skip to content

TileMapLayer memory leak when using Bucket Tool #107853

@Silvanuz

Description

@Silvanuz

Tested versions

Reproducible in v4.4.1.stable.official

System information

Godot v4.4.1.stable - Windows 11 (build 26100) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4060 (NVIDIA; 32.0.15.7283) - AMD Ryzen 5 7600X 6-Core Processor (12 threads)

Issue description

When working with the Engine for a few hours without closing it, I noticed an huge RAM usage:

Image

I noticed that the more I work on my levels with tilesets, the higher the RAM usage becomes.
So I found out that if you edit a tileset frequently with the bucket tool, the RAM keeps increasing but no longer decreases.

With terrain:
https://github.com/user-attachments/assets/14d84fe9-fbee-422a-973f-0a7d1c6847c4

Single Tile:
https://github.com/user-attachments/assets/236f785d-0b1e-4ee6-877f-dc6adc86214f

Steps to reproduce

  • Create a TileMapLayer with a fresh Tileset
  • Add a physic layer and a terrain set
  • Setup the Terrain Set (Bitmask, Collisions)
  • Draw a block on the tilemap
  • Choose the Bucket tool and click repeatedly on the block

MRP for the exact Setup!

Minimal reproduction project (MRP)

MRP Tilemap memleak.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions