You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a GDExtension or plug-in adds a new ScriptExtension and ScriptLanguageExtension, Godot 4.4 reports the following immediately after starting up when the .godot directory does not yet exist.
Godot Engine v4.4.stable.custom_build (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
--- Debug adapter server started on port 6006 ---
--- GDScript language server started on port 6005 ---
ERROR: scene/gui/popup_menu.cpp:1776 - Index p_idx = 1 is out of bounds (items.size() = 1).
ERROR: scene/gui/popup_menu.cpp:1776 - Index p_idx = 1 is out of bounds (items.size() = 1).
ERROR: scene/gui/popup_menu.cpp:1776 - Index p_idx = 1 is out of bounds (items.size() = 1).
ERROR: scene/gui/popup_menu.cpp:1776 - Index p_idx = 1 is out of bounds (items.size() = 1).
ERROR: scene/gui/popup_menu.cpp:1776 - Index p_idx = 1 is out of bounds (items.size() = 1).
ERROR: scene/gui/popup_menu.cpp:1776 - Index p_idx = 1 is out of bounds (items.size() = 1).
After careful review, the errors are directly from ScriptCreateDialog due to how the language_menu list is managed. The list is created inside the constructor and when the NOTIFICATION_THEME_CHANGED is called the first time, the ScriptServer only reports there is 1 language count, so everything is happy. But when the next NOTIFICATION_THEME_CHANGED is called, the ScriptServer reports there are now 2 languages present; however the language_menu only has a single item in the list, which leads to these errors.
Steps to reproduce
Have a project that has a GDExtension that supplies a ScriptLanguageExtension and ScriptLanguage.
Make sure the project has no .godot directory in the root of the project.
Load the project in the Godot 4.4 editor, errors are shown in the output panel.
I should note that the language is being registered inside the MODULE_INITIALIZATION_LEVEL_SERVERS module handler, but I've tried in the SCENE level as well, both yield the same result.
I have not tried using implementations from GDScript, this was specifically from GDExtension.
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered:
I haven't looked at this too closely, but it does seem like a bug in ScriptCreateDialog.
The number of scripting languages can change at any time, given that GDExtensions may not be loaded at editor startup, and can be loaded later (like if the developer adds a new extension from the asset library), so it should account for that happening
Naros
linked a pull request
Apr 1, 2025
that will
close
this issue
Tested versions
4.4.1.stable
System information
Fedora 41
Issue description
When a GDExtension or plug-in adds a new
ScriptExtension
andScriptLanguageExtension
, Godot 4.4 reports the following immediately after starting up when the.godot
directory does not yet exist.After careful review, the errors are directly from
ScriptCreateDialog
due to how thelanguage_menu
list is managed. The list is created inside the constructor and when theNOTIFICATION_THEME_CHANGED
is called the first time, theScriptServer
only reports there is 1 language count, so everything is happy. But when the nextNOTIFICATION_THEME_CHANGED
is called, theScriptServer
reports there are now 2 languages present; however thelanguage_menu
only has a single item in the list, which leads to these errors.Steps to reproduce
ScriptLanguageExtension
andScriptLanguage
..godot
directory in the root of the project.I should note that the language is being registered inside the
MODULE_INITIALIZATION_LEVEL_SERVERS
module handler, but I've tried in the SCENE level as well, both yield the same result.I have not tried using implementations from GDScript, this was specifically from GDExtension.
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: