Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object count skyrockets using TileMap runtime updates. #88166

Closed
DuneTruffle opened this issue Feb 10, 2024 · 3 comments · Fixed by #88629
Closed

Object count skyrockets using TileMap runtime updates. #88166

DuneTruffle opened this issue Feb 10, 2024 · 3 comments · Fixed by #88629

Comments

@DuneTruffle
Copy link

Tested versions

produced in v4.2.1.stable.mono.official [b09f793]

System information

windows 11 - v4.2.1.stable.mono.official [b09f793]

Issue description

object count and memory consumption sky rockets when hiding and showing the tilemap after the scene is run

Steps to reproduce

  1. open project
  2. run scene
  3. hide and show the Tilemap in the editor while the scene is running
  4. observe object count skyrocketing

Minimal reproduction project (MRP)

minimum reproduce.zip

@fire fire changed the title object count skyrockets using TileMap runtime updates. Object count skyrockets using TileMap runtime updates. Feb 10, 2024
@lavish123409
Copy link

I am trying to reproduce the issue on my machine.
image

I do not know where to see the object count in it. Like the object inside tilemap is constant (i.e., Settlement Camera) in the Remote area, so I am confused where to look for it.

@Zireael07
Copy link
Contributor

The object count is in the debugger tab

@kleonc
Copy link
Member

kleonc commented Feb 10, 2024

@DuneTruffle From the bug_report template:

  • Note for C# users: If your issue is not C#-specific, please upload a minimal reproduction project written in GDScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a .NET setup available.

Here's a simplified GDScript version of the script from the MRP:

extends TileMap

func _ready() -> void:
	var mapDimensions: int = 16
	for y in mapDimensions:
		for x in mapDimensions:
			set_cell(0, Vector2i(x, y), 0, Vector2i(0, 0))

func _use_tile_data_runtime_update(layer, coords):
	return true

func _tile_data_runtime_update(layer, coords, tile_data):
	pass

The issue still happens:
dev x86_64_QKx73iiyU0

So using C# is unrelated in this case.

Same in a release-export:
qpnmnCbIyo

func _process(delta):
	%Label.text = "%d" % [Performance.get_monitor(Performance.OBJECT_COUNT)]

func _on_button_pressed():
	visible = !visible

So not an editor issue.

Can reproduce since v4.2.dev5.official [e3e2528] (doesn't happen in 4.0.x, 4.1.x).
So likely a regression from #81070. cc @groud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release Blocker
Development

Successfully merging a pull request may close this issue.

7 participants