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
Saving a .glsl file containing a compute shader in an external editor after said compute shader failed to compile once results in a crash of the Godot editor.
The following error appears in the console:
Godot Engine v4.4.beta2.official.a013481b0 - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 566.36 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 4060
Editing project: [...]/test-cellular-automaton
Godot Engine v4.4.beta2.official.a013481b0 - https://godotengine.org
Vulkan 1.3.289 - Forward+ - Using Device #0: NVIDIA - NVIDIA GeForce RTX 4060
ERROR: Parameter "p_parent" is null.
at: reparent (scene/main/node.cpp:1958)
================================================================
CrashHandlerException: Program crashed with signal 11
Engine version: Godot Engine v4.4.beta2.official (a013481b0911e59cc3f3dea7ebb732450c3e1460)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
Here is the compute shader I use:
#[compute]
#version450// Invocations in the (x, y, z) dimensionlayout(local_size_x =8, local_size_y =8, local_size_z =1) in;
layout(set =0, binding =0, std140) uniform Parameters {
vec4 p; // p.x -> height
}
parameters;
// Input bufferlayout(set =0, binding =1, std430) restrictreadonlybuffer Previous {
int data[];
}
previous;
// Output bufferlayout(set =0, binding =2, std430) restrictwriteonlybuffer Next {
int data[];
}
next;
// The code we want to execute in each invocationvoid main() {
uint idx = gl_GlobalInvocationID.x *uint(parameters.p.x) + gl_GlobalInvocationID.y;
next.data[idx] *= previous.data[idx];
}
Steps to reproduce
Starting from an new empty project.
Open the Godot project folder in an external editor (VS Code).
Add a new test.glsl compute shader with probably any content. Mine is provided below.
Save, go in godot, it is correctly imported.
Make a valid modification, save, go to Godot, it is re-imported and everything works fine.
Go back to the external editor and make an invalid modification resulting in a failed compilation.
Go back to Godot, you are notified of the issue with your shader.
Now go back to the external editor and do any modification (valid or not) and save. Going back to Godot, the editor will simply crash.
I can reproduce this. Here is a backtrace (on 9ee1873):
Thread 1 "godot.linuxbsd." received signal SIGSEGV, Segmentation fault.
Viewport::is_input_disabled (this=this@entry=0x0) at scene/main/viewport.cpp:3417
3417 return disable_input;
0 in Viewport::is_input_disabled of scene/main/viewport.cpp:3417
1 in ProgressDialog::_popup of editor/progress_dialog.cpp:173
2 in ProgressDialog::add_task of editor/progress_dialog.cpp:208
3 in EditorProgress::EditorProgress of editor/editor_node.cpp:191
4 in EditorFileSystem::reimport_files of editor/editor_file_system.cpp:3073
5 in EditorFileSystem::_update_scan_actions of editor/editor_file_system.cpp:962
6 in EditorFileSystem::_notification of editor/editor_file_system.cpp:1691
7 in Object::notification of core/object/object.cpp:911
8 in SceneTree::_process_group of scene/main/scene_tree.cpp:1060
9 in SceneTree::_process of scene/main/scene_tree.cpp:1137
10 in SceneTree::process of scene/main/scene_tree.cpp:578
11 in Main::iteration of main/main.cpp:4473
12 in OS_LinuxBSD::run of platform/linuxbsd/os_linuxbsd.cpp:962
13 in main of platform/linuxbsd/godot_linuxbsd.cpp:85
Also, I noticed that the ProgressDialog is not inside the tree when _popup() is called. So get_last_exclusive_window() returns nullptr.
Tested versions
System information
Godot v4.4.beta2 - Windows 11 (build 26100) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4060 (NVIDIA; 32.0.15.6636) - AMD Ryzen 5 5600X 6-Core Processor (12 threads)
Issue description
Saving a
.glsl
file containing a compute shader in an external editor after said compute shader failed to compile once results in a crash of the Godot editor.The following error appears in the console:
Here is the compute shader I use:
Steps to reproduce
Starting from an new empty project.
test.glsl
compute shader with probably any content. Mine is provided below.Minimal reproduction project (MRP)
test-cellular-automaton-4.4.zip
The text was updated successfully, but these errors were encountered: