{"id":7139,"date":"2014-05-25T20:58:13","date_gmt":"2014-05-25T20:58:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/25\/problem-about-cctexturecache-collection-of-common-programming-errors\/"},"modified":"2014-05-25T20:58:13","modified_gmt":"2014-05-25T20:58:13","slug":"problem-about-cctexturecache-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/25\/problem-about-cctexturecache-collection-of-common-programming-errors\/","title":{"rendered":"problem about cctexturecache-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fb1b5f6466b194a2e66a8bc100d5b9cc?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\niSeeker<br \/>\nios cocos2d-iphone didreceivememorywarning cctexturecache<br \/>\nTo find a solution I have gone thru this similar link: TextureCache Error from Cocos2d when integrated into UIKit App but seems like it is dealing with this error in a different context..Question: I have a UIKit project integrated with Cocos2d. When build, succeeds and runs but, at times crashes after receiving a memory warning with this error:Assertion failure in -[CCTextureCache init], \/Users\/MyName\/Documents\/CSProject\/CSProject\/libs\/cocos2d\/CCTextureCache.m:90Terminating app due to uncaught<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b3e4dd7c5432a1c61160d1b9b87399ff?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGuru<br \/>\nobjective-c cocos2d-iphone cocos2d cctexturecache<br \/>\nI want to change a sprite texture with another texture from a sprite sheet\/\/normal sprite character = [CCSprite spriteWithSpriteFrameName:@&#8221;char1.png&#8221;];\/\/change texture [character setTexture:[[CCTextureCache sharedTextureCache] addImage:[CCSprite spriteWithSpriteFrameName:@&#8221;char2.png&#8221;]]];but this gives me an error.I have tried without spriteWithSpriteFrameName and it gives me a blank texture.\/\/error Terminating app due to uncaught exception &#8216;NSInvalidArgumentException&#8217;, reason: &#8216;-[CCSprite last<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n<p>I discovery a place to host code\u3001demo\u3001 blog and websites.<br \/>\nSite access is fast but not money<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.m5zn.com\/newuploads\/2014\/01\/30\/jpg\/e7da807964b1fff.jpg\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>iSeeker ios cocos2d-iphone didreceivememorywarning cctexturecache To find a solution I have gone thru this similar link: TextureCache Error from Cocos2d when integrated into UIKit App but seems like it is dealing with this error in a different context..Question: I have a UIKit project integrated with Cocos2d. When build, succeeds and runs but, at times crashes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7139","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7139"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7139\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}