maybe crashed sometimes ,when read ccbi.

maybe crashed sometimes ,when read ccbi.
0.0 0


cocosbuilder 3.0

read ccbi code like bellows.
but sometimes it crashed at readNodeGraphFromFile(“ccb/LoginUi.ccbi”, NULL);

CCNode* LoginUi::scene()
CCNodeLoaderLibrary * ccNodeLoaderLibrary = CCNodeLoaderLibrary::newDefaultCCNodeLoaderLibrary();
cocos2d::extension::CCBReader * ccbReader = new cocos2d::extension::CCBReader;
/* Read a ccbi file. */
CCNode * node = ccbReader->readNodeGraphFromFile(“ccb/LoginUi.ccbi”, NULL);
return node

when crashed , the breakpoint at this assert.

void CCObject::release(void)
CCAssert(m_uReference > 0, “reference count should greater than 0”);

if (m_uReference == 0)
delete this;


I usually find this is an error in my .ccb files rather than an error in the library. Have a look through the functions around this error and see which part of the ccbi it is currently trying to read. For example, I had this issue when I was specifying images or fonts in my XML that no longer existed in my project. You might need to add some logs to the library to see exactly where you’re going wrong, but I’ve always tracked this error back to something I was doing wrong…

Hope that helps!