how to add bitmap font Label?

Hi everyone, I used this http://kvazars.com/littera/ to generate a font.fnt and font.png and I’ve correctly included them into project.

However, when I used folowing code and got an issue:

var hellolabel = ccs.LabelBMFont.create();
hellolabel.setFntFile(s_Font_fnt);
hellolabel.setText(“My Game”);
helloLabel.setPoition(ccp(this.size.width/2,this.size.height -100));
this.addChild(hellolabel,5);

But I’ve got following error:

Thread 1:EXC_BAD_ACCESS(code=1,address=-x38)

break at this function:

bool CCTexture2D::hasPremultipliedAlpha()
{
return m_bHasPremultipliedAlpha;

}

what’s the reason?

Hi, @cht8586

If your question is about cocos2d-x, then it’s better to post it at this address: http://www.cocos2d-x.org/forums/6
I’m sure you will get your answer there.