I’m having some strange problems with the Mac OSX version of Cocos2dx. I’m trying to show a “thank you” message to the user after they have purchased a piece of in-app content. It basically comes down to a call to:
CCLabelTTF *txtLabel = (CCLabelTTF*)loadingContainer->getChildByTag(1);
…which works perfectly well throughout the rest of my app. However, in this instance it crashes 100% of the time inside CCTexture2D::initWithData():
glPixelStorei(GL_UNPACK_ALIGNMENT, 8); //Crashes here
Now I’ve seen commits (like this one: https://github.com/cocos2d/cocos2d-x/pull/2551) which talk about the bit packing being a little messed up. Am I running into something like that on OSX? I somehow don’t think so, as I would see it elsewhere in the app.
My only other guess is that the Mac App Store in-app purchase code is returning on a different thread, and all of my existing references are messed up somehow. Has anybody had any experience in this, or could provide any kind of insight? I really would appreciate the help, as I’m at a bit of a loose end here.
Thanks very much for your time,