{"action":"created","issue":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/8305","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/8305/labels{/name}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/8305/comments","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/8305/events","html_url":"https://github.com/cocos2d/cocos2d-x/issues/8305","id":44412928,"number":8305,"title":"CCLabelTTF - sometimes rendering as black boxes on Android","user":{"login":"minggo","id":488203,"avatar_url":"https://avatars.githubusercontent.com/u/488203?v=3","gravatar_id":"","url":"https://api.github.com/users/minggo","html_url":"https://github.com/minggo","followers_url":"https://api.github.com/users/minggo/followers","following_url":"https://api.github.com/users/minggo/following{/other_user}","gists_url":"https://api.github.com/users/minggo/gists{/gist_id}","starred_url":"https://api.github.com/users/minggo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minggo/subscriptions","organizations_url":"https://api.github.com/users/minggo/orgs","repos_url":"https://api.github.com/users/minggo/repos","events_url":"https://api.github.com/users/minggo/events{/privacy}","received_events_url":"https://api.github.com/users/minggo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/labels/critical","name":"critical","color":"e11d21"},{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/labels/type:bug","name":"type:bug","color":"009800"}],"state":"closed","locked":false,"assignee":{"login":"WenhaiLin","id":5234286,"avatar_url":"https://avatars.githubusercontent.com/u/5234286?v=3","gravatar_id":"","url":"https://api.github.com/users/WenhaiLin","html_url":"https://github.com/WenhaiLin","followers_url":"https://api.github.com/users/WenhaiLin/followers","following_url":"https://api.github.com/users/WenhaiLin/following{/other_user}","gists_url":"https://api.github.com/users/WenhaiLin/gists{/gist_id}","starred_url":"https://api.github.com/users/WenhaiLin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WenhaiLin/subscriptions","organizations_url":"https://api.github.com/users/WenhaiLin/orgs","repos_url":"https://api.github.com/users/WenhaiLin/repos","events_url":"https://api.github.com/users/WenhaiLin/events{/privacy}","received_events_url":"https://api.github.com/users/WenhaiLin/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones/21","html_url":"https://github.com/cocos2d/cocos2d-x/milestones/v3.8","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones/21/labels","id":1080167,"number":21,"title":"v3.8","description":"This version is planned to only \"fix existing bugs\" and \"unfinished tasks\".\r\nWe need to improve the quality after a 3D rush in v3.6 and v3.7. ","creator":{"login":"walzer","id":345379,"avatar_url":"https://avatars.githubusercontent.com/u/345379?v=3","gravatar_id":"","url":"https://api.github.com/users/walzer","html_url":"https://github.com/walzer","followers_url":"https://api.github.com/users/walzer/followers","following_url":"https://api.github.com/users/walzer/following{/other_user}","gists_url":"https://api.github.com/users/walzer/gists{/gist_id}","starred_url":"https://api.github.com/users/walzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walzer/subscriptions","organizations_url":"https://api.github.com/users/walzer/orgs","repos_url":"https://api.github.com/users/walzer/repos","events_url":"https://api.github.com/users/walzer/events{/privacy}","received_events_url":"https://api.github.com/users/walzer/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":269,"state":"closed","created_at":"2015-04-23T07:50:39Z","updated_at":"2015-12-07T08:18:02Z","due_on":"2015-08-23T16:00:00Z","closed_at":"2015-09-07T07:38:55Z"},"comments":37,"created_at":"2014-09-30T08:57:37Z","updated_at":"2016-01-06T05:23:45Z","closed_at":"2015-08-20T02:24:20Z","body":"# Note\n\n This issue is migrated from [here](http://www.cocos2d-x.org/issues/3669). It was created at 2014/01/10 20:00:25 +0000\n# Description\n\nFrom time to time, if I exit my game on Android while text is being displayed with CCLabelTTF, then when I re-enter the game, the text is replaced with black boxes. I’m guessing the texture is getting lost. All other textures are fine though.\n\nAnother way to reproduce the issue:\n\\# start game\n\\# launch some activity (such as an interstitial ad)\n\\# close that activity and return to game\n\\# at this point, have CCLabelTTF display some text ==\\> here the text is just black boxes\n\nAlso, here’s a related forum post in which more than one developer have experienced this issue:\nhttp://cocos2d-x.org/forums/6/topics/42500\n\n# Comments\n\n\n* Sheado added comment:\nOk,\n\nAfter tinkering I found the cause of the problem.\nI was preparing my CCLabelTTF in applicationWillEnterForeground(). Simply moving the code to a runAction(…callfunc…) fixes the problem.\n\nI don’t know if this is a bug or if the documentation just needs to be updated to warn people that they should schedule the work to be done on resuming the application.\n\n\n* wollf added comment:\nProblem exists with new Label::createFromTTF. If i create a label label like so:\r\n`Label::createWithTTF(fontBig,\"Example ttf text\",TextHAlignment::RIGHT);`\r\nI hide app to background (pressing HOME button) and when i re-enter it i get \"white boxes\".\r\nnormal label:\r\n![before](http://i.imgur.com/Wia5I54.png)\r\nafter re-entering:\r\n![after](http://i.imgur.com/VudTjOd.png)\r\n\r\nI think this is caused by not reloading ttfConfig created resources in reloadAllTextures.\r\nThis is bad and must be fixed, though i can't deal with this myself :(\r\nTested Device: Google Nexus 7(2013)\r\n\n\n* yaxinhoo added comment:\n@Sheado i got the same , does it fixed?\n\n* WenHai added comment:\nHi guys,which version of Cocos2d-x are you using?\n"},"comment":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/comments/169229193","html_url":"https://github.com/cocos2d/cocos2d-x/issues/8305#issuecomment-169229193","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/8305","id":169229193,"user":{"login":"hgia1234","id":814296,"avatar_url":"https://avatars.githubusercontent.com/u/814296?v=3","gravatar_id":"","url":"https://api.github.com/users/hgia1234","html_url":"https://github.com/hgia1234","followers_url":"https://api.github.com/users/hgia1234/followers","following_url":"https://api.github.com/users/hgia1234/following{/other_user}","gists_url":"https://api.github.com/users/hgia1234/gists{/gist_id}","starred_url":"https://api.github.com/users/hgia1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hgia1234/subscriptions","organizations_url":"https://api.github.com/users/hgia1234/orgs","repos_url":"https://api.github.com/users/hgia1234/repos","events_url":"https://api.github.com/users/hgia1234/events{/privacy}","received_events_url":"https://api.github.com/users/hgia1234/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T05:23:45Z","updated_at":"2016-01-06T05:23:45Z","body":"cocos2d-x 3.8 still have this issue\r\n"}}