godot: Parse Error: [ext_resource] referenced non-loaded resource when loading a specific scene
Godot version
v4.0.alpha.mono.custom_build [67d401552]
System information
Ubuntu 22.04
Issue description
See the attached project for the scene in question. You get this error when trying to load it:
scene/resources/resource_format_text.cpp:177 - res://SlidingDoor/SlidingDoor.tscn:8 - Parse Error: [ext_resource] referenced non-loaded resource at: res://SlidingDoor/SlidingDoor.tscn
scene/resources/resource_format_text.cpp:610 - res://SlidingDoor/SlidingDoor.tscn:8 - Parse Error: [ext_resource] referenced non-loaded resource at: res://SlidingDoor/SlidingDoor.tscn
Failed loading resource: res://SlidingDoor/SlidingDoor.tscn. Make sure resources have been imported by opening the project in the editor at least once.
editor/editor_data.cpp:530 - Index p_idx = 1 is out of bounds (edited_scene.size() = 1).
Steps to reproduce
Simply open the attached project. The default scene fails to load.
When you re-import the blend file referenced in the SlidingDoor.tscn file the scene will load fine, until you save the scene which breaks it again. You can keep going round and round like that.
I believe it has something to do with this particular blend file, but I have yet to figure out what specifically is causing the issue. Also I had this issue on previous GD4 commits, but it went away and came back again, so I think a fix may have been reverted recently. If I find the commit where it broke, I’ll update this issue.
Minimal reproduction project
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 4
- Comments: 18 (3 by maintainers)
is related to #68661
As an update… it seems like the error has something to do with the fact of coding several references in different scripts that points to the same scene…
As a workaround, having a singleton that contains the references work https://gitlab.com/rarodigma-studio/aleph/-/tree/PUBLIC/packed-scene-bug-workaround
However, it stills feel like a quick workaround… the benefit of using
@Exportis clearly better, I don’t think it’s a expected behaviour.Just encountered this. v4.1.dev2.official [668cf3c66]
preload()is what causing this in my case. #76641If renaming the file solves the problem, that would mean it’s some sort of a cache problem…