godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.19k stars 21.03k forks source link

Console spammed with errors when adding a fresh SkeletonModification2DTwoBoneIK #76712

Open hakro opened 1 year ago

hakro commented 1 year ago

Godot version

4.0.2, 4.0.3-RC1, and master

System information

PopOs 22.04, Nvidia

Issue description

Adding a SkeletonModification2DTwoBoneIK spams the console with the following error, without leaving any time for the user to configure it :

scene/2d/skeleton_2d.cpp:642 - Index p_idx = -1 is out of bounds (bones.size() = 0).

2023-05-03_23-00

Steps to reproduce

  1. Create a 2D scene
  2. Add a Skeleton2D node
  3. Add a new modification stack
  4. Add a SkeletonModification2DTwoBoneIK
  5. Appreciate the error bombing in the console

Minimal reproduction project

No need. It's easily reproduced with a single built-in Skeleton2D node

jpcerrone commented 1 year ago

Besides SkeletonModification2DTwoBoneIK, the message spamming also happens with SkeletonModification2DLookAt but not with any other Modification type (SkeletonModification2D, SkeletonModification2DCCDIK, etc.)

metcalf-putnam commented 9 months ago

Seeing this bug as well on 4.2.1 (system info: Godot v4.2.1.stable - Windows 10.0.22621 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 2070 with Max-Q Design (NVIDIA; 31.0.15.3742) - Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 Threads))

MDIVS commented 8 months ago

Just for keeping tracking... I'm using the very latest v4.3.dev2.official and SkeletonModification2DLookAt keeps spawning the warning scene/resources/skeleton_modification_2d_lookat.cpp:259 - Cannot verify the bone index for this modification....

I believe it is because the bone node is not ready in the scene tree when bone verification is running. But I dont have any solid evidence of that.