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
See attached MRP. It seems when there is a cyclic dependency of scenes (with scripts) that are preloading (either by path or UID) each other, it is possible to cause one of the preloads to silently fail and return an invalid PackedScene (empty path). Strangely in the MRP, by rearranging the preloads of the two cyclic scenes from the root scene, the issue is resolved. In either case, removing the cyclic reference also stops the error from happening.
I looked over the other issues in #80877 and didn't see any that immediately stuck out to me as being the same issue. The closest one I could find is #77090
Steps to reproduce
Open the MRP and check 'a.gd' comment header
Per the comments, try running with the provided configuration and note that instantiating 'B.tscn' fails in 'C.gd', but not in 'A.gd' and an error is thrown. The instance ID's of the two preloaded packed scenes are different
Then try swapping the preloads (again per the comments) in 'A.gd' and run again. Note that the error does not happen, and instance ID's of the two packed scenes are the same.
Finally, swap back to original configuration, and remove the preload of 'C.tscn' from 'B.gd' (breaking the cyclic dependency) and note that the issue is resolved, same as in step 3
Tested versions
Reproducible in v4.4.beta1.official [d33da79]
System information
Godot v4.4.beta1 - Windows 10 (build 19045) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 32.0.15.6636) - AMD Ryzen 7 3700X 8-Core Processor (16 threads)
Issue description
See attached MRP. It seems when there is a cyclic dependency of scenes (with scripts) that are preloading (either by path or UID) each other, it is possible to cause one of the preloads to silently fail and return an invalid PackedScene (empty path). Strangely in the MRP, by rearranging the preloads of the two cyclic scenes from the root scene, the issue is resolved. In either case, removing the cyclic reference also stops the error from happening.
I looked over the other issues in #80877 and didn't see any that immediately stuck out to me as being the same issue. The closest one I could find is #77090
Steps to reproduce
Minimal reproduction project (MRP)
mrp_preload_fail.zip
The text was updated successfully, but these errors were encountered: