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
Two bugs with the translation csv importer. Both of these are regression in Godot 4.4 due to the new consistent UID hashing added in PR #97363
First, it can produce negative UIDs, which will serialize as uid://<invalid>. Negative UIDs are currently not permitted for text serialization, though they work fine in binary serialization.
Second, it does not check if the UID already exists in the project. This causes a few glitches which are hard to verify, for example referencing one file may reference the wrong copy (it might be random which gets referenced due to the nature of duplicate UIDs in Godot).
Also, note that reproducing this in a fresh project will not be obvious, because Godot caches incorrect UIDs due to a bug with how ResourceSaver::set_uid() interacts with the editor's UID cache. You must close the editor and delete .godot to observe the new UIDs. This whole thing with set_uid probably belongs in its own issue.
Steps to reproduce
Open attached MRP.
Open reference_duplicate_uid.tscn and press ctrl-s to resave scene.
Open reference_duplicate_uid.tscnin text editor and note that bothtest_translation.es.translationandtest_translation.es_1.translation` have the same UIDs
Open translation_ref.tscn and press ctrl-s to resave scene
Check translation_ref.tscn in text editor and note uid://<invalid> for test_translation.en.translation
Optional steps to demonstrate that the invalid only happens on .tscn but not .scn:
6. Open translation_ref.scn and press ctrl-s to resave scene. This will not produce an invalid uid, but we cannot read this in a text editor.
7. Rename .en.translation outside godot and then open both translation_ref.scn and translation_ref.tscn The only occurs for .tscn because binary resources permit negative UIDs. The .scn version will update the reference correctly.
.es might have been regenerated. Jf you rename .es to .es_2 then close godot and delete .godot, then es_1 and es_2 will have the same uid.
It is very confusing and hard to demonstrate due to the bug affecting uid_cache.bin when set_uid is used, but I was able to reproduce this on 4.4beta4 even if I did not document the steps exactly right
(I was able to see that the uid for .es_1 annd .es_2 are w801unt... and probably .es too if you clear the uid cache)
Tested versions
System information
Godot v4.4.beta4 - Windows 10 (build 19045) - Single-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3090 (NVIDIA; 32.0.15.6094) - Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 threads)
Issue description
Two bugs with the translation csv importer. Both of these are regression in Godot 4.4 due to the new consistent UID hashing added in PR #97363
First, it can produce negative UIDs, which will serialize as
uid://<invalid>
. Negative UIDs are currently not permitted for text serialization, though they work fine in binary serialization.Second, it does not check if the UID already exists in the project. This causes a few glitches which are hard to verify, for example referencing one file may reference the wrong copy (it might be random which gets referenced due to the nature of duplicate UIDs in Godot).
Also, note that reproducing this in a fresh project will not be obvious, because Godot caches incorrect UIDs due to a bug with how
ResourceSaver::set_uid()
interacts with the editor's UID cache. You must close the editor and delete .godot to observe the new UIDs. This whole thing with set_uid probably belongs in its own issue.Steps to reproduce
reference_duplicate_uid.tscn
and press ctrl-s to resave scene.in text editor and note that both
test_translation.es.translationand
test_translation.es_1.translation` have the same UIDstranslation_ref.tscn
in text editor and noteuid://<invalid>
fortest_translation.en.translation
Optional steps to demonstrate that the invalid only happens on .tscn but not .scn:
6. Open translation_ref.scn and press ctrl-s to resave scene. This will not produce an invalid uid, but we cannot read this in a text editor.
7. Rename .en.translation outside godot and then open both
translation_ref.scn
andtranslation_ref.tscn
The only occurs for .tscn because binary resources permit negative UIDs. The .scn version will update the reference correctly.Minimal reproduction project (MRP)
translation_csv_uids.zip
The text was updated successfully, but these errors were encountered: