Almost all usages of preload with UID path result in error upon startup
Tested versions
Reproducible in: v4.3.rc3.official [03afb92ef]
System information
Godot v4.3.rc3 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.3742) - Intel(R) Core(TM) i9-9900KF CPU @ 3.60GHz (16 Threads)
Issue description
Upon open my project via the project manager, the console becomes flooded by internal engine errors regarding resource IDs, the inability to load resources, and the failure of script compilation, repeating for nearly every single use of preload() with a UID path in the project.
This error message does not impact the functioning of the project. Neither within the editor, nor at runtime.
All missing resources do in fact exist, and open in the inspector and can be viewed at runtime.
There is no evident pattern for what kind of resource fails to load. Both custom resources and .tscn files are affected.
I can not ascertain whether or not this is due to my usage of UIDs or not, I do not use file paths at all.
I've attached a copy of the logs below:
This is an example of the resource 'uid://dnarsxbix4pxp' which is responsible for many of the errors, as it is the most commonly preloaded resource in the project. Just to prove that it is in fact a valid resource. Any resources referenced by it, are also valid and open correctly for the editor and game.
class_name GameConfig
extends Resource
## Game Config Resource
##
## A simple resource which can be loaded in various parts of your game to apply configurations.
## The default location is res://game_config.tres.
@export_category("Nylon")
@export var starting_scene: PackedScene
@export_category("Debug")
@export var draw_combat_markers: bool = false:
set(new_value):
draw_combat_markers = new_value
emit_changed()
@export var slow_task_queue: bool = false
@export var slow_task_queue_speed: float = 1.0
[gd_resource type="Resource" script_class="GameConfig" load_steps=3 format=3 uid="uid://dnarsxbix4pxp"]
[ext_resource type="Script" path="res://Game/GameConfig.gd" id="1_g3g5h"]
[ext_resource type="PackedScene" uid="uid://b22u651r4vuby" path="res://NylonContent/Scenes/DebugIntro.tscn" id="2_g4ggf"]
[resource]
script = ExtResource("1_g3g5h")
starting_scene = ExtResource("2_g4ggf")
draw_combat_markers = true
slow_task_queue = false
slow_task_queue_speed = 1.0
Steps to reproduce
N/A, there is no evident rhyme or reason for these errors to occur. I am currently unable to create another sufficiently complex project where I might expect it.
Minimal reproduction project (MRP)
Does deleting the .godot cache folder resolve anything?
To be clear, this does not reproduce in 4.2, right? I got the impression from Twitter that you were describing a regression in 4.3, but it's not clear here.
If it's a regression, could you test earlier rc/beta/dev snapshots to pinpoint when it started?
This does not occur in 4.2 correct.
I'll have a look through the snapshots, might take a while.
I found that it occurs when the preload(<uid>) is inside an Autoload.
Here is a minimal reproduction project, tested with v4.3.stable.official [77dcf97d8]: mrp_preload_uid.zip