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

[4.4-beta1] Loading compute shader on Linux crashes the editor #101611

Closed
bearlikelion opened this issue Jan 15, 2025 · 5 comments · Fixed by #101636
Closed

[4.4-beta1] Loading compute shader on Linux crashes the editor #101611

bearlikelion opened this issue Jan 15, 2025 · 5 comments · Fixed by #101636

Comments

@bearlikelion
Copy link

Tested versions

  • Reproducible in 4.4-beta 1

System information

Linux - Vulcan (Forward+) - Nvidia driver 550.142

Issue description

Opening the following project: https://github.com/2Retr0/GodotOceanWaves/ crashes 4.4-beta-1 on Linux.

Error from --verbose

ERROR: In Object of type 'ShaderMaterial': Attempt to connect nonexistent signal 'emission_shape_changed' to callable 'GPUParticles3D::update_gizmos'.
   at: connect (core/object/object.cpp:1439)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.4.beta.custom_build (4ce466d7fa79e351d4295d5bb47e3266089c3a59)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x45320) [0x7f1af9a45320] (??:0)
[2] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x41ec0d4) [0x59e628fef0d4] (??:0)
[3] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x2d1920d) [0x59e627b1c20d] (??:0)
[4] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x298e58c) [0x59e62779158c] (??:0)
[5] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x3a42304) [0x59e628845304] (??:0)
[6] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x2a08180) [0x59e62780b180] (??:0)
[7] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x2599955) [0x59e62739c955] (??:0)
[8] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x58875c5) [0x59e62a68a5c5] (??:0)
[9] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x55323d8) [0x59e62a3353d8] (??:0)
[10] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x587f9f1) [0x59e62a6829f1] (??:0)
[11] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x587fceb) [0x59e62a682ceb] (??:0)
[12] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x33fd6c8) [0x59e6282006c8] (??:0)
[13] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x7449a1) [0x59e6255479a1] (??:0)
[14] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x6a31a1) [0x59e6254a61a1] (??:0)
[15] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x6726d8) [0x59e6254756d8] (??:0)
[16] /lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca) [0x7f1af9a2a1ca] (??:0)
[17] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b) [0x7f1af9a2a28b] (??:0)
[18] /home/mark/Source/godot/bin/godot.linuxbsd.editor.x86_64(+0x6a0045) [0x59e6254a3045] (??:0)
-- END OF BACKTRACE --
================================================================

Steps to reproduce

Git clone https://github.com/2Retr0/GodotOceanWaves/
Open project in Godot 4.4-beta 1

Minimal reproduction project (MRP)

https://github.com/2Retr0/GodotOceanWaves/

@akien-mga akien-mga changed the title [4.4-beta-1] Loading compute shader on Linux crashes the editor [4.4-beta1] Loading compute shader on Linux crashes the editor Jan 15, 2025
@akien-mga akien-mga added this to the 4.4 milestone Jan 15, 2025
@akien-mga
Copy link
Member

Confirmed, it's a regression in beta1-candidate (https://github.com/godotengine/godot-builds/releases/tag/4.4-beta1-candidate - this is a temporary build, we'll redo beta1 tomorrow with some more fixes), the project doesn't crash in 4.4-dev7.

Backtrace:

ERROR: In Object of type 'ShaderMaterial': Attempt to connect nonexistent signal 'emission_shape_changed' to callable 'GPUParticles3D::update_gizmos'.
   at: connect (./core/object/object.cpp:1439)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.4.beta.custom_build (4ce466d7fa79e351d4295d5bb47e3266089c3a59)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib64/libc.so.6(+0x1a090) [0x7f78f737b090] (??:0)
