cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.24k stars 7.06k forks source link

assert #20501

Open zhmmmm opened 4 years ago

zhmmmm commented 4 years ago

Steps to Reproduce:

  1. auto s = spine::SkeletonAnimation::createWithFile("res/Animation/daji/daji.json", "res/Animation/daji/daji.atlas" );

    s->setTimeScale(1.0f);

    s->setAnimation(0,"attack" , true);

    s->setPosition(visibleSize / 2);

    this->addChild(s); { skins = Json::getItem(root, "skins"); if (skins) { Json skinMap; skeletonData->_skins.ensureCapacity(skins->_size); skeletonData->_skins.setSize(skins->_size, 0); int skinsIndex = 0; for (skinMap = skins->_child, i = 0; skinMap; skinMap = skinMap->_next, ++i) { Json attachmentsMap; Json *curves;

        Skin *skin = new(__FILE__, __LINE__) Skin(Json::getString(skinMap, "name", ""));

    //error //you attempt }

  2. {}

zhmmmm commented 4 years ago

source have error auto s = spine::SkeletonAnimation::createWithFile("res/Animation/daji/daji.json", "res/Animation/daji/daji.atlas" );

s->setTimeScale(1.0f);

s->setAnimation(0,"attack" , true);

s->setPosition(visibleSize / 2);

this->addChild(s);

//spine::SkeletonAnimation thanks, I hope it can be solved as soon as possible!