Closed CharlesWilsonBarbosa closed 3 months ago
I was able to reproduce the crash in latest master (https://github.com/godotengine/godot/commit/4ab8fb809396fa38ba929fec97cfcb7193f1c44d), when i type something in the label node godot freezes until the crash, when the crash happens vscode shows the printed error: Failed method: Control::_update_minimum_size. Message queue out of memory. Message queue out of memory. Try increasing 'memory/limits/message_queue/max_size_mb' in project settings.
and a spam of: Object was deleted while awaiting a callback.
, here the backtrace:
Increase message_queue size from 32 to 256 doesn't avoid the errors and the crash, just make the freeze last longer before the crash and give a slight different backtrace
Started looking into this. Having a hard time following the details of what's happening, but it seems to be an interaction between FlowContainer::_resort
setting the TextureRect
's size through fit_child_in_rect
, and TextureRect
handling NOTIFICATION_RESIZED
by calling update_minimum_size
. This leads to calling FlowContainer
's _child_minsize_changed
, queuing another _resort
, leading to an infinite loop. The minimum size of both the TextureRect and FlowContainer alternate between two values on every other loop when using "Fit Width Proportional", maybe a consistent value would break the loop.
This seems like it might be related to https://github.com/godotengine/godot/issues/73071 and https://github.com/godotengine/godot/pull/73396. @KoBeWi, does this look like the same issue AspectRatioContainer
had with TextureRect
? If so, should we just add a similar check for TextureRect
and the expand modes in FlowContainer::_resort
?
Yeah it's the same issue as #73071 Though it looks like it's partially supported, unlike AspectRatioContainer.
We can add similar check to FlowContainer, but I'd check if it's needed in every case.
Tested versions
Reproducible in: v4.2.1stable[b09f793f5]
System information
Godot v4.2.2.stable - Windows 10.0.22631 - Vulkan (Forward+) - integrated Intel(R) UHD Graphics 620 (Intel Corporation; 31.0.101.2125) - Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 Threads)
Issue description
Using a Label in FlowContainer with changed constants will cause a crash in your Godot.
Steps to reproduce
Create new scene
Add FlowContainer and set 'minimum size' to X100, Y0
Add TextureRect and add any image, and set 'fit width proportional'
Add Label (and write something)
Go to 'constants' in FlowContainer editor
Set Hseparation 15 and Vseparation 5
2 ways now:
Wait and it will close (but if it doesn't close, change the FlowContainer or Label again)
Minimal reproduction project (MRP)
N/A