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

[godot] Crash in SpineSlotNode if SpineSprite parent does not have skeleton data set #2514

Closed
knightofiam opened this issue May 2, 2024 · 5 comments
Assignees
Labels

Comments

@knightofiam
Copy link

  • Create a new scene in the editor in Spine-Godot 4.2.1.stable.mono on macOS Sonoma 14.0.
  • Set a SpineSprite to the root node of the scene.
  • Add a child SpineSlotNode.
  • The Godot editor hangs for several seconds, then crashes to desktop.
  • Creating a new scene with a SpineSlotNode root node doesn't cause the same behavior, and only yields the warning "SpineSlotNode.cpp:80 - SpineSlotNode parent is not a SpineSprite."
  • Furthermore, after the crash, the entire scene was found to be deleted after re-opening the editor. This is in spite of saving the scene before triggering the crash.
  • I was attempting to resolve the warning by making a SpineSprite the root node, instead of the SpineSlotNode, but it crashes the editor every time.
@knightofiam
Copy link
Author

I see that 4.2.2 has been released, I will re-test with that and report back.

@knightofiam
Copy link
Author

Still crashing in 4.2.2.stable.mono, unfortunately.

@misaki-eymard
Copy link
Collaborator

misaki-eymard commented May 2, 2024

Thank you for reporting! I have confirmed that I can reproduce the problem on my macOS PC. As you mentioned, this also occurs with Godot 4.2.2 (non-mono).

Regarding the second step (Set a SpineSprite to the root node of the scene) in the instructions, whether it is the root node or not is actually irrelevant. This problem can be reproduced even if the SpineSprite is not the root node.
The problem seems to be caused by the fact that the SkeletonDataResource referenced by the SpineSlotNode has not yet been set in the SpineSprite node, since the SpineSlotNode was created immediately after the SpineSprite node was created. So adding the step of setting the SkeletonDataResource in SpineSprite between Steps 2 and 3 solves this problem.

In any case, it would be ideal to be able to avoid this problem by issuing some kind of warning if the parent SpineSprite node does not have a SkeletonDataReference. We should address this issue.

@badlogic badlogic self-assigned this May 2, 2024
@badlogic badlogic added the bug label May 2, 2024
@badlogic
Copy link
Collaborator

badlogic commented May 2, 2024

Thank you for the investigation. For future reference: please always include any error logs or crash report logs that you get. This will help us further pinpoint the issue in the code.

@badlogic badlogic changed the title Godot 4.2.1.stable.mono: Editor crashes on macOS when adding SpineSlotNode child to SpineSprite parent [godot] Crash in SpineSlotNode if SpineSprite parent does not have skeleton data set May 2, 2024
@knightofiam
Copy link
Author

@badlogic Is that Mario?! We meet again. 🙃 Used to contribute to LibGDX back in the day as “3xp0n3nt”. Has it really been a decade? Anyway, thanks for the quick fix!

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

No branches or pull requests

3 participants