Navigation Menu

Skip to content
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

"signal already connected" error in inherited scenes #6106

Closed
Tracked by #4778
ProbDenis opened this issue Aug 10, 2016 · 13 comments
Closed
Tracked by #4778

"signal already connected" error in inherited scenes #6106

ProbDenis opened this issue Aug 10, 2016 · 13 comments

Comments

@ProbDenis
Copy link
Contributor

ProbDenis commented Aug 10, 2016

Godot version: 2.1

Issue description (what happened, and what was expected):
When running an inherited scene, any signals that are connected in the original scene throw a "signal already connected" error. It looks like in an inherited scene, Godot tries to connect the signals twice.

Steps to reproduce:

  1. Create a new scene, add at least one node and a script.
  2. In the "signals" tab, connect any node signal to a script function.
  3. Save the scene and create a new scene that inherits from it.
  4. Run the original scene -> no error.
  5. Run the inherited scene -> "signal already connected" error.

Link to minimal example project:
signal_inherited_scene.zip

@Keyaku
Copy link
Contributor

Keyaku commented Aug 12, 2016

Happens in my own project, can confirm.

@mefihl
Copy link

mefihl commented Aug 18, 2016

In my project too. When enable "Editable Children" on inherited scenes, signal from this scene (tscn):
[connection signal="finished" from="InfoTextAnim" to="." method="_on_InfoTextAnim_finished"] is add to main scene (tscn). After this i'm get error "Signal 'finished' alredy connected to given method..." when run main scene.

@Zylann
Copy link
Contributor

Zylann commented Oct 7, 2016

I get this signal without running the game, in the editor, by simply opening the scene that inherit the base, if the base has connections.
Also reported on Q&A: https://godotengine.org/qa/8637/signal-errors

@vonflyhighace2
Copy link

It seems that if you enable editable children on the instance this error appears. disabling it fixes the problem.

@Zylann
Copy link
Contributor

Zylann commented Nov 12, 2016

I ran into this error again into my project, Godot 2.1 Windows 10 64 bits:

  1. Create a scene and connect signals within it
  2. Instance it into another scene
  3. Enable "editable children"
  4. Run the scene: the error occurs.

ERROR: Signal 'body_enter'' already connected to given method '_on_lethal_area_body_enter' in that object.
At: core\object.cpp:1436

I get 10 of them everytime I load a level in my game now, because I overrided an unrelated parameter in 10 instances :p

@odragora
Copy link

odragora commented Mar 3, 2017

Same happening in my project, like in Zylann report.

Godot 2.1.2 Windows 10 64 bit

@Asaurus1
Copy link

I still seem to be having the same issue in Godot 3.2.1. I have an child scene and when editable children is enabled, I get "Signal *** is already connected to given method ****** in that object" generated for each child object with the child scene. This goes away when the child scene is not editable.

@luizgcorreia
Copy link

I still seem to be having the same issue in Godot 3.2.1. I have an child scene and when editable children is enabled, I get "Signal *** is already connected to given method ****** in that object" generated for each child object with the child scene. This goes away when the child scene is not editable.

I had the same issue in Godot 3.2.1. In my case, I have two scenes that inherit from a base scene, with one of the scenes as a child of the other. When "editable children" is enabled I get the same "already connected" signal.

@FrankJRix
Copy link

Same issue in the latest stable version on Windows 10, editable children already disabled.

@Hansel-Dsilva
Copy link

I also have the same issue and since (to my current level of understanding) my 2 "error-causing" button_up signals were built-in and were connected via the node's signal tab, I'm assuming It's a Godot bug. Since it doesn't stop the game or anything, can I safely pretend it's a red warning and ignore it?

@Shfty
Copy link

Shfty commented Jun 22, 2020

I'm seeing this issue as well - I have several projectile scenes that inherit from a single base containing a hitbox::did_damage -> projectile::destroy signal, and this error is thrown each time one is instanced by game code.

@SaffronStreams
Copy link

I am also suffering from this problem. Using Godot 3.2 stable (longer term project so haven't switched yet, waiting for 3.2.3 stable to fix the polygon2D clipping problem)

The error pops up right after I change scenes, going from one level to the next via get_tree().change_scene(). These levels all extend my Level class, where I connect the signals. Maybe there's a desynch between disconnecting the signals of the old scene and connecting the new ones?

My scenes had editable children, but I made them uneditable again. The problem persists.

The error I get is:

E 0:01:08.592 connect: Signal 'freeze_player' is already connected to given method 'on_freeze_player' in that object.
<C++ Error> Method failed. Returning: ERR_INVALID_PARAMETER
<C++ Source> core/object.cpp:1464 @ connect()
LowerGuallidurth.gd:27 @ make_connections()
Level.gd:20 @ _ready()
LowerGuallidurth.gd:14 @ _ready()

Looking up that line in the source (not versed in C++) it looks to have something to do with it?

void Object::_clear_internal_resource_paths(const Variant &p_var) {
switch (p_var.get_type()) {

@akien-mga
Copy link
Member

To those reporting issues with Godot 3.2.1 or later, please open a new, dedicated issue for what the current problem is (with a minimal project that can be used to reproduce it).

This bug was fixed and closed 3 years ago. A similar error doesn't mean that it's the same bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests