Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please update spine runtimes to latest version #18328

Closed
piotrros opened this issue Sep 27, 2017 · 14 comments
Closed

Please update spine runtimes to latest version #18328

piotrros opened this issue Sep 27, 2017 · 14 comments
Assignees
Milestone

Comments

@piotrros
Copy link

After updating Spine to the latest version I'm no longer able to open skeletons.

  • cocos2d-x version: 3.15 from github (27.09.2017)
  • devices test on: iPad 2
  • developing environments
    • NDK version: N/A
    • Xcode version: 9.0
    • VS version: N/A
    • browser type and version: N/A

Steps to Reproduce:

  1. Acquire the latest Spine and save the model as binary (.skel extension).
  2. call SkeletonAnimation::createWithBinaryFile

it crashes (EXC_BAD_ACCESS) on this line:
slotData->attachmentName = readString(input);

in SkeletonBinary.c.

https://imgur.com/a/7CwOR

@piotrros
Copy link
Author

I've also tried to replace spine runtimes by myself, but I'm getting tons of linker errors:

Undefined symbols for architecture armv7:
  "_spPointAttachment_create", referenced from:
      __spAtlasAttachmentLoader_createAttachment in libcocos2d iOS.a(AtlasAttachmentLoader.o)
  "_spColor_setFromColor", referenced from:
      __spColorTimeline_apply in libcocos2d iOS.a(Animation.o)
      __spTwoColorTimeline_apply in libcocos2d iOS.a(Animation.o)
      _spSlot_setToSetupPose in libcocos2d iOS.a(Slot.o)
  "_spColor_addFloats", referenced from:
      __spColorTimeline_apply in libcocos2d iOS.a(Animation.o)
      __spTwoColorTimeline_apply in libcocos2d iOS.a(Animation.o)
  "_spIntArray_setSize", referenced from:
      __spTrackEntry_setTimelineData in libcocos2d iOS.a(AnimationState.o)
  "_spUnsignedShortArray_create", referenced from:
      spine::SkeletonBatch::SkeletonBatch() in libcocos2d iOS.a(SkeletonBatch.o)
  "_spIntArray_dispose", referenced from:
      __spAnimationState_disposeTrackEntry in libcocos2d iOS.a(AnimationState.o)
  "_spUnsignedShortArray_ensureCapacity", referenced from:
      spine::SkeletonBatch::allocateIndices(unsigned int) in libcocos2d iOS.a(SkeletonBatch.o)
  "_spIntArray_create", referenced from:
      __readVertices in libcocos2d iOS.a(SkeletonJson.o)
      __spAnimationState_trackEntry in libcocos2d iOS.a(AnimationState.o)
  "_spColor_create", referenced from:
      _spSkeletonJson_readSkeletonData in libcocos2d iOS.a(SkeletonJson.o)
      _spSkeletonBinary_readSkeletonData in libcocos2d iOS.a(SkeletonBinary.o)
      _spSlot_create in libcocos2d iOS.a(Slot.o)
  "spine::SkeletonTwoColorBatch::deallocateVertices(unsigned int)", referenced from:
      spine::SkeletonRenderer::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int) in libcocos2d iOS.a(SkeletonRenderer.o)
  "_spFloatArray_create", referenced from:
      __readVertices in libcocos2d iOS.a(SkeletonJson.o)
  "spine::SkeletonTwoColorBatch::addCommand(cocos2d::Renderer*, float, unsigned int, cocos2d::GLProgramState*, cocos2d::BlendFunc, spine::TwoColorTriangles const&, cocos2d::Mat4 const&, unsigned int)", referenced from:
      spine::SkeletonRenderer::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int) in libcocos2d iOS.a(SkeletonRenderer.o)
  "_spFloatArray_add", referenced from:
      __readVertices in libcocos2d iOS.a(SkeletonJson.o)
  "_spSkeletonClipping_clipTriangles", referenced from:
      spine::SkeletonRenderer::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int) in libcocos2d iOS.a(SkeletonRenderer.o)
  "spine::SkeletonTwoColorBatch::allocateVertices(unsigned int)", referenced from:
      spine::SkeletonRenderer::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int) in libcocos2d iOS.a(SkeletonRenderer.o)
  "_spIntArray_add", referenced from:
      __readVertices in libcocos2d iOS.a(SkeletonJson.o)
  "_spColor_setFromFloats", referenced from:
      _spSkeletonJson_readSkeletonData in libcocos2d iOS.a(SkeletonJson.o)
      __spColorTimeline_apply in libcocos2d iOS.a(Animation.o)
      __spTwoColorTimeline_apply in libcocos2d iOS.a(Animation.o)
      _spMeshAttachment_create in libcocos2d iOS.a(MeshAttachment.o)
      _spRegionAttachment_create in libcocos2d iOS.a(RegionAttachment.o)
      _spSkeletonBinary_readSkeletonData in libcocos2d iOS.a(SkeletonBinary.o)
      _spSkeleton_create in libcocos2d iOS.a(Skeleton.o)
      ...
  "_spSkeletonClipping_clipStart", referenced from:
      spine::SkeletonRenderer::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int) in libcocos2d iOS.a(SkeletonRenderer.o)
  "spine::SkeletonTwoColorBatch::allocateIndices(unsigned int)", referenced from:
      spine::SkeletonRenderer::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int) in libcocos2d iOS.a(SkeletonRenderer.o)
  "_spSkeletonClipping_clipEnd", referenced from:
      spine::SkeletonRenderer::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int) in libcocos2d iOS.a(SkeletonRenderer.o)
  "_spClippingAttachment_create", referenced from:
      __spAtlasAttachmentLoader_createAttachment in libcocos2d iOS.a(AtlasAttachmentLoader.o)
  "_spSkeletonClipping_clipEnd2", referenced from:
      spine::SkeletonRenderer::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int) in libcocos2d iOS.a(SkeletonRenderer.o)
  "_spSkeletonClipping_isClipping", referenced from:
      spine::SkeletonRenderer::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int) in libcocos2d iOS.a(SkeletonRenderer.o)
  "spine::SkeletonTwoColorBatch::getInstance()", referenced from:
      spine::SkeletonRenderer::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int) in libcocos2d iOS.a(SkeletonRenderer.o)
      spine::SkeletonRenderer::isTwoColorTint() in libcocos2d iOS.a(SkeletonRenderer.o)
      spine::SkeletonRenderer::setTwoColorTint(bool) in libcocos2d iOS.a(SkeletonRenderer.o)
  "_spSkeletonClipping_dispose", referenced from:
      spine::SkeletonRenderer::~SkeletonRenderer() in libcocos2d iOS.a(SkeletonRenderer.o)
  "_spUnsignedShortArray_dispose", referenced from:
      spine::SkeletonBatch::~SkeletonBatch() in libcocos2d iOS.a(SkeletonBatch.o)
  "_spSkeletonClipping_create", referenced from:
      spine::SkeletonRenderer::initialize() in libcocos2d iOS.a(SkeletonRenderer.o)
ld: symbol(s) not found for architecture armv7

@hussain-sohaib
Copy link

hussain-sohaib commented Sep 27, 2017 via email

@piotrros
Copy link
Author

This is exactly what I'm using (and getting these linker errors).

I've got them from here:
http://esotericsoftware.com/spine-runtimes

Just copy-pasted files from: spine-c and spine-cocos2dx.

@hussain-sohaib
Copy link

hussain-sohaib commented Sep 27, 2017 via email

@hussain-sohaib
Copy link

hussain-sohaib commented Sep 27, 2017 via email

@hussain-sohaib
Copy link

hussain-sohaib commented Sep 27, 2017 via email

@piotrros
Copy link
Author

Ok, I found out the problem: I had to re-add (drag&drop) all spine files to Xcode. Some files were missing.

BUT.. I've found an even more problematic issue. Now I have no problem with opening skeletons saved in the latest version, but I cannot open the old ones. And I have hundreds of these models in several games. There's no backward compatibility I see. Aaand I cannot re-save new ones with older version, because Spine says this is too old version. So the only option is to re-save hunders of old skeletons in the latest version. But there's again a problem: graphic designer said that some old models won't open anymore in the latest Spine.

This is madness.

@piotrros
Copy link
Author

More about this topic here: EsotericSoftware/spine-runtimes#1006

@piotrros piotrros reopened this Sep 28, 2017
@piotrros
Copy link
Author

piotrros commented Oct 3, 2017

Can we update it with 3.16 @minggo ? Replacing spine files is easy, but you have also drag & drop files in xcode and modify jsb_cocos2dx_spine_manual.cpp (I don't need js so I just commented everything :D)

@piotrros
Copy link
Author

piotrros commented Oct 3, 2017

To get this working on android you have to add:

Array.c
ClippingAttachment.c
Color.c
PointAttachment.c
SkeletonClipping.c
SkeletonTwoColorBatch.cpp
Triangulator.c
VertexEffect.c \

in cocos/editor-support/spine/Android.mk.

@minggo minggo added this to the 3.17 milestone Oct 31, 2017
@minggo minggo self-assigned this Oct 31, 2017
@minggo
Copy link
Contributor

minggo commented Nov 1, 2017

fixed in #18427

@piotrros
Copy link
Author

piotrros commented Nov 2, 2017

Great, thanks a lot!

@piotrros piotrros closed this as completed Nov 2, 2017
@minggo
Copy link
Contributor

minggo commented Nov 2, 2017

Please read the commend in the PR, there is a bug of TankExample on macOS.

@minggo
Copy link
Contributor

minggo commented Nov 3, 2017

spine's author fixed the crash issue, and i applied it in 5a8803d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants