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
Reproducible in 4.3.beta1 (mono) and 4.3.beta2 (mono)
System information
Windows 11 -Godot v4.3.beta1 - Vulkan (Forward+)
Issue description
After updating to 4.3 beta 1 I have had issues with scenes that have connections including binds throwing several errors and deleting all these connections in the editor. This occurs if the script with the callback method extends another script that has the callback defined but is not defined in itself. If the connection does not have any binds it works fine but once any are added it breaks.
I believe this is relevant to #91630 that appears to have fixed the problems in base scripts but not in extended classes.
Steps to reproduce
Create a script/class with the desired callback and input values.
Create a new script that extends the previous script.
Add the extended script to a node.
On this node (or any other node) connect one of the signals to this node's callback.
If the signal is connected to the callback without any binds it is connected successfully.
If the signal is connected to the callback with one or more binds the connection is deleted and the error
"Cannot connect to 'signal': the provided callable is not valid: Node(Node.cs)::_Callback" is thrown.
To use the MRP open "node.tscn", add a connection to any signal on this node to itself with the "_OnTest" callable and add any bind. If a bind is not added it works correctly.
The text was updated successfully, but these errors were encountered:
When connecting to a signal, the created Callable is invalid (is_valid() returns false) because when checking target->has_method() it returns false.
This is calling Object::has_method which calls ScriptInstance::has_method. In this case the script instance is a PlaceHolderScriptInstance because the script is not marked as tool.
The PlaceHolderScriptInstance::has_method implementation only calls Script::has_method on the corresponding script (GDScript or CSharpScript), but doesn't iterate the base scripts. This is unlike the GDScriptInstance::has_method and CSharpScriptInstance::has_method implementations that do iterate the base scripts.
So I think PlaceHolderScriptInstance::has_method should be fixed to iterate the base scripts, like the GDScriptInstance and CSharpScriptInstance implementations do.
Tested versions
System information
Windows 11 -Godot v4.3.beta1 - Vulkan (Forward+)
Issue description
After updating to 4.3 beta 1 I have had issues with scenes that have connections including binds throwing several errors and deleting all these connections in the editor. This occurs if the script with the callback method extends another script that has the callback defined but is not defined in itself. If the connection does not have any binds it works fine but once any are added it breaks.
I believe this is relevant to #91630 that appears to have fixed the problems in base scripts but not in extended classes.
Steps to reproduce
"Cannot connect to 'signal': the provided callable is not valid: Node(Node.cs)::_Callback" is thrown.
Minimal reproduction project (MRP)
callable_mrp.zip
To use the MRP open "node.tscn", add a connection to any signal on this node to itself with the "_OnTest" callable and add any bind. If a bind is not added it works correctly.
The text was updated successfully, but these errors were encountered: