- 수정됨
ERROR "BONE NOT FOUND"
animating an character
Please read this:
https://code.google.com/p/libgdx/wiki/GettingHelp
If English isn't your first language, just do your best. As it is, I don't know if your error happens in the editor, what runtime you are using, binary or JSON, etc. Post as much information as you can so I can help, otherwise it turns into a guessing game where I have to guess both what your problem is and what the solution might be.
okey. i am using binary file for my libgdx game . till now i have crosschecked the file for any extra bone but it gave me same error. I build a new project with just 1 root bone and 1 bone and again it gave me same error. surprisingly it should have printed the bone name but its not printing anything. i looked into your spine code to get more knowledge of this error. found that error is coming from readSkeletonData (FileHandle file) constructor , parent is null . I modified it little bit , here it is
public SkeletonData readSkeletonData (FileHandle file) {
if (file == null) throw new IllegalArgumentException("file cannot be null.");
SkeletonData skeletonData = new SkeletonData();
skeletonData.setName(file.nameWithoutExtension());
DataInput input = new DataInput(file.read(512));
try {
// Bones.
for (int i = 0, n = input.readInt(true); i < n; i++) {
String name = input.readString();
BoneData parent = null;
String parentName = input.readString();
System.out.println(name+" parent "+parentName);
if (parentName != null) {
parent = skeletonData.findBone(parentName);
if (parent == null) throw new SerializationException("Bone not found: " +n);
}
as you can see i tried to print name and parent name and here is the result
root parent null
parent
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.SerializationException: Bone not found: 2
at com.esotericsoftware.spine.SkeletonBinary.readSkeletonData(SkeletonBinary.java:99)
I even tried to modify a previously running .skel file and tried it in my code and got the same error.
what am i missing here????
do i need to post .skel file in dropbox???
Aha, that is much more info, thanks!
Can you try this:
1) Make sure your Spine is at version 1.3.26 (click the menu in the upper left to see the version).
2) Export your animations again using 1.3.26.
3) Update spine-libgdx to the latest. You can update using git or download all the source using the ZIP button on github.
I think it will work after that. There was a change recently to add the ability to disable inheriting rotation and scale, and also for additive blending on slots. This didn't affect the JSON format, since it uses named attributes, but the binary format is more susceptible to changes. In this case, the extra fields mean you need to export your animations again using the latest Spine and also use the latest spine-libgdx to load them. Sorry! This only happens if something in the export format changes. Most updates won't change the export format.
Note the .spine project file format will always handle forward compatibility, meaning the latest editor will always open older project files, though an older editor may not be able to open newer project files. The export format does not guarantee forward compatibility because this format is consumed by lots of different code and the compatibility would complicate the format. Hopefully it isn't too bad to export your data from Spine again.
If you don't want to be affected by this, you can disable automatic updates in the Spine settings and be sure not to update spine-libgdx. The downside to doing this is that you won't be able to use new features.
thanks it worked. i tried to disable automatic updates . in setting tab i was not able to find anything to disable updates. there is only 1 option for linear filtering but that dont have anything to do with update. how to disable updates ???
You need to update the Spine launcher. Use your private link to download and install Spine again. Once you have done that the settings dialog will allow you to choose "Latest" (which is automatic updates) or a specific version: Image removed due to the lack of support for HTTPS. | Show Anyway