[2] ParticleProcessMaterial::get_emission_shape() const (/home/akien/Godot/godot/./scene/resources/particle_process_material.cpp:1683)
[3] Particles3DEmissionShapeGizmoPlugin::redraw(EditorNode3DGizmo*) (/home/akien/Godot/godot/./editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp:90 (discriminator 1))
[4] EditorNode3DGizmo::redraw() (/home/akien/Godot/godot/./editor/plugins/node_3d_editor_gizmos.cpp:84)
[5] Node3D::add_gizmo(Ref<Node3DGizmo>) (/home/akien/Godot/godot/./scene/3d/node_3d.cpp:741)
[6] Node3DEditor::_request_gizmo(Object*) (/home/akien/Godot/godot/./editor/plugins/node_3d_editor_plugin.cpp:8391 (discriminator 2))
[7] Node3DEditor::_request_gizmo_for_id(ObjectID) (/home/akien/Godot/godot/./editor/plugins/node_3d_editor_plugin.cpp:8409)
[8] void call_with_variant_args_helper<__UnexistingClass, ObjectID, 0ul>(__UnexistingClass*, void (__UnexistingClass::*)(ObjectID), Variant const**, Callable::CallError&, IndexSequence<0ul>) (/home/akien/Godot/godot/./core/variant/binder_common.h:320)
[9] void call_with_variant_args_dv<__UnexistingClass, ObjectID>(__UnexistingClass*, void (__UnexistingClass::*)(ObjectID), Variant const**, int, Callable::CallError&, Vector<Variant> const&) (/home/akien/Godot/godot/./core/variant/binder_common.h:463)
[10] MethodBindT<ObjectID>::call(Object*, Variant const**, int, Callable::CallError&) const (/home/akien/Godot/godot/./core/object/method_bind.h:345 (discriminator 1))
[11] Object::callp(StringName const&, Variant const**, int, Callable::CallError&) (/home/akien/Godot/godot/./core/object/object.cpp:849 (discriminator 1))
[12] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/akien/Godot/godot/./core/variant/callable.cpp:69 (discriminator 1))
[13] CallQueue::_call_function(Callable const&, Variant const*, int, bool) (/home/akien/Godot/godot/./core/object/message_queue.cpp:221)
[14] CallQueue::flush() (/home/akien/Godot/godot/./core/object/message_queue.cpp:270)
[15] SceneTree::physics_process(double) (/home/akien/Godot/godot/./scene/main/scene_tree.cpp:538)
[16] Main::iteration() (/home/akien/Godot/godot/main/main.cpp:4462 (discriminator 3))
[17] ProgressDialog::_update_ui() (/home/akien/Godot/godot/./editor/progress_dialog.cpp:152)
[18] ProgressDialog::task_step(String const&, String const&, int, bool) (/home/akien/Godot/godot/./editor/progress_dialog.cpp:239)
[19] EditorNode::progress_task_step(String const&, String const&, int, bool) (/home/akien/Godot/godot/./editor/editor_node.cpp:4972)
[20] EditorProgress::step(String const&, int, bool) (/home/akien/Godot/godot/./editor/editor_node.cpp:181)
[21] EditorNode::_load_editor_layout() (/home/akien/Godot/godot/./editor/editor_node.cpp:5345 (discriminator 4))
[22] EditorNode::_sources_changed(bool) (/home/akien/Godot/godot/./editor/editor_node.cpp:1164)
[23] void call_with_variant_args_helper<EditorNode, bool, 0ul>(EditorNode*, void (EditorNode::*)(bool), Variant const**, Callable::CallError&, IndexSequence<0ul>) (/home/akien/Godot/godot/./core/variant/binder_common.h:320)
[24] void call_with_variant_args<EditorNode, bool>(EditorNode*, void (EditorNode::*)(bool), Variant const**, int, Callable::CallError&) (/home/akien/Godot/godot/./core/variant/binder_common.h:430)
[25] CallableCustomMethodPointer<EditorNode, void, bool>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/akien/Godot/godot/./core/object/callable_method_pointer.h:109)
[26] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/akien/Godot/godot/./core/variant/callable.cpp:57)
[27] Object::emit_signalp(StringName const&, Variant const**, int) (/home/akien/Godot/godot/./core/object/object.cpp:1237)
[28] Node::emit_signalp(StringName const&, Variant const**, int) (/home/akien/Godot/godot/./scene/main/node.cpp:4021)
[29] Error Object::emit_signal<bool>(StringName const&, bool) (/home/akien/Godot/godot/./core/object/object.h:933)
[30] EditorFileSystem::_notification(int) (/home/akien/Godot/godot/./editor/editor_file_system.cpp:1723)
[31] EditorFileSystem::_notificationv(int, bool) (/home/akien/Godot/godot/./editor/editor_file_system.h:145 (discriminator 14))
[32] Object::notification(int, bool) (/home/akien/Godot/godot/./core/object/object.cpp:914)
[33] SceneTree::_process_group(SceneTree::ProcessGroup*, bool) (/home/akien/Godot/godot/./scene/main/scene_tree.cpp:1060)
[34] SceneTree::_process(bool) (/home/akien/Godot/godot/./scene/main/scene_tree.cpp:1132 (discriminator 2))
[35] SceneTree::process(double) (/home/akien/Godot/godot/./scene/main/scene_tree.cpp:580)
[36] Main::iteration() (/home/akien/Godot/godot/main/main.cpp:4506 (discriminator 3))
[37] OS_LinuxBSD::run() (/home/akien/Godot/godot/platform/linuxbsd/os_linuxbsd.cpp:962 (discriminator 1))
[38] godot-git(main+0x14b) [0x6624031] (/home/akien/Godot/godot/platform/linuxbsd/godot_linuxbsd.cpp:85)
[39] /lib64/libc.so.6(+0x3248) [0x7f78f7364248] (??:0)
[40] /lib64/libc.so.6(__libc_start_main+0x8b) [0x7f78f736430b] (??:0)
[41] godot-git(_start+0x25) [0x6623e25] (??:?)
-- END OF BACKTRACE --
================================================================

@clayjohn
Copy link
Member

From the backtrace, it seems to be a regression from #100113

@akien-mga
Copy link
Member

CC @paddy-exe @Geometror @Calinou

@bruvzg
Copy link
Member

bruvzg commented Jan 16, 2025

While the fix for the crash seems to be straightforward (adding null check), after adding it the MRP project is still broken and constantly spamming following errors. But this is not a recent regression and also reproducible with dev7:

ERROR: Uniforms supplied for set (0):
Set: 0 Binding: 0 Type: Image Writable: Y Length: 1
are not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:
Set: 0 Binding: 0 Type: Image Writable: N Length: 1
Set: 1 Binding: 0 Type: StorageBuffer Writable: Y Length: 0
   at: compute_list_dispatch (servers/rendering/rendering_device.cpp:5250)

@bruvzg
Copy link
Member

bruvzg commented Jan 16, 2025

after adding it the MRP project is still broken and constantly spamming following errors

This seems to be a Metal renderer specific issue, with Vulkan it seems to be OK, so the null check might be all that is necessary (prints few warnings on start but looks functional):

  WARNING: drivers/vulkan/rendering_context_driver_vulkan.cpp:639 - VALIDATION - Message Id Number: 0 | Message Id Name: mvk-warn
  WARNING: 	VK_ERROR_FEATURE_NOT_PRESENT: Metal does not support disabling primitive restart.
  WARNING: 	Objects - 1
  WARNING: 		Object[0] - VK_OBJECT_TYPE_PIPELINE, Handle 13020227072
  ERROR: drivers/vulkan/rendering_context_driver_vulkan.cpp:642 - VALIDATION - Message Id Number: 0 | Message Id Name: mvk-error
  ERROR: 	VK_INCOMPLETE: Error writing pipeline cache data: Failed to write 4 bytes to output stream! Wrote 0
  ERROR: 	Objects - 1
  ERROR: 		Object[0] - VK_OBJECT_TYPE_PIPELINE_CACHE, Handle 105553134348448
  WARNING: drivers/vulkan/rendering_context_driver_vulkan.cpp:639 - VALIDATION - Message Id Number: 0 | Message Id Name: mvk-warn
  WARNING: 	VK_ERROR_FEATURE_NOT_PRESENT: Metal does not support disabling primitive restart.
  WARNING: 	Objects - 1
  WARNING: 		Object[0] - VK_OBJECT_TYPE_PIPELINE, Handle 14160633344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Immediate Blocker
Development

Successfully merging a pull request may close this issue.

4 participants