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
Opening any project with Godot COULD emit error message Index p_idx = -1 is out of bounds (edited_scene.size() = 1).. This error message will be visible in Godot editor as well as in the terminal (if Godot is opened from terminal).
After some debugging, I have come to following conclusion and found the root cause. Godot editor saves the editor state like the list of all opened scenes and the current edited scene in .godot/editor/editor_layout.cfg (project relative path). The problem is that current edited scene (represented as current_scene in EditorNode section of the configuration file) was not updated when all scenes are closed while the list of all opened scenes is properly updated. This leaves the value for current_scene to the value from the previous Godot editor launch:
Godot editor, when started, will read this configuration file and open all scenes listed in open_scenes and select the scene tab represented by current_scene. Since res://scenes/node2.tscn is not found in the list of opened scenes, the error message is emitted:
ERROR: Index p_idx = -1 is out of bounds (edited_scene.size() = 1).
Issue was introduced in:
commit 454befc880f391448bbd1dce56a38897f5dd3037
Author: Alex Drozd <drozdster@gmail.com>
Date: Mon Jun 12 20:00:42 2023 +0200
Prevent non-existent scene from being saved to persistent editor config
It is only reproducible on master branch.
Steps to reproduce
This issue can be reproduced with ANY project by following steps:
Start Godot editor.
Open a scene (any one).
Quit Godot editor.
Start Godot editor.
Close the opened scene. The issue can only be triggered when you closed ALL opened scenes.
Quit Godot editor.
Start Godot editor.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered:
Godot version
4.2.dev [202e4b2]
System information
Godot v4.2.dev (202e4b2) - SteamOS holo - X11 - Vulkan (Forward+) - integrated AMD Custom GPU 0405 (RADV VANGOGH) () - AMD Custom APU 0405 (8 Threads)
Issue description
Opening any project with Godot COULD emit error message
Index p_idx = -1 is out of bounds (edited_scene.size() = 1).
. This error message will be visible in Godot editor as well as in the terminal (if Godot is opened from terminal).After some debugging, I have come to following conclusion and found the root cause. Godot editor saves the editor state like the list of all opened scenes and the current edited scene in
.godot/editor/editor_layout.cfg
(project relative path). The problem is that current edited scene (represented ascurrent_scene
inEditorNode
section of the configuration file) was not updated when all scenes are closed while the list of all opened scenes is properly updated. This leaves the value forcurrent_scene
to the value from the previous Godot editor launch:Godot editor, when started, will read this configuration file and open all scenes listed in
open_scenes
and select the scene tab represented bycurrent_scene
. Sinceres://scenes/node2.tscn
is not found in the list of opened scenes, the error message is emitted:Issue was introduced in:
It is only reproducible on master branch.
Steps to reproduce
This issue can be reproduced with ANY project by following steps:
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: