对比其他的skel 看了好几次都没问题 但就是导入失败 :

liekongzuo-mega-pifu.zip
311kB
Related Discussions
...

Sorry you are having trouble. It is difficult when there is a bug in such an old version. We investigated your binary file and found a clipping attachment named SK_XD_ZZ is the problem. The end slot was set to -1 which is not valid. We were able to modify the data to set it to zero, and now the data can be loaded. Please find it attached:

liekongzuo-mega-pifu.skel
783kB

After importing this data, you may want to change the SK_XD_ZZ clipping attachment end slot.

    Nate Thank you so much! 😘 The skel file can now be imported correctly. If it's convenient for you., please let me know how to troubleshoot this kind of issue on my own, so that I can solve it by myself next time.

    You're welcome! I'm glad we were able to help. Very often a problem in the binary data is not recoverable.

    Note you can post in Chinese, the forum has a button that translates it into English for me, so it's easy to communicate in different languages. For you, there should be a button to translate my English posts into Chinese:

    Image supprimée en raison de l'absence de support de HTTPS. | Afficher quand même

    Unfortunately it's difficult to find the position in the file that has the problem. To solve it yourself, you would need to try to load the data using a 3.6 runtime and write code that keeps track of how many bytes were read before the error. Then you need to edit the file with a hex editor and change the bad bytes.

    That's probably too hard for most people. Here, we created a new 3.6.53 Skeleton Viewer that reports the byte offset when reading a binary file:
    http://esotericsoftware.com/files/skeletonViewer-3.6.53.jar

    When you load your original project with it, you'll see an error like this:

    java.lang.RuntimeException: Error at byte: 270197
            at com.esotericsoftware.spine.SkeletonViewer$3.readSkeletonData(SkeletonViewer.java:216)
            at com.esotericsoftware.spine.SkeletonViewer.loadSkeleton(SkeletonViewer.java:221)
            at com.esotericsoftware.spine.SkeletonViewer.create(SkeletonViewer.java:133)
            at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:150)
            at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:127)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 453
            at com.badlogic.gdx.utils.Array.get(Array.java:156)
            at com.esotericsoftware.spine.SkeletonBinary.readAttachment(SkeletonBinary.java:499)
            at com.esotericsoftware.spine.SkeletonBinary.readSkin(SkeletonBinary.java:339)
            at com.esotericsoftware.spine.SkeletonBinary.readSkeletonData(SkeletonBinary.java:277)
            at com.esotericsoftware.spine.SkeletonViewer$3.readSkeletonData(SkeletonViewer.java:207)
            ... 4 more

    That's the byte offset you need: 270197. Open the .skel file in a hex editor. I like XVI32 (here is the download link). Click Address > Goto and type 270197:

    Image supprimée en raison de l'absence de support de HTTPS. | Afficher quand même


    The cursor jumps to that address:

    Image supprimée en raison de l'absence de support de HTTPS. | Afficher quand même


    Don't worry that the binary data doesn't make sense. The problem is just before the cursor: FF FF FF FF 0F are the bytes that mean -1. We need to replace them with 00. Select the first FF and press delete 4 times, then type 00 to replace the 0F. Now it looks like:

    Image supprimée en raison de l'absence de support de HTTPS. | Afficher quand même


    Save the file, and it's fixed!

      Nate 太感谢了,修复skel文件的方法思路我大概了解了。之前我以为是完全导入不了,原来是读取了一半skel出错了。非常感谢您的耐心讲解。我会用您提供的方法尝试学着自己去修复一遍skel文件。🥰

      Nate 非常抱歉 我实在是太笨了😭,我尝试了用我给您的skel文件修复,但是按照您的讲解的步骤但是得到的结果缺大相径庭 我要换运行时读取skel吗 因为我用3.6.53 Skeleton Viewer 得到的是如下结果:
      F:\xiufuy>java -jar skeletonViewer-3.6.53.jar liekongzuo_mega_pifu.skel
      java.lang.RuntimeException: Error at byte: 224
      at com.esotericsoftware.spine.SkeletonViewer$3.readSkeletonData(SkeletonViewer.java:216)
      at com.esotericsoftware.spine.SkeletonViewer.loadSkeleton(SkeletonViewer.java:221)
      at com.esotericsoftware.spine.SkeletonViewer.create(SkeletonViewer.java:133)
      at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:150)
      at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:127)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 41 out of bounds for length 5
      at com.esotericsoftware.spine.SkeletonBinary.readSkeletonData(SkeletonBinary.java:202)
      at com.esotericsoftware.spine.SkeletonViewer$3.readSkeletonData(SkeletonViewer.java:207)
      ... 4 more

      cmd窗口显示的字节错误的大小值和您给我展示的不太一样,导致修复进度没法进行,在自己摸索几个小时没解决才来又打扰您的。😭

      Skeleton Viewer doesn't take any arguments, it's just:

      java -jar skeletonViewer-3.6.53.jar

      You must not be using the liekongzuo_mega_pifu.skel file from your first post above, because I always get Error at byte: 270197.

        Nate 我做到了! 我自己成功的修复了文件,非常感谢 🥰