Closed me2beats closed 2 years ago
Godot 4 also has this problem
Check project run on Godot Physics 3.3.3 - 3.4.2. GridMapIssue.zip
Acknowledged. Tested it on versions 3.3.3 - 3.4.2. Windows x64. Here's what memory leak looks like during sample events in game with world generation. Doesn't help clear() -> queue_free() of GridMap, and scene change either. The memory stays clogged. Checked my project on different conditions, least leaks in 8x8 chunk and Octant 8. But throughout they appear. unfortunately the size of such a small chunk is not much of any game will fit. Less leaks on BULLET, but the speed of 12-20ms in 32x32 in 1 frame will not allow to use it. The higher the chunk size, the more memory leakage. The nature of leaks at chunks higher than 8x8 is always the same - the next chunk and memory addition size between chunks is always about 2-2.5 times larger than the previous one.
Very unpleasant bug!
Already fixed in 3.x by #57561. (Notice the similarity with #57555)
Not absolutely sure if the fix was in by 3.4.3 RC 1 but should be in next 3.4.3, and next 3.5 beta.
There's some slight juggling of static memory still now but the major leak from BVH is gone. The fix is pending in 4.0 as part of #57630.
Already fixed in 3.x by #57561. (Notice the similarity with #57555)
Not absolutely sure if the fix was in by 3.4.3 RC 1 but should be in next 3.4.3, and next 3.5 beta.
There's some slight juggling of static memory still now but the major leak from BVH is gone. The fix is pending in 4.0 as part of #57630.
Checked on 3.4.3 RC1 - still same
Yeah I just checked, the fix must have just missed that release, it was only merged day before I think or so. Will be in the next one. :+1:
You can try the artifact build (green arrow) from the PR if you want to test.
Godot version
3.4.2
System information
Windows, Linux
Issue description
static memory grows unexpectedly when setting gridmap cell to -1 (which means removing the cell)
Steps to reproduce
func _physics_process(delta): set_cell_item(0,0,0,0) set_cell_item(0,0,0,-1)