cocos2d::CustomCommand::updateIndexBuffer(void**, unsigned long) (in midnight) + 8*
cocos2d::Label::updateBuffer(cocos2d::TextureAtlas* *, cocos2d::CustomCommand&) (in midnight) + 160
cocos2d::Label::updateEffectUniforms(cocos2d::Label::BatchCommand&, cocos2d::TextureAtlas**, cocos2d::Renderer* *, cocos2d::Mat4 const&) (in midnight) + 72
cocos2d::Label::draw(cocos2d::Renderer**, cocos2d::Mat4 const&, unsigned int) (in midnight) + 1260*
cocos2d::Label::visit(cocos2d::Renderer* *, cocos2d::Mat4 const&, unsigned int) (in midnight) + 616
cocos2d::Node::visit(cocos2d::Renderer**, cocos2d::Mat4 const&, unsigned int) (in midnight) + 416*
cocos2d::Scene::render(cocos2d::Renderer* *, cocos2d::Mat4 const&, cocos2d::Mat4 const**) (in midnight) + 400*
cocos2d::Director::drawScene() (in midnight) + 396*
cocos2d::Director::mainLoop() (in midnight) + 148*
Looking at the code - my guess that textureAtlas is not null otherwise it would have tripped earlier - therefore I suspect there is an issue with the index buffer of the custom command.
void Label::updateBuffer(TextureAtlas* textureAtlas, CustomCommand& customCommand)
{
if (textureAtlas->getTotalQuads() > customCommand.getVertexCapacity())
{
customCommand.createVertexBuffer((unsigned int)sizeof(V3F_C4B_T2F_Quad), (unsigned int)textureAtlas->getTotalQuads(), CustomCommand::BufferUsage::DYNAMIC);
customCommand.createIndexBuffer(CustomCommand::IndexFormat::U_SHORT, (unsigned int)textureAtlas->getTotalQuads() * 6, CustomCommand::BufferUsage::DYNAMIC);
}
customCommand.updateVertexBuffer(textureAtlas->getQuads(), (unsigned int)(textureAtlas->getTotalQuads() * sizeof(V3F_C4B_T2F_Quad)));
customCommand.updateIndexBuffer(textureAtlas->getIndices(), (unsigned int)(textureAtlas->getTotalQuads() * 6 * sizeof(unsigned short)));
customCommand.setIndexDrawInfo(0, (unsigned int)(textureAtlas->getTotalQuads() * 6));
}