Skip to content
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

ProgressDialog crash when importing TTF font at the same time as a big addon with glb files #93159

Closed
akien-mga opened this issue Jun 14, 2024 · 3 comments · Fixed by #93160 or #93161
Closed

Comments

@akien-mga
Copy link
Member

akien-mga commented Jun 14, 2024

Tested versions

System information

Fedora Linux 40 (KDE Plasma) - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 7600M XT (RADV NAVI33) - AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16 Threads)

Issue description

When first importing a project that includes TTF files and the proton_scatter addon (which includes GLB and Blend files), I get the following crash:

EditorFileSystem: Importing file: res://Amaranth-Regular.ttf
EditorFileSystem: Importing file: res://Amaranth-Italic.ttf
Importing dynamic font from: res://Amaranth-Regular.ttf
Importing dynamic font from: res://Amaranth-Italic.ttf
Saving to: res://.godot/imported/Amaranth-Regular.ttf-f271a62e09406162c2cbfc03646add5e.fontdata
Saving to: res://.godot/imported/Amaranth-Italic.ttf-d1cbbfef90ac1ebe872e2e73f29db893.fontdata
SCRIPT ERROR: Parse Error: Script export type must be a global class.
          at: GDScript::reload (res://addons/proton_scatter/src/stack/modifier_stack.gd:15)
SCRIPT ERROR: Compile Error: 
          at: GDScript::reload (res://addons/proton_scatter/src/common/scatter_util.gd:-1)
SCRIPT ERROR: Compile Error: 
          at: GDScript::reload (res://addons/proton_scatter/src/scatter_shape.gd:-1)
SCRIPT ERROR: Compile Error: 
          at: GDScript::reload (res://addons/proton_scatter/src/common/domain.gd:-1)
SCRIPT ERROR: Parse Error: Script export type must be a global class.
          at: GDScript::reload (res://addons/proton_scatter/src/stack/modifier_stack.gd:15)
SCRIPT ERROR: Compile Error: 
          at: GDScript::reload (res://addons/proton_scatter/src/scatter.gd:-1)
SCRIPT ERROR: Compile Error: 
          at: GDScript::reload (res://addons/proton_scatter/src/cache/scatter_cache.gd:-1)
SCRIPT ERROR: Compile Error: 
          at: GDScript::reload (res://addons/proton_scatter/src/cache/inspector_plugin/cache_panel.gd:-1)
ERROR: Failed to load script "res://addons/proton_scatter/src/cache/inspector_plugin/cache_panel.gd" with error "Compilation failed".
   at: load (./modules/gdscript/gdscript.cpp:2943)
SCRIPT ERROR: Parse Error: Script export type must be a global class.
          at: GDScript::reload (res://addons/proton_scatter/src/stack/modifier_stack.gd:15)
SCRIPT ERROR: Compile Error: 
          at: GDScript::reload (res://addons/proton_scatter/src/modifiers/proxy.gd:-1)
ERROR: Failed to load script "res://addons/proton_scatter/src/modifiers/proxy.gd" with error "Compilation failed".
   at: load (./modules/gdscript/gdscript.cpp:2943)
ERROR: Cannot open file 'res://.godot/imported/compute_relax.glsl-b06f9e60cda7719b78bde9673f2501b7.res'.
   at: load (./core/io/resource_format_binary.cpp:1204)
ERROR: Failed loading resource: res://.godot/imported/compute_relax.glsl-b06f9e60cda7719b78bde9673f2501b7.res. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/src/modifiers/compute_shaders/compute_relax.glsl. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
SCRIPT ERROR: Parse Error: Could not preload resource file "res://addons/proton_scatter/src/modifiers/compute_shaders/compute_relax.glsl".
          at: GDScript::reload (res://addons/proton_scatter/src/modifiers/relax.gd:5)
SCRIPT ERROR: Parse Error: Cannot infer the type of "shader_file" constant because the value doesn't have a set type.
          at: GDScript::reload (res://addons/proton_scatter/src/modifiers/relax.gd:5)
ERROR: Failed to load script "res://addons/proton_scatter/src/modifiers/relax.gd" with error "Parse error".
   at: load (./modules/gdscript/gdscript.cpp:2943)
ERROR: Unable to open file: res://.godot/imported/load.svg-0da8e4247aad5735085e117978c315ac.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/load.svg-0da8e4247aad5735085e117978c315ac.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/load.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/remove.svg-8b603896066014738ad4a8d4a482bb8e.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/remove.svg-8b603896066014738ad4a8d4a482bb8e.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/remove.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/clear.svg-46e0566a8856183197fd37d5ccb84c9b.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/clear.svg-46e0566a8856183197fd37d5ccb84c9b.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/clear.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/clear.svg-46e0566a8856183197fd37d5ccb84c9b.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/clear.svg-46e0566a8856183197fd37d5ccb84c9b.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/clear.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/menu.svg-f26f5349a7002ba943a58d37d6a062f2.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/menu.svg-f26f5349a7002ba943a58d37d6a062f2.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/menu.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/clear.svg-46e0566a8856183197fd37d5ccb84c9b.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/clear.svg-46e0566a8856183197fd37d5ccb84c9b.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/clear.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/select_all.svg-791a69a69cd2b6a9baadee0215a94edb.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/select_all.svg-791a69a69cd2b6a9baadee0215a94edb.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/select_all.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/clear.svg-46e0566a8856183197fd37d5ccb84c9b.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/clear.svg-46e0566a8856183197fd37d5ccb84c9b.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/clear.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/link.svg-15b5849f7b24eb1c738ea9cc78c1b9b4.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/link.svg-15b5849f7b24eb1c738ea9cc78c1b9b4.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/link.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/clear.svg-46e0566a8856183197fd37d5ccb84c9b.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/clear.svg-46e0566a8856183197fd37d5ccb84c9b.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/clear.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/link.svg-15b5849f7b24eb1c738ea9cc78c1b9b4.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/link.svg-15b5849f7b24eb1c738ea9cc78c1b9b4.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/link.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/close.svg-19437f97d2c1854efc880c19f78fe32e.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/close.svg-19437f97d2c1854efc880c19f78fe32e.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/close.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/arrow_right.svg-6771a48f7c1fe79d13059447d2bf9f07.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/arrow_right.svg-6771a48f7c1fe79d13059447d2bf9f07.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/arrow_right.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/arrow_down.svg-94d8c386a02d5ab5968e7f312ec47343.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/arrow_down.svg-94d8c386a02d5ab5968e7f312ec47343.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/arrow_down.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/close.svg-19437f97d2c1854efc880c19f78fe32e.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/close.svg-19437f97d2c1854efc880c19f78fe32e.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/close.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/menu.svg-f26f5349a7002ba943a58d37d6a062f2.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/menu.svg-f26f5349a7002ba943a58d37d6a062f2.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/menu.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/duplicate.svg-01a6fe9bb8397972ec3661dd5bf196ff.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/duplicate.svg-01a6fe9bb8397972ec3661dd5bf196ff.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/duplicate.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/doc.svg-c884c073ce3af0f82fb9ddd41a433df9.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/doc.svg-c884c073ce3af0f82fb9ddd41a433df9.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/doc.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/warning.svg-edf1b604537b5af6863f92713f96edb5.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/warning.svg-edf1b604537b5af6863f92713f96edb5.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/warning.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/drag_area.svg-b54df88063d806fbe992617a87621f6f.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/drag_area.svg-b54df88063d806fbe992617a87621f6f.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/drag_area.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/dice.svg-a3afbfd7a5e5fcaee218362e12214844.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/dice.svg-a3afbfd7a5e5fcaee218362e12214844.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/dice.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/restrict_volume.svg-9476f4ee23ebb4f320f21a45306967ac.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/restrict_volume.svg-9476f4ee23ebb4f320f21a45306967ac.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/restrict_volume.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/local.svg-fd1cdf9da074228b5ba1b4f8ff96c57f.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/local.svg-fd1cdf9da074228b5ba1b4f8ff96c57f.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/local.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/restrict_volume_lock.svg-a29ed4343f793eec0d6ceda09d847281.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/restrict_volume_lock.svg-a29ed4343f793eec0d6ceda09d847281.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/restrict_volume_lock.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/global.svg-e31c6e1d6185e37600fc56d0988ca1ec.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/global.svg-e31c6e1d6185e37600fc56d0988ca1ec.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/global.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/individual_instances.svg-6f2d7e070dd53c64d21912e2f021ebd5.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/individual_instances.svg-6f2d7e070dd53c64d21912e2f021ebd5.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/individual_instances.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/add.svg-c8c46053442728f2bca87eb859e046e7.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/add.svg-c8c46053442728f2bca87eb859e046e7.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/add.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/rebuild.svg-fbde9fa19dc213c85b24bc3d3a1fb89d.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/rebuild.svg-fbde9fa19dc213c85b24bc3d3a1fb89d.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/rebuild.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/load.svg-0da8e4247aad5735085e117978c315ac.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/load.svg-0da8e4247aad5735085e117978c315ac.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/load.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/save.svg-cdd3febbdfafdd18b4e7e1eca8b243ee.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/save.svg-cdd3febbdfafdd18b4e7e1eca8b243ee.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/save.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/doc.svg-c884c073ce3af0f82fb9ddd41a433df9.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/doc.svg-c884c073ce3af0f82fb9ddd41a433df9.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/doc.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Caller thread can't call this function in this node (/root/@EditorNode@17573/@EditorFileSystem@3). Use call_deferred() or call_thread_group() instead.
   at: emit_signalp (./scene/main/node.cpp:3889)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: This function in this node (/root/@ProgressDialog@18132/@VBoxContainer@8/@HBoxContainer@9) can only be accessed from the main thread. Use call_deferred() instead.
   at: hide (./scene/main/canvas_item.cpp:118)
ERROR: This function in this node (/root/@ProgressDialog@18132/@VBoxContainer@8/@HBoxContainer@9) can only be accessed from the main thread. Use call_deferred() instead.
   at: move_to_front (./scene/main/canvas_item.cpp:437)
ERROR: This function in this node (/root/@ProgressDialog@18132/@VBoxContainer@8) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
   at: get_combined_minimum_size (./scene/gui/control.cpp:1689)
ERROR: This function in this node (/root/@ProgressDialog@18132/@VBoxContainer@8) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
   at: get_theme_stylebox (./scene/gui/control.cpp:2586)
ERROR: Unable to open file: res://.godot/imported/curve_select.svg-9a34ca2f976ba8714813d2d2842c56d9.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/curve_select.svg-9a34ca2f976ba8714813d2d2842c56d9.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/curve_select.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/curve_create.svg-6aa0ae777579eb233f93eae8cfc9ae81.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/curve_create.svg-6aa0ae777579eb233f93eae8cfc9ae81.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/curve_create.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/curve_delete.svg-8346b842c26eae7708985a1205d56c1f.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/curve_delete.svg-8346b842c26eae7708985a1205d56c1f.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/curve_delete.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/menu.svg-f26f5349a7002ba943a58d37d6a062f2.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/menu.svg-f26f5349a7002ba943a58d37d6a062f2.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/menu.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/scatter.svg-bfff578dc360b745c3834db069a4a315.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/scatter.svg-bfff578dc360b745c3834db069a4a315.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/scatter.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/item.svg-6af5bcafcf0e1297ab1d55a0f7c9cd35.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/item.svg-6af5bcafcf0e1297ab1d55a0f7c9cd35.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/item.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/shape.svg-d62cbd79ae44bc9e71e9bf0357acae87.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/shape.svg-d62cbd79ae44bc9e71e9bf0357acae87.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/shape.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/cache.svg-cb20e369c40cb12fb2d5b9a87ba41311.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/cache.svg-cb20e369c40cb12fb2d5b9a87ba41311.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/icons/cache.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
SCRIPT ERROR: Parse Error: Could not preload resource file "res://addons/proton_scatter/icons/scatter.svg".
          at: GDScript::reload (res://addons/proton_scatter/plugin.gd:51)
SCRIPT ERROR: Parse Error: Could not preload resource file "res://addons/proton_scatter/icons/item.svg".
          at: GDScript::reload (res://addons/proton_scatter/plugin.gd:57)
SCRIPT ERROR: Parse Error: Could not preload resource file "res://addons/proton_scatter/icons/shape.svg".
          at: GDScript::reload (res://addons/proton_scatter/plugin.gd:63)
SCRIPT ERROR: Parse Error: Could not preload resource file "res://addons/proton_scatter/icons/cache.svg".
          at: GDScript::reload (res://addons/proton_scatter/plugin.gd:69)
ERROR: Failed to load script "res://addons/proton_scatter/plugin.gd" with error "Parse error".
   at: load (./modules/gdscript/gdscript.cpp:2943)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Condition "!is_inside_tree()" is true.
   at: popup_centered (./scene/main/window.cpp:1781)
ERROR: Task 'update_scene_groups' already exists.
   at: add_task (./editor/progress_dialog.cpp:175)
ERROR: Cannot open file 'res://.godot/imported/brick.glb-d79404ecf88b29143e6e07e77bacb44c.scn'.
   at: load (./core/io/resource_format_binary.cpp:1204)
ERROR: Failed loading resource: res://.godot/imported/brick.glb-d79404ecf88b29143e6e07e77bacb44c.scn. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/demos/assets/models/brick.glb. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Unable to open file: res://.godot/imported/t_rock.jpg-ae52c049ee9fab72f1ddf136050fd9ee.s3tc.ctex.
   at: _load_data (./scene/resources/compressed_texture.cpp:41)
ERROR: Failed loading resource: res://.godot/imported/t_rock.jpg-ae52c049ee9fab72f1ddf136050fd9ee.s3tc.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Failed loading resource: res://addons/proton_scatter/demos/assets/textures/t_rock.jpg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:281)
ERROR: Condition "!Thread::is_main_thread()" is true.
   at: process_events (platform/linuxbsd/x11/display_server_x11.cpp:4322)
ERROR: Condition "!Thread::is_main_thread()" is true. Returning: nullptr
   at: space_get_direct_state (servers/physics_server_2d_wrap_mt.h:107)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Moving child node positions inside the SceneTree is only allowed from the main thread. Use call_deferred("move_child",child,index).
   at: move_child (./scene/main/node.cpp:435)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Moving child node positions inside the SceneTree is only allowed from the main thread. Use call_deferred("move_child",child,index).
   at: move_child (./scene/main/node.cpp:435)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: Adding children to a node inside the SceneTree is only allowed from the main thread. Use call_deferred("add_child",node).
   at: add_child (./scene/main/node.cpp:1557)
ERROR: FATAL: DEV_ASSERT failed  "Thread::get_caller_id() == Thread::get_main_id()" is false.
   at: _dependency_error_report (./editor/editor_node.h:504)

Thread 11 "godot-git" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe3c006c0 (LWP 138998)]
0x0000000007b312ac in ProgressDialog::_popup (this=0xf1577e0) at ./editor/progress_dialog.cpp:144
144             ms += style->get_minimum_size();
Missing separate debuginfos, use: dnf debuginfo-install alsa-lib-1.2.11-2.fc40.x86_64 bzip2-libs-1.0.8-18.fc40.x86_64 dbus-libs-1.14.10-3.fc40.x86_64 elfutils-libelf-0.191-4.fc40.x86_64 expat-2.6.2-1.fc40.x86_64 flac-libs-1.4.3-4.fc40.x86_64 fontconfig-2.15.0-4.fc40.x86_64 freetype-2.13.2-5.fc40.x86_64 glib2-2.80.2-1.fc40.x86_64 glibc-2.39-13.fc40.x86_64 graphite2-1.3.14-15.fc40.x86_64 gsm-1.0.22-6.fc40.x86_64 harfbuzz-8.4.0-1.fc40.x86_64 lame-libs-3.100-17.fc40.x86_64 libX11-1.8.9-1.fc40.x86_64 libX11-xcb-1.8.9-1.fc40.x86_64 libXcursor-1.2.1-7.fc40.x86_64 libXext-1.3.6-1.fc40.x86_64 libXfixes-6.0.1-3.fc40.x86_64 libXi-1.8.1-5.fc40.x86_64 libXinerama-1.1.5-6.fc40.x86_64 libXrender-0.9.11-6.fc40.x86_64 libbrotli-1.1.0-3.fc40.x86_64 libcap-2.69-8.fc40.x86_64 libdrm-2.4.120-3.fc40.x86_64 libffi-3.4.4-7.fc40.x86_64 libgcc-14.1.1-4.fc40.x86_64 libpng-1.6.40-3.fc40.x86_64 libsndfile-1.2.2-2.fc40.x86_64 libstdc++-14.1.1-4.fc40.x86_64 libvorbis-1.3.7-10.fc40.x86_64 libwayland-client-1.22.0-3.fc40.x86_64 libxcb-1.17.0-1.fc40.x86_64 libxkbcommon-1.6.0-2.fc40.x86_64 libxml2-2.12.7-1.fc40.x86_64 libzstd-1.5.6-1.fc40.x86_64 llvm-libs-18.1.6-2.fc40.x86_64 mesa-vulkan-drivers-24.0.8-1.fc40.x86_64 mpg123-libs-1.31.3-4.fc40.x86_64 ncurses-libs-6.4-12.20240127.fc40.x86_64 opus-1.5.1-1.fc40.x86_64 pcre2-10.42-2.fc40.2.x86_64 systemd-libs-255.7-1.fc40.x86_64 xz-libs-5.4.6-3.fc40.x86_64 zlib-ng-compat-2.1.6-2.fc40.x86_64
(gdb) bt
#0  0x0000000007b312ac in ProgressDialog::_popup (this=0xf1577e0) at ./editor/progress_dialog.cpp:144
#1  0x0000000007b31928 in ProgressDialog::add_task (this=0xf1577e0, p_task=..., p_label=..., p_steps=54, p_can_cancel=false) at ./editor/progress_dialog.cpp:197
#2  0x000000000794337b in EditorNode::progress_add_task (p_task=..., p_label=..., p_steps=54, p_can_cancel=false) at ./editor/editor_node.cpp:4806
#3  0x000000000759d928 in EditorProgress::EditorProgress (this=0x7fff5c0f8680, p_task=..., p_label=..., p_amount=54, p_can_cancel=false) at ./editor/editor_node.h:933
#4  0x0000000007745520 in EditorFileSystem::_update_scene_groups (this=0xdebd5e0) at ./editor/editor_file_system.cpp:1649
#5  0x0000000007745889 in EditorFileSystem::_update_pending_scene_groups (this=0xdebd5e0) at ./editor/editor_file_system.cpp:1685
#6  0x00000000077468c8 in EditorFileSystem::update_files (this=0xdebd5e0, p_script_paths=...) at ./editor/editor_file_system.cpp:1821
#7  0x0000000007745c4f in EditorFileSystem::update_file (this=0xdebd5e0, p_file=...) at ./editor/editor_file_system.cpp:1717
#8  0x000000000794cd71 in EditorNode::_resource_saved (p_resource=..., p_path=...) at ./editor/editor_node.cpp:6234
#9  0x000000000a70329a in ResourceSaver::save (p_resource=..., p_path=..., p_flags=32) at ./core/io/resource_saver.cpp:146
#10 0x0000000007dd15b9 in ResourceImporterDynamicFont::import (this=0xdebaa00, p_source_file=..., p_save_path=..., p_options=..., r_platform_variants=0x7fffe3bfed30, r_gen_files=0x7fffe3bfed28, 
    r_metadata=0x7fffe3bfed10) at ./editor/import/resource_importer_dynamic_font.cpp:231
#11 0x000000000774a726 in EditorFileSystem::_reimport_file (this=0xdebd5e0, p_file=..., p_custom_options=..., p_custom_importer=..., p_generator_parameters=0x0) at ./editor/editor_file_system.cpp:2166
#12 0x000000000774ca69 in EditorFileSystem::_reimport_thread (this=0xdebd5e0, p_index=1, p_import_data=0x7fffffffc6d0) at ./editor/editor_file_system.cpp:2339
#13 0x00000000078bdda4 in WorkerThreadPool::GroupUserData<EditorFileSystem, void (EditorFileSystem::*)(unsigned int, EditorFileSystem::ImportThreadData*), EditorFileSystem::ImportThreadData*>::callback_indexed
    (this=0xc0520d0, p_index=1) at ./core/object/worker_thread_pool.h:187
#14 0x000000000ab96182 in WorkerThreadPool::_process_task (this=0xb5caa20, p_task=0xc1753f0) at ./core/object/worker_thread_pool.cpp:95
#15 0x000000000ab96916 in WorkerThreadPool::_thread_function (p_user=0xb6725c0) at ./core/object/worker_thread_pool.cpp:196
#16 0x000000000a5d15ee in Thread::callback (p_caller_id=11, p_settings=..., p_callback=0xab96776 <WorkerThreadPool::_thread_function(void*)>, p_userdata=0xb6725c0) at ./core/os/thread.cpp:64
#17 0x000000000a5e71b1 in std::__invoke_impl<void, void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> (
    __f=@0xb673128: 0xa5d1560 <Thread::callback(unsigned long, Thread::Settings const&, void (*)(void*), void*)>) at /usr/include/c++/14/bits/invoke.h:61
#18 0x000000000a5e707a in std::__invoke<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> (
    __fn=@0xb673128: 0xa5d1560 <Thread::callback(unsigned long, Thread::Settings const&, void (*)(void*), void*)>) at /usr/include/c++/14/bits/invoke.h:96
#19 0x000000000a5e6f35 in std::thread::_Invoker<std::tuple<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> >::_M_invoke<0ul, 1ul--Type <RET> for more, q to quit, c to continue without paging--
, 2ul, 3ul, 4ul> (this=0xb673108) at /usr/include/c++/14/bits/std_thread.h:292
#20 0x000000000a5e5a68 in std::thread::_Invoker<std::tuple<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> >::operator() (
    this=0xb673108) at /usr/include/c++/14/bits/std_thread.h:299
#21 0x000000000a5e49e0 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> > >::_M_run (this=0xb673100) at /usr/include/c++/14/bits/std_thread.h:244
#22 0x000000000b055a34 in execute_native_thread_routine ()
#23 0x00007ffff7d631b7 in start_thread () from /lib64/libc.so.6
#24 0x00007ffff7de539c in clone3 () from /lib64/libc.so.6

It was introduced after 4.3-beta1 with #93006.

CC @Hilderin @RandomShaper @KoBeWi @bruvzg

Steps to reproduce

  1. Extract MRP
  2. rm -rf .godot/ ~/.cache/godot/* to make sure it's importing from scratch, and that previews aren't generated yet (can't exclude the preview gen from triggering the issue, it's a usual suspect)
  3. godot -e -v

Minimal reproduction project (MRP)

ttf-crash.zip

@bruvzg
Copy link
Member

bruvzg commented Jun 14, 2024

Crash log from macOS, seems like process dialog is popped up from the thread (which definitely should not happen):

Thread 0::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x18fc1d7e8 __semwait_signal + 8
1   libsystem_c.dylib             	       0x18fafe568 nanosleep + 220
2   Godot                         	       0x101b9c544 OS_Unix::delay_usec(unsigned int) const + 64 (os_unix.cpp:289)
3   Godot                         	       0x101f882b8 EditorFileSystem::reimport_files(Vector<String> const&) + 3560 (editor_file_system.cpp:2430)
4   Godot                         	       0x101f862fc EditorFileSystem::_update_scan_actions() + 4288 (editor_file_system.cpp:697)
5   Godot                         	       0x101f8b868 EditorFileSystem::_notification(int) + 496 (editor_file_system.cpp:1298)
6   Godot                         	       0x104c35090 Object::notification(int, bool) + 80
7   Godot                         	       0x102c768f0 SceneTree::_process_group(SceneTree::ProcessGroup*, bool) + 436
8   Godot                         	       0x102c74d0c SceneTree::_process(bool) + 824 (scene_tree.cpp:1039)
9   Godot                         	       0x102c75370 SceneTree::process(double) + 228 (scene_tree.cpp:526)
10  Godot                         	       0x10083f91c Main::iteration() + 1012 (main.cpp:4099)
11  Godot                         	       0x1007df23c OS_MacOS::run() + 148 (os_macos.mm:778)
12  Godot                         	       0x100809c08 main + 368 (godot_main_macos.mm:84)
13  dyld                          	       0x18f8d20e0 start + 2360

....

Thread 4 Crashed:
0   libsystem_kernel.dylib        	       0x18fc22a60 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x18fc5ac20 pthread_kill + 288
2   libsystem_c.dylib             	       0x18fb67a30 abort + 180
3   Godot                         	       0x1007e39d4 handle_crash(int) + 2304 (crash_handler_macos.mm:176)
4   libsystem_platform.dylib      	       0x18fc8b584 _sigtramp + 56
5   Godot                         	       0x1022410a0 ProgressDialog::_popup() + 132 (progress_dialog.cpp:143)
6   Godot                         	       0x102241554 ProgressDialog::add_task(String const&, String const&, int, bool) + 616 (progress_dialog.cpp:197)
7   Godot                         	       0x101f8d84c EditorProgress::EditorProgress(String const&, String const&, int, bool) + 20 (editor_node.h:933) [inlined]
8   Godot                         	       0x101f8d84c EditorProgress::EditorProgress(String const&, String const&, int, bool) + 20 (editor_node.h:932) [inlined]
9   Godot                         	       0x101f8d84c EditorFileSystem::_update_scene_groups() + 156 (editor_file_system.cpp:1649)
10  Godot                         	       0x101f8944c EditorFileSystem::_update_pending_scene_groups() + 120
11  Godot                         	       0x101f8ef60 EditorFileSystem::update_files(Vector<String> const&) + 3252 (editor_file_system.cpp:1821)
12  Godot                         	       0x101f8e1c4 EditorFileSystem::update_file(String const&) + 392 (editor_file_system.cpp:1717)
13  Godot                         	       0x102072c74 EditorNode::_resource_saved(Ref<Resource>, String const&) + 84 (editor_node.cpp:6234)
14  Godot                         	       0x1048a6990 ResourceSaver::save(Ref<Resource> const&, String const&, unsigned int) + 900 (resource_saver.cpp:146)
15  Godot                         	       0x10248163c ResourceImporterDynamicFont::import(String const&, String const&, HashMap<StringName, Variant, HashMapHasherDefault, HashMapComparatorDefault<StringName>, DefaultTypedAllocator<HashMapElement<StringName, Variant>>> const&, List<String, DefaultAllocator>*, List<String, DefaultAllocator>*, Variant*) + 4192 (resource_importer_dynamic_font.cpp:231)
16  Godot                         	       0x101f93ac4 EditorFileSystem::_reimport_file(String const&, HashMap<StringName, Variant, HashMapHasherDefault, HashMapComparatorDefault<StringName>, DefaultTypedAllocator<HashMapElement<StringName, Variant>>> const&, String const&, Variant*) + 5344 (editor_file_system.cpp:2166)
17  Godot                         	       0x101f968e4 EditorFileSystem::_reimport_thread(unsigned int, EditorFileSystem::ImportThreadData*) + 120 (editor_file_system.cpp:2339)
18  Godot                         	       0x104c7f320 WorkerThreadPool::_process_task(WorkerThreadPool::Task*) + 320
19  Godot                         	       0x104c7fed0 WorkerThreadPool::_thread_function(void*) + 256 (worker_thread_pool.cpp:196)
20  Godot                         	       0x10472d08c Thread::callback(unsigned long long, Thread::Settings const&, void (*)(void*), void*) + 120 (thread.cpp:64)
21  Godot                         	       0x10472d3f4 decltype(std::declval<void (*)(unsigned long long, Thread::Settings const&, void (*)(void*), void*)>()(std::declval<unsigned long long>(), std::declval<Thread::Settings>(), std::declval<void (*)(void*)>(), std::declval<void*>())) std::__1::__invoke[abi:un170006]<void (*)(unsigned long long, Thread::Settings const&, void (*)(void*), void*), unsigned long long, Thread::Settings, void (*)(void*), void*>(void (*&&)(unsigned long long, Thread::Settings const&, void (*)(void*), void*), unsigned long long&&, Thread::Settings&&, void (*&&)(void*), void*&&) + 12 (invoke.h:340) [inlined]
22  Godot                         	       0x10472d3f4 void std::__1::__thread_execute[abi:un170006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(unsigned long long, Thread::Settings const&, void (*)(void*), void*), unsigned long long, Thread::Settings, void (*)(void*), void*, 2ul, 3ul, 4ul, 5ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(unsigned long long, Thread::Settings const&, void (*)(void*), void*), unsigned long long, Thread::Settings, void (*)(void*), void*>&, std::__1::__tuple_indices<2ul, 3ul, 4ul, 5ul>) + 16 (thread.h:227) [inlined]
23  Godot                         	       0x10472d3f4 void* std::__1::__thread_proxy[abi:un170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(unsigned long long, Thread::Settings const&, void (*)(void*), void*), unsigned long long, Thread::Settings, void (*)(void*), void*>>(void*) + 52 (thread.h:238)
24  libsystem_pthread.dylib       	       0x18fc5af94 _pthread_start + 136
25  libsystem_pthread.dylib       	       0x18fc55d34 thread_start + 8

@bruvzg
Copy link
Member

bruvzg commented Jun 14, 2024

A quick fix for the crash (switches to background progress if called for non-main thread), but it's probably something wrong with the FS update logic as well:

 
 struct EditorProgress {
 	String task;
-	bool step(const String &p_state, int p_step = -1, bool p_force_refresh = true) { return EditorNode::progress_task_step(task, p_state, p_step, p_force_refresh); }
+	bool step(const String &p_state, int p_step = -1, bool p_force_refresh = true) { 
+		if (Thread::is_main_thread()) {
+			return EditorNode::progress_task_step(task, p_state, p_step, p_force_refresh);
+		} else {
+			EditorNode::progress_task_step_bg(task, p_step);
+			return false;
+		}
+	}
 	EditorProgress(const String &p_task, const String &p_label, int p_amount, bool p_can_cancel = false) {
-		EditorNode::progress_add_task(p_task, p_label, p_amount, p_can_cancel);
+		if (Thread::is_main_thread()) {
+			EditorNode::progress_add_task(p_task, p_label, p_amount, p_can_cancel);
+		} else {
+			EditorNode::progress_add_task_bg(p_task, p_label, p_amount);
+		}
 		task = p_task;
 	}
-	~EditorProgress() { EditorNode::progress_end_task(task); }
+	~EditorProgress() {
+		if (Thread::is_main_thread()) {
+			EditorNode::progress_end_task(task);
+		} else {
+			EditorNode::progress_end_task_bg(task);
+		}
+	}
 };
 
 class EditorPluginList : public Object {

@Hilderin
Copy link
Contributor

Hilderin commented Jun 14, 2024

I looked into it. Effectively, the replacement of the return by a continue caused the problem.
Importing a ttf call update_files but it does not exists in the file system. With the return, _update_pending_script_classes and _update_pending_scene_groups were never called.
image

I'll create a PR to fix that soon.

I also think that the suggestion from @bruvzg could be a really nice fail safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment