-
-
Notifications
You must be signed in to change notification settings - Fork 20k
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
Cannot connect to 'changed': the provided callable is not valid: ShaderMaterial::_shader_changed #90565
Comments
and there is no a method or variable call _shader_changed.(has check both addon and project) |
Can you please provide more info about how to reproduce this behavior? A minimal reproduction project would help to investigate this issue. |
Apparently it happens when my plugin is enabled in Godot 4.3 beta5: Zylann/godot_heightmap_plugin#433, using the Forward+ renderer. I ran a quick debugging session and this is the stack trace of the error:
It's still hard to find out what that call is. There is no GDScript involved in here. Also, this is a deferred call, so this doesn't tell what the instigator is. My only guess is it could come from this: void Resource::connect_changed(const Callable &p_callable, uint32_t p_flags) {
if (ResourceLoader::is_within_load() && !Thread::is_main_thread()) {
// Let the check and connection happen on the main thread, later, since signals are not thread-safe.
callable_mp(this, &Resource::connect_changed).call_deferred(p_callable, p_flags);
return;
} Which is equally unspecific. My plugin is not using threaded loading either. |
I can confirm this error in some of my projects (Godot 4.3.dev6)... I worked on it for 4 hours now to understand what happens and I stripped down to a MRP for you guys. In the video below you can see that adding my component in the tree (instance of it using Ctrl + Shift + A) produces the error when the project is loaded, and removing it from the tree makes the error to disappear. 2024-05-02.21-14-40.mp4Also, I found out that simply opening the component scene or shader code in the editor (without even instancing the scene in the tree) triggers the error as well. To completely remove the error, I have to close the shader script and close the component scene in the editor as well. Having the associated GDScript code open in the editor does not trigger the error though, only the shader code or the scene. 2024-05-02.21-35-01.mp4The component I found to work as producing the error is a Control derived node with a MaterialShader in it and a shader code associated and a GDScript to interact with the shader as well. The component is a tool script, but removing the I don't know exactly if the problem is the GDScript interaction with the shader, the shader itself or a resource linked to the component... Each time I tried to strip down further the component, the error disappeared... I hope this will help you to find the source of the error. By the way, you can see in the videos that the error in the Godot output is sometimes not displayed, I have to toggle a button to make it appear... Probably another bug, if you want me to create an issue for that, just ask, but it only appears with this shader error thing, so maybe it is related (I mean that other errors in other projects are correctly displayed as far as I'm aware of)... |
Thanks for the detailed investigation and MRP! Sorry I missed this report earlier, I might have been able to save you some time by pointing out that it's a recent regression, and could thus be bisected. It was introduced in 4.3-dev5, so the culprit should be a PR from https://godotengine.github.io/godot-interactive-changelog/#4.3-dev5 I can reproduce the error in my own recent game jam project: https://github.com/johncoffee/ngj-2024 But the provided MRP will make it much easier to debug and fix the issue, so the effort was well spent. |
Bisected to #88561, CC @RandomShaper. |
Tested versions
4.3.dev5
System information
windows10 godot4.3.dev5
Issue description
Cannot connect to 'changed': the provided callable is not valid: ShaderMaterial::_shader_changed
this is the full error message, no more info
Steps to reproduce
no
Minimal reproduction project (MRP)
no
The text was updated successfully, but these errors were encountered: