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

Confusing visibility issues with meshes that have skeletons assigned. #77193

Closed
Gilational opened this issue May 18, 2023 · 3 comments · Fixed by #77229
Closed

Confusing visibility issues with meshes that have skeletons assigned. #77193

Gilational opened this issue May 18, 2023 · 3 comments · Fixed by #77229

Comments

@Gilational
Copy link

Godot version

v4.1.dev.custom_build [18112ba]

System information

Arch Linux (6.3.2-arch1-1)

Issue description

When a mesh instance is loaded after its assigned Skeleton3D, it displays in editor, but not when running the project. However, if there is another mesh instance that shares the same skin and skeleton of the mesh that fails to display (does not have to share the same mesh) that is loaded before that Skeleton3D, the original mesh instance and that new mesh instance display normally.

But to add more factors, if the project's .godot folder is deleted, two meshes are broken in editor in addition to while running the project, and adding/reparenting a mesh instance to align with the above situation where the meshes display properly does not cause the broken instances to reappear, only when selecting, then deselecting the Skeleton3D node the meshes are assigned to do they return to above behavior. (Sometimes userdata folder for the project must be deleted as well, but I can't figure out what causes this.)

This second situation also seems to occur if two meshes that are children of their assigned Skeleton3D node are both unparented from that Skeleton3D node in the same action.

I feel like #77192 is related given the solution to second situation's problem has the same solution as the mentioned issue.

I apologize for how scatterbrained and difficult to read this issue is, but I really have trouble understanding this bug.

Steps to reproduce

This issue seems quite inconsistent, with some solid pieces, so overall, solid reproduction steps can't be listed, but things to try in the reproduction project -

  • Play reproduction project on import to observe missing meshes in both editor and while running.
  • Toggle TestSkeleton2's edit mode, or select and deselect to observe it's child meshes appearing only in editor
  • Delete generic named MeshInstance3D to observe previously working child mesh instance of TestSkeleton no longer being visible while running project
  • Unparent both TestCube and TestCube2 from TestSkeleton2 in the same action to observe them both disappearing from editor and while running

Minimal reproduction project

SkeletonAndMeshBugTest.zip (Same as #77192)

@lyuma
Copy link
Contributor

lyuma commented May 18, 2023

Bisected:
4e1d5be good
c80a2b4 good
fbb1a92 bad

Bad commit:

@lyuma
Copy link
Contributor

lyuma commented May 18, 2023

NOte that the error:

ERROR: Condition "skeleton->size == 0" is true. Returning: RID()

occurs both in bad revisions and in good revisions.
However, in bad revisions, it is printed every time a scene with skeleton is opened. In the goo revision, this error is only ever printed once, on engine load. I do not understand why.

@akien-mga akien-mga added this to the 4.1 milestone May 19, 2023
@akien-mga
Copy link
Member

Probably the same bug as #77222, and #77192 may be another symptom of the same underlying issue?

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

Successfully merging a pull request may close this issue.

4 participants