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

scene\resources\text_paragraph.cpp:420 - Condition "p_font.is_null()" is true. Returning: false on editor startup #90001

Closed
chrisl8 opened this issue Mar 29, 2024 · 4 comments · Fixed by #90022

Comments

@chrisl8
Copy link
Contributor

chrisl8 commented Mar 29, 2024

Tested versions

Starting with Commit 86415f0

System information

Godot v4.3.dev (86415f0) - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 Ti (NVIDIA; 31.0.15.5186) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)

Issue description

I see this error on every startup, even with an empty project:

scene\resources\text_paragraph.cpp:420 - Condition "p_font.is_null()" is true. Returning: false

Steps to reproduce

Start a new empty project with Godot at commit 86415f0 or later

Minimal reproduction project (MRP)

Any empty project will do it.

@chrisl8
Copy link
Contributor Author

chrisl8 commented Mar 29, 2024

It seems to be this line

set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);

Removing it makes the error go away, but I'm just easter egging here without understanding the ramifications.

@MarkoSFG
Copy link

MarkoSFG commented Mar 29, 2024

Moving the call

set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);

from EditorDebuggerTree::EditorDebuggerTree() constructor to the bottom of EditorDebuggerNode:EditorDebuggerNode() fixes the issue, add

remote_scene_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);

to bottom of that EditorDebuggerNode constructor instead.

(in other words the call to prevent auto translate happens too early at the moment)

@MarkoSFG
Copy link

@akien-mga can you take a look please?

@timothyqiu
Copy link
Member

Probably the same cause as described in #89804 (comment).

NOTIFICATION_TRANSLATION_CHANGED could be propagated from parent nodes now, so we either avoid assuming theme caches are ready during the notification, or we avoid changing this property in the nodes' own constructor.

godot/scene/gui/tree.cpp

Lines 4350 to 4354 in 29b3d9e

case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
case NOTIFICATION_TRANSLATION_CHANGED: {
_update_all();
} break;

The initial theme cache update is in NOTIFICATION_POSTINITIALIZE. So moving the call outside the constructor works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants