• Bugs
  • Assets missing, and file unplayable in compiler

Related Discussions
...

Hi,

I would like to report a possible bug which occurs when it was loaded to a compiler (might try in unity, but currently the compiler is custom from client).
Here is how it happens:

First animation file (Giraffe Falls)

  1. Load file to compiler
  2. Missing neck asset.

Second animation file (Giraffe Eats)

  1. Load file to compiler
  2. File/animation won't load / play.

Third animation file (Duck Runs)

  1. Load file to compiler
  2. Crashes.

Do let me know whether this is a bug, a memory issue, or something that requires some update. The drawback is that I do not use the compiler myself, so I can't provide details on that. But if you need any specific information, I can ask the programmer to provide me with specific info on the compiler.

Best regards,

Erick S.

"compiler" is not Spine terminology. Do you mean "runtime"?

If an official runtime fails to load Spine data, we would be able to fix it right away. If a custom runtime fails to load Spine data, I'm afraid there is nothing we can do, as we did not write and do not maintain that runtime. You'll need to have a programmer debug the custom runtime to see why it fails on your data.

A runtime is made to load Spine data exported from a specific version of the Spine editor. If you use a different version (newer or older) of the Spine editor to export your data, chances are good that the runtime will fail to interpret the data correctly. You must be sure to use the version of the Spine editor that matches your runtime. This is true whether using the official runtimes or a custom made runtime. See here:
Settings - Spine User Guide: Version

The Run time is Cocos2D-X I've downloaded the latest latest version from your GitHub and replaced the internal one ( I believe, it did fix some other crash bugs, so seems to be all good, the needed steps have changed since you wrote your guide 😉 ) as of 6 days ago ( so I don't have the rendering vertex calculation fix yet ). The app is running on Windows 10, but using the win32 project built on VS Studio Community 2017.

My code is as follows, nothing fancy,

 auto spineBase = JSON_GET_AS_STRING(setup, "spine");
m_spineAnim = JSON_GET_AS_STRING(setup, "spine_anim");
float spineScale = JSON_GET_AS_FLOAT(setup, "spine_scale") / 100.0f;
m_spineTest = spine::SkeletonAnimation::createWithJsonFile(spineBase + ".json", spineBase + ".atlas", spineScale);
//m_spineTest = spine::SkeletonAnimation::createWithJsonFile("spine\\goblins\\export\\goblins-ess.json", "spine\\goblins\\export\\goblins.atlas", 1.0f);
m_spineTest->setSkin("default");
m_spineTest->setVisible(false);
this->addChild(m_spineTest); 

The DUCK_RINS animation will crash during the JSON Parse. Sometimes I get a "Heap corruption warning", others I get an exception fire when free(json) is called. Seems that on release it sometimes doesn't crash, so random memory corruption seems to be the cause.

I was waiting on sign off for uploading the animations publicly, I can put this in a ticket on GitHub if you like?

6 jours plus tard

The code you posted does not look suspicious. Please modify our cocos2d-x sample in our runtimes repository and include your Spine .json and .atlas/.png files. Post the result in an issue on GitHub and we'll be happy to investigate.