EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.
http://esotericsoftware.com/
Other
4.41k stars 2.91k forks source link

[godot] Getting "Signal 'skeleton_data_changed' is already connected to given callable ..." error when opening scenes with SpineSprite #2473

Closed yoont4 closed 1 month ago

yoont4 commented 8 months ago

When I open/reload a scene that contains a SpineSprite, I get a ton of these errors printed out: Signal 'skeleton_data_changed' is already connected to given callable 'SpineSprite::on_skeleton_data_changed' in that object. image

It doesn't happen every time, but it seems that once it starts, it will do it every time for that particular file.

There isn't anything particular that I've noticed causes it either. It's happened to me when the scene is the only place a SpineSprite is referenced, and sometimes it happens in large scenes where SpineSprite might be part of another imported scene.

This seems to happen both in the editor as well as running the game.

badlogic commented 8 months ago

Just to be clear, both editor and running scene work fine despite thos errors?

yoont4 commented 8 months ago

Somewhat. The spine sprite sometimes freezes on load instead of playing the default animation, and these flood my console when I only have 2-3 spine sprites in a scene (the number is prints seems to scale with time). Hard reloads can usually clear the issue of freezing but that inconsistency makes it hard to know what bugs are from Spine and what is elsewhere.

badlogic commented 7 months ago

@yoont4 sorry for the late reply. Could you possibly create a simple demo project for me to reproduce this? Ideally, you could just add a new scene to the existing spine-godot/example-v4/ project in this repository?

yoont4 commented 7 months ago

Hey @badlogic, no worries. I'll try to make one sometime tonight or tomorrow and upload a zip.

yoont4 commented 7 months ago

@badlogic I've found a very minimal repro (it's not the only scenario I've run into, but it's the most repeatable, and my intuition is that it's the root cause):

  1. Create a scene with a SpineSprite node
  2. Create a consuming scene with a few copies of that other scene
  3. Make sure all scenes are closed
  4. Open the consuming scene first
  5. Open the source scene
  6. Error appears for every instance of the source scene was in the consuming scene.

I've made 2 example scenes that match these already:

sample_project.zip

This repros both the signal error as well as the animation freezing in the consumer scene.

yoont4 commented 7 months ago

@badlogic Just wanted to bump and confirm if the sample project repro was what you're looking for.

badlogic commented 1 month ago

I can't reproduce this anymore in Godot 4.3-stable and the latest spine-godot from the 4.2 branch. I suppose it was one of the signal errors that Godot fixed on their end. Thanks for reporting!