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

BoneAttachment3D gives errors if removed from scene tree then added again #81552

Closed
A-Hugh-Mann opened this issue Sep 11, 2023 · 1 comment
Closed
Labels

Comments

@A-Hugh-Mann
Copy link

Godot version

4.2.dev.custom_build.332bc469c

System information

Arch Linux

Issue description

If a BoneAttachment3D is removed from its parent with remove_child() an error will occur.

Attempt to disconnect a nonexistent connection from '@Skeleton3D@31:<Skeleton3D#97123305808>'. Signal: 'bone_pose_changed', callable: 'BoneAttachment3D::on_bone_pose_update'.

If that BoneAttachment3D is later added back with add_child(), another error will occur.

connect: Signal 'bone_pose_changed' is already connected to given callable 'BoneAttachment3D::on_bone_pose_update' in that object.

Steps to reproduce

run this in a node somewhere on the scene tree.

var test: Skeleton3D = Skeleton3D.new()
test.add_bone("bone")
add_child(test)

var attach: BoneAttachment3D = BoneAttachment3D.new()
attach.set_bone_name("bone")
test.add_child(attach)

test.remove_child(attach) # gives error "Attempt to disconnect a nonexistent connection from..."
test.add_child(attach) # gives error "connect: Signal 'bone_pose_changed' is already connected to given callable..."

Minimal reproduction project

N/A

@bitsawer
Copy link
Member

Thanks for the report. Looks like a duplicate of #69614 with some minor variation, so closing this to keep discussion in one place.

@bitsawer bitsawer closed this as not planned Won't fix, can't repro, duplicate, stale Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants