Tested versions
- Reproducible with 4.2.1 stable
System information
Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 Laptop GPU (NVIDIA; 31.0.15.4617) - AMD Ryzen 9 5900HX with Radeon Graphics (16 Threads)
Issue description
When opening an affected project it fails to load, for example:
scene/resources/resource_format_text.cpp:284 - res://a.tscn:6 - Parse Error:
Failed loading resource: res://a.tscn. Make sure resources have been imported by opening the project in the editor at least once.
when trying to load the scene from the FileSystem view:
Failed to instantiate scene state of "res://a.tscn", node count is 0. Make sure the PackedScene resource is valid.
editor/editor_data.cpp:626 - Index p_idx = 1 is out of bounds (edited_scene.size() = 1).
Only workaround I know: break the cycle in the script. In a larger project where I first found the issue it also helped to close all open scenes and just reload.
Steps to reproduce
minimal steps:
- Create a 2D scene A and a 2D scene B
- Attach a script a.gd to A's root and a script b.gd to B'
- in a add a variable b like this: var b = preload("res://b.tscn")
- in b add a variable a like this: var a = preload("res://a.tscn"), which creates a cycle.
- safe all scenes (ctrl + s)
- from the menu execute Project -> Reload Current Project
Minimal reproduction project (MRP)
project_loading_bug_test.zip
Tested versions
System information
Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 Laptop GPU (NVIDIA; 31.0.15.4617) - AMD Ryzen 9 5900HX with Radeon Graphics (16 Threads)
Issue description
When opening an affected project it fails to load, for example:
when trying to load the scene from the FileSystem view:
Only workaround I know: break the cycle in the script. In a larger project where I first found the issue it also helped to close all open scenes and just reload.
Steps to reproduce
minimal steps:
Minimal reproduction project (MRP)
project_loading_bug_test.zip