• Bugs
  • Critical bug in spine-unity 4.0

Hi,

Recently upgraded to 4.0 and noticed this bug when a certain skeleton data asset is previewed in the inspector in unity.

The initial exeption was thrown by the SkeletonDataAsset with the message
"Error reading skeleton JSON file for SkeletonData asset: Error Reading Animation (NAME OF ANIMATION)".

I edited the try catch block there (SkeletonDataAsset.cs line 174) so that it would re-throw the original exception, then i followed the stack trace again. The error is in Animation.cs line 353, it's an index OOB error inside this (slightly cursed) for loop

Animation.cs line 352

for (int n = i + BEZIER_SIZE; i < n; i += 2) 
curves[i] = x; // << throws IOOB exception

So there's a situation where the indexer is allowed to get higher than the length of the curves array.

We're trying to see if there's anything funky in the skeleton that could explain this, but the fact that it's even possible to throw an IOOB suggests to me there's a logic error somewhere in the runtimes right?

I can email you the project and exports but I can't post it publically for confidentiality.

Related Discussions
...
  • Изменено

We are sorry for the troubles, thanks for reporting! This issue would most likely affect all runtimes (not only spine-unity) since I could not find any difference between the spine-unity and libgdx implementation in the respective method.

Could you please send us the Spine project or exported files to contact@esotericsoftware.com so that we can reproduce the issue? Please briefly mention the url of this forum thread in your email so that we know the context.

Thanks Harold, I've sent the project along via email with some repro instructions.

[Edit: I just thought I'd mention since i forgot to above - this actually prevents all use of the asset because it blocks import completely]

They were exported with spine 4.0. I looked at the json to check the spine version.

[Edit: I just checked again and the export was from spine 4.0.02 according to the json]

Thanks for sending the reproduction project, we received everything and could reproduce the issue.
We will let you know once we have a bugfix to offer.


We have just released a bugfix for this issue (it turned out that only .json loading and spine-unity was affected by the bug).

A new 4.0 unitypackage is available for download here as usual:
Spine Unity Download
Please let us know if this resolves the issue for you as well. Thanks very much for reporting, and sorry for the troubles!

For reference: this issue has been tracked under this issue ticket:
https://github.com/EsotericSoftware/spine-runtimes/issues/1921

Once again thank you for your always lightning fast bug-fixing. Much appreciated.

Pleasure was ours, thanks very much for reporting this important bug!