Strange TTF issue after AdColony ad plays [Solved]

I’m trying to add AdColony to a game that is otherwise working great. I’m in Android using Cocos2dx 3.8.1 with SDDBox 0.5.6.17 and AdColony 1.4.

If I change Scenes after I play a video the TTF labels change to colored boxes instead of letters. and I get a constant stream of:

W/Adreno-ES20: <__load_uniform_float:849>: GL_INVALID_OPERATION
D/cocos2d-x debug info: OpenGL error 0x0502 in …/cocos2d/cocos/./renderer/CCTextureAtlas.cpp drawNumberOfQuads 691

int the logcat.

If I change scenes (go to pause menu) the messages stop in the logcat and sometimes the scene will draw correctly but not always.

I’ve also noticed a huge spike in memory usage as the video starts (Expected) but it doesn’t drop back to normal after the video finishes.

Can you wrap your callback code with this, and let me know if it fixes this issue.
https://github.com/sdkbox/sdkbox-vungle-sample/blob/master/cpp/Classes/HelloWorldScene.cpp#L136

Thanks! That did work.

Not sure why, but glad it did.

So the reason is that vungle callback happens in a different thread.

what code do you have to use in cocos2d-x 2.2.6?

Some chinese developer implemented it for 2.x you can try it out.

http://www.cocoachina.com/bbs/read.php?tid-219283-fpage-9.html

1 Like

ok i will try it out and reply… :slight_smile:

it worked…

Thats great :smile: