A Label with Autowrap inside an AspectRatioContainer too small to fit it will crash not only a project but the Godot editor itself.
If you're experiencing this issue and it hasn't ben resolved yet, setting the Text Overrun Behavior of the label to anything other than "Trim Nothing" will prevent the crash. This is not a full workaround though, as it forces the label to shrink to it's minimum size when in a container with other controls, which may not be your desired behavior.
Steps to reproduce
Create a new project
Create a new scene with root node of type AspectRatioContainer and set its anchor preset to full rect
Nest a Label node inside the AspectRatioContainer node
Set the Label's Custom Minimum Size to (32,32)
Set the Label's Autowrap Mode to Arbitrary (also occurs on Word and Word (Smart))
Set the Label's 'Text' property to a string long enough such that it overflows the bounds of the container
-Expected Result-
The label expands the bounds of the container to accomidate, similarly to how a label with Autowrap off will expand the container.
-Result-
The Godot editor stops responding and crashes
Setting the Label's Horizontal Alignment or Vertical Alignment to Fill produces the expected behavior, where the aspect ratio is broken and the container is expanded to fit the label
Tested versions
Godot_v4.3-stable_mono_win64
System information
Godot v4.3.stable.mono - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3070 (NVIDIA; 32.0.15.6081) - Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 Threads)
Issue description
A Label with Autowrap inside an AspectRatioContainer too small to fit it will crash not only a project but the Godot editor itself.
If you're experiencing this issue and it hasn't ben resolved yet, setting the Text Overrun Behavior of the label to anything other than "Trim Nothing" will prevent the crash. This is not a full workaround though, as it forces the label to shrink to it's minimum size when in a container with other controls, which may not be your desired behavior.
Steps to reproduce
-Expected Result- The label expands the bounds of the container to accomidate, similarly to how a label with Autowrap off will expand the container.
-Result- The Godot editor stops responding and crashes
Minimal reproduction project (MRP)
aspectratiocontainerissue.zip