EXC_BAD_ACCESS when using CCSkeletonAnimation

179 Views Asked by At

I'm new in cocos2d-x. When I put these code in init() method

CCSkeletonAnimation* skeletonNode = CCSkeletonAnimation::createWithFile("spine/miner.json", "spine/miner.atlas");
skeletonNode->setAnimation("run",true);
addchild(skeletonNode);

, it throws out an error message

    void CCObject::release(void)
{
    CCAssert(m_uReference > 0, "reference count should greater than 0");
    --m_uReference;

    if (m_uReference == 0)
    {
        delete this;
    }
}

In SpineTest of TestCpp they do the same but no errors. So what exactly cause this error? Any help would be appreciated.

0

There are 0 best solutions below