-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
Signals appear to be broken to some extent #85528
Comments
I am experiencing this exact same issue with 4.2. Relaunching my project in 4.1 appears to revert the signals back to their working condition, but when in 4.2 some of the previously working signals just stop working. Not sure exactly what is causing it as I am not getting error output and many of my signals are still firing, however in relation to the post here I can at least say one of my signals that no longer works in 4.2 does interact with a dictionary object so perhaps that is related. |
I can add to this, I have a project in 4.1 that has signals hooked up to
The call itself is very simple, and just fires another signal. |
Just upgraded my project and also getting a few "Cannot connect to '<signal_name>': the provided callable is not valid" errors. |
After some tracking, it seems to be the changes made in #82695 that are causing the issues, or at least the ones I'm running into. Specifically the additional "is_valid" check on line 1322. Looks like the behavior difference between a connection without additional arguments and one with them has to do with the Callable being a CallableCustom when args are used. On the check at line 1322, for CallableCustoms it returns false since it checks if the method exists. When called without additional arguments, from what I can see, no checks ensuring method existence are done, so it's able to run without issue. |
In 4.2.1, I find that the "signals fail to connect" issue reliably shows up if there is any error in my script and I am trying to add an argument to a signal. Even a previously connected signal will disconnect if an argument is added prior and any error in the script exists. If no errors exist, then I can successfully attach signals with arguments; whether initially or edited later. It is a bit frustrating, honestly. |
It also seems that built-in signals with arguments do not connect in 4.2 |
Any hope of a fix in 4.3? |
I haven’t had further issues since 4.3 dev3 and I believe I saw something was changed in an update that should have at least significantly helped with this. I’d try out 4.3 and see if you still run into this. Unless you already are then I’m sorry to hear that :(
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Neven Prašnikar ***@***.***>
Sent: Tuesday, March 12, 2024 7:09:39 AM
To: godotengine/godot ***@***.***>
Cc: Knight-XAura ***@***.***>; Author ***@***.***>
Subject: Re: [godotengine/godot] Signals appear to be broken to some extent (Issue #85528)
Any hope of a fix in 4.3?
—
Reply to this email directly, view it on GitHub<#85528 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BBLPRCXFJG4Q556BGUVFCXDYX3O7HAVCNFSM6AAAAABAASRA2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJRGM4TMNJTGQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I came across a somewhat similar issue and am able to replicate it very easily. I've created a repo with a reproduction of what I'm experiencing here: https://github.com/hugoburguete/godot-4.3-signal-connect-bug I'm not sure if this is user error but the issue I'm having is that when I attach a custom argument to a signal, I get the error
Screencast.from.2024-09-17.11-35-36.webmGodot version: v4.3.stable.mono.official [77dcf97] |
Godot version
v4.2.rc2.official [1ba920f]
System information
Godot v4.2.rc2 - macOS 14.1.1 - GLES3 (Compatibility) - Apple M1 - Apple M1 (8 Threads)
Issue description
I've messed around a lot with signals and until now I've NEVER had anything remotely strange or buggy happen other then the occasional signal is working, just the editor not showing the symbol next to the function. BUT I started a new project starting with Godot 4.2.rc2 and I've run into crashes, signals not connecting at all, custom arguments disappearing or turning to there default value.
Crashes: This that I noticed so far is strictly in some cases where you attempt to set a dictionary or array value as an Object type and set in my case as New PackedScene. This doesn't happen too frequently
Signals not connecting/randomly disappearing: Right after pressing connect to finalize there is no icon next to node in node tree and the connection is missing from signals tab and the signal doesn't work during runtime. Other times the signals have all just randomly disappeared, every single one from a scene file I have not touched anything but the script file for it. This happens not too frequent unless you combine it with the next issue
--- When signals fail to connect I see to get something like this: Cannot connect to 'pressed': the provided callable is not valid: VBoxContainer(Main.gd)::_on_world_pressed but if I do it again the exact same thing it works, but also if I don't add an argument during signal created with Advanced it seems to work reliably. Sometimes it adds the signal function and sometimes it don't. If it does the first time it will tell me this even though when it gives me this, everything is finally working...til it randomly breaks: res://Main.gd:70 - Parse Error: Function "_on_world_pressed" has the same name as a previously declared function.
Custom Arguments: This seems to be mostly surrounding Arrays and dictionaries. When you lose data for example New PackedScene like in the crashes if you set it's Path and it doesn't work if you go back to try and reset this, you can't til you close the project (I'm pretty sure closing the scene wasn't enough if I even did this) Then you can try again. Trying to use a signal with a custom argument of Array or Dictionary pretty much always fails and if it doesn't the argument types data is null again instead of what you set it to.
All of these issues I have recordings of happening. I'll hopefully be going through those this weekend and maybe I can share if there is disbelief this is happening how I claim, since it does sound absurd lol
Also I know I tried to break these up into groups as much as possible, but as you can tell a lot of them have similar things going on or a similar situations with a slight variation has a whole other issues.
Steps to reproduce
Crashes: May happen sometimes when using Advanced Signal connections and adding a Agument of Type Array or Dictionary when it's Type is set to Object and you click New PackedScene (may happen with others, this is just what I was trying to do)
Signals not connect/randomly disappearing: This kinda just happens when connecting signals there doesn't seem to be any solid reason or way to cause it to happen. Most probable way I think I got this to fail completed was using the example for Crashes, but may need to fill in the path.
Custom Arguments: if you set Types and Values for Arrays and Dictionaries they don't stay
Minimal reproduction project
Any project very bare bones will cause this to happen. No need to provide as it takes actions being done to reproduce that providing a project itself won't show or do for you.
The text was updated successfully, but these errors were encountered: