-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a translation CSV results in errors on initial import for many types of resources #93704
Comments
Wasn't #92320 supposed to fix this? |
I'm not entirely sure of the consequences of this, but if a quick hack is needed, this might do the trick: - if (!f.begins_with("res://")) {
+ if (!f.begins_with("res://") || f.ends_with(".translation")) {
return false;
} ... here: godot/editor/editor_file_system.cpp Lines 1545 to 1547 in 811ce36
|
I don't think it's the same issue as #92320. In fact, the issue is probably caused became csv are now importing at startup. In #93064 I added a check if a scene was modified and not first_scan in update_files before calling _update_pending_scene_groups to prevent this bug. I don't have access to my computer until next week to check this issue unfortunaly. |
👍 I can confirm this is what has been plaguing me for weeks. Deleted the translation files to test and now it's fine again. I am seeing it in 4.2.1 and 4.2.2 as well though. |
Tested versions
Reproducible in 4.3.beta [811ce36]
System information
Windows 11 (10.0.22631)
Issue description
(I believe this is a duplicate of #92262, but there wasn't much of an MRP provided in that issue.)
When a project includes a "CSV Translation" file, that file will emit
.translation
files (one for every language/locale) next to the.csv
file. The writing of these.translation
files will (in the same callstack) seemingly cause every scene in the project to be loaded, which in turn will try to load every resource referenced by those scenes, most of which will (on initial import) fail, since many of these resources won't have been imported at that point.The type of resource matters to some degree, due to the ordering of the reimports that happens here:
godot/editor/editor_file_system.cpp
Line 2660 in 811ce36
... as this will sort the imports by the importer name (
ResourceImporter::get_importer_name()
), where"csv_importer"
will often get sorted first, before things like"texture"
, like in the provided MRP.Here is the callstack when one of these texture resources fail to load due to not having been imported:
(Note that I disabled
import/use_multiple_threads
in the MRP to make debugging more straight-forward, hence the callstack, but that setting is inconsequential to this issue.)As far as I can tell (after bisecting) this is a regression in 4.3, caused by #60965, as
EditorFileSystem::_update_pending_scene_groups
loading all the scenes inEditorFileSystem::_process_update_pending
is largely what's causing this problem.However, it does seem to me like the CSV importer itself is also part of the problem here, as every other import artifact that triggers
EditorNode::_resource_saved
will simply early out inEditorFileSystem::_find_file
here due to those import artifacts being in the.godot
folder, as opposed to being generated next to the source file like with.csv
files.Steps to reproduce
.godot
folder in the MRPlogo1.png
,logo2.png
and their respective import artifactsMinimal reproduction project (MRP)
LocalizationErrors.zip
The text was updated successfully, but these errors were encountered: