我的游戏中按钮出现了如截图上面的崩溃,我回想了下我游戏更改的部分,我主要就是将图片达成了纹理图。所有的图片改成都是从内存中读取。
原本我的按钮时这样写的 auto iconButton = MenuItemImage::create("", “”, CC_CALLBACK_1(RecommendGame::iconButtonCall, this));
现在修改成了 Sprite *button1 = Sprite::createWithSpriteFrameName(spic1);
Sprite *button2 = Sprite::createWithSpriteFrameName(spic2);
Sprite *button3 = Sprite::createWithSpriteFrameName(spic3);
auto pButton = MenuItemSprite::create(button1,button2,button3,callback);
然后再之后的测试中不断的出现了崩溃。不知其他大侠是否遇见过这个问题。
为了证实我的猜测。我用3.6创建了一个helloworld的工程,添加了2个按钮,不断打开和关闭一个界面。大约20多次可以出现一次这个bug
不是很稳定,有时候半天不出,有事可能连着出现2次。
说明:工程是通过cocosstudio创建的cocos framework3.6 工程

