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
When i did the upgrade of a project made in 4.3 stable to 4.4 rc 2 after the uid update and restart i noticed a scene that also was an autoload loses the built-in script and was replaced for an empty built-in script.
This is the mrp in 4.3 stable, everything ok:
4.3.ok.mp4
After open in 4,4 rc 2 for the first time and do the restart and upgrade process, the script attached to my autoload scene was empty, the ctrl + left click in BulletManager inside the script doesn't work and ctrl + left click on the function name leads to another script, the function docs tooltip still working.
4.4.after.update.mp4
But if i restart again, the built-in script attached still empty, ctrl + left click in BulletManager inside the script works but now hover or press ctrl while hovering the functon name trigger this error: modules/gdscript/gdscript_editor.cpp:3838 - Condition "!ClassDB::class_exists(class_name)" is true. Returning: ERR_BUG and the doc tooltips doesn't work anymore.
After restart, open the BulletManager.tscn and look the script, will be empty.
Ctrl + left click the function name in the Scenes/Player/player.tscn script in line 28, will open a different script from the attached one in the BulletManager.tscn, but this one contain all the data.
Did you find the issue @amarsero ? Just for my curiosity, I was investigating this issue. I'm not 100% certain why the modifications from #102636 afftected this issue but I think the issue is caused because with the modifications, the Player script in the MVP is now valid at the moment of the upgrade, causing the autoload script (BulletManager) to load while loading the Player script during the upgrade process.
In the GDScriptCache::get_shallow_script, the BulletManager script resource (which is an embedded script into the scene) is created but without it's scene unique id.
That causes the save of the bullet_manager.tscn to create a new embedded script with a new id when resaving it in the upgrade process.
I fixed the issue on my side by using the ResourceFormatLoader::CACHE_MODE_REPLACE cache mode to the ResourceLoader::load in UIDUpgradeTool::finish_upgrade:
Ref<Resource> res = ResourceLoader::load(file_path, "", ResourceFormatLoader::CACHE_MODE_REPLACE);
That forces the scene and the script to be reloaded completely from the disk during the upgrade progress.
Tested versions
System information
Godot v4.4.rc3 - Windows 10 (build 19045) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated AMD Radeon RX 580 2048SP (Advanced Micro Devices, Inc.; 31.0.21921.1000) - AMD Ryzen 5 3600 6-Core Processor (12 threads)
Issue description
When i did the upgrade of a project made in 4.3 stable to 4.4 rc 2 after the uid update and restart i noticed a scene that also was an autoload loses the built-in script and was replaced for an empty built-in script.
This is the mrp in 4.3 stable, everything ok:
4.3.ok.mp4
After open in 4,4 rc 2 for the first time and do the
restart and upgrade
process, the script attached to my autoload scene was empty, thectrl + left
click inBulletManager
inside the script doesn't work andctrl + left
click on the function name leads to another script, the function docs tooltip still working.4.4.after.update.mp4
But if i restart again, the built-in script attached still empty,
ctrl + left click
inBulletManager
inside the script works but now hover or pressctrl
while hovering the functon name trigger this error:modules/gdscript/gdscript_editor.cpp:3838 - Condition "!ClassDB::class_exists(class_name)" is true. Returning: ERR_BUG
and the doc tooltips doesn't work anymore.4.4.after.restart.mp4
Bisecting points to pr #102636 as the culprit, CC @amarsero
Steps to reproduce
Restart and Upgrade
.BulletManager.tscn
and look the script, will be empty.Ctrl + left click
the function name in theScenes/Player/player.tscn
script in line 28, will open a different script from the attached one in theBulletManager.tscn
, but this one contain all the data.Minimal reproduction project (MRP)
test_project.zip
The text was updated successfully, but these errors were encountered: