Open EricPendergast opened 2 weeks ago
This issue actually has a bit larger scope than I thought, as the crash happens even if the object has been long destroyed:
public override void _Draw() {
var screenPos = new Vector2I(100, 100);
var text = "Hello";
DrawString(ThemeDB.FallbackFont, screenPos, text,
HorizontalAlignment.Left, -1, 14, Colors.White);
// Crash still happens despite draw call not running at quit time
this.QueueFree();
}
A workaround for this issue is to use a custom font instead of the ThemeDB.FallbackFont
Not reproducible with current master.
Tested versions
System information
Godot v4.3.stable.mono - macOS 15.0.1 - Vulkan (Forward+) - integrated Apple M2 Pro - Apple M2 Pro (12 Threads)
Issue description
When running the scene with the attached script, it works fine while its running, however when closing the game it hangs indefinitely. In the editor, there is nothing indicating an error. In VSCode, it shows the following backtrace:
The script in question is as follows:
This happens with all of the string drawing functions (
DrawStringOutline
,DrawMultilineString
,DrawMultilineStringOutline
) I suspect this has something to do with the order of font usage and cleanup.Steps to reproduce
bug.tscn
(contains just a Node2D with the above script attached)Minimal reproduction project (MRP)
drawbug.zip