-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Object-less callables rejected by Object::connect
et al
#81887
Comments
Does simply removing the check for a valid object completely fix this or is there something more going on? |
I think we probably want to replace those checks with The examples in the description seem to be doing their own manual version of a validity check by checking If I had to guess what happened here, maybe there didn't used to be a |
Godot version
master, e3e2528
System information
linux
Issue description
Creating this issue to keep track of something discovered while working working on #79005.
Basically, in some places Godot has checks for
object
as a way to check if a callable is valid. This seems wrong, especially for custom callables, which may not actually have an associated object. While this doesn't seem to be a problem within the engine itself, it can be a problem for extensions. In my extension I had to use a workaround that creates an object that exists for no reason other than to pass those checks.Here are some examples of object-less callables being rejected:
Object::emit_signalp
Object::connect
Object::_disconnect
I haven't looked to see if there are more cases (I merely searched
object.cpp
forget_object()
).Original comments from #79005:
Steps to reproduce
N/A
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: