Concerned version
4.1-v0.0.17-alpha-20231003
Problem
It seems that any function passing arguments makes the application crash, both on editor connection and using the .connect(str, fn) method
What works:
- Connect a signal via editor as long the signal doesn't return arguments (0 args)
- Connect a signal via code as long the signal doesn't return arguments (0 args)
- Connect a signal via code and pass an anonymous function to trigger the method with an argument
this.connect("sig_name", () => { this.myMethod(myValueHere) })
What doesn't work:
- Connect a signal via editor that passes at least one argument (full freeze)
- Connect a signal via code that returns arguments (full freeze)
this.connect("input_event", this.myMethod) // returns 5 arguments
- Connect a signal via code that passes at least one argument as third parameter (argument ignored)
this.connect("sig_name", this.myMethod, [myValue])
- Connect a signal via code that passes at least one argument with bind (argument ignored)
this.connect("sig_name", this.myMethod.bind(myValue))
Observations
- It seems that after re-establishing binding_script.js with some modifications the connect method in code passes the arguments array
// From
return godot_object_connect.apply(this, [signal, target, method_name, params, flags]);
// To
return godot_object_connect.apply(this, [signal, target[method_name], params, flags]);
/// Apply this to all Object.defineProperty return statements
- Connecting a method on the editor doesn't match the number of arguments since
MethodInfo doesn't set the number of arguments in /quickjs/quickjs_binder.cpp:L1871

Note : The parameters seem to be received by the functions since they are logged on the terminal that runs godot but freezes the program completly after printing them
Concerned version
4.1-v0.0.17-alpha-20231003
Problem
It seems that any function passing arguments makes the application crash, both on editor connection and using the
.connect(str, fn)methodWhat works:
this.connect("sig_name", () => { this.myMethod(myValueHere) })What doesn't work:
this.connect("input_event", this.myMethod) // returns 5 argumentsthis.connect("sig_name", this.myMethod, [myValue])this.connect("sig_name", this.myMethod.bind(myValue))Observations
MethodInfodoesn't set the number of arguments in /quickjs/quickjs_binder.cpp:L1871Note : The parameters seem to be received by the functions since they are logged on the terminal that runs godot but freezes the program completly after printing them