As we are building out skins for newest game, hitting a crash in the CCD2X v2x. runtime.
Steps to reproduce:
- Open Spineboy-mesh.spine
- Create a linked mesh out of googles, head, chest
3 times each
total of 9 linked meshes
- Load the spine in the CC2DX runtime
Or - I can email you our game files with the images and spine (andrew at tresebrothers dot com).
Crash stack trace:
StarTraders2.exe!spSkeletonJson_readSkeletonData(spSkeletonJson * self, const char * json) Line 865 + 0x9 bytes C++
StarTraders2.exe!spSkeletonJson_readSkeletonDataFile(spSkeletonJson * self, const char * path) Line 436 + 0xd bytes C++
StarTraders2.exe!STRegionMapScene::makeSkeletonAnimation(const char * skeletonDataFile, const char * atlasDataFile) Line 713 + 0xd bytes C++
root cause seems to be in
static void _spSkeletonJson_addLinkedMesh ( ... )
a temporary fix is to change line 127 from
if (internal->linkedMeshCapacity < 8) internal->linkedMeshCapacity = 8;
to
if (internal->linkedMeshCapacity < 16) internal->linkedMeshCapacity = 16;
This works until you have 16 linked meshes, then it crashes. We are anticipating having a lot of linked meshes!
We've tried to figure out the pointer math that is going on in _addLinkedMesh, but we can't find the exact issue.
Hope you can help!