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:
…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.
@bilalmirza I responded to this not realising it’s over 6 years old… Best to avoid resurrecting old threads like this, because there it’s more than likely that the engine code has changed a lot in all these years, so questions may no longer be relevant. It’s better to make a new thread.
Anyhow, if you want to access objects like the label, then use this method: