Projects > cpp > Issues > Bug #3634

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

SpriteFrameCache::removeSpriteFramesFromFile(const std::string& plist) not remove elements from _loadedFileNames

Bug #3634 [Closed]
26_terry 2014-01-09 06:36 . Updated over 10 years ago

cocos2d version:cocos2d-x 3.0 beta
in SpriteFrameCache::addSpriteFramesWithFile(const std::string& pszPlist) ‘fullPath’ is inserted to ‘*loadedFileNames’
but in SpriteFrameCache::removeSpriteFramesFromFile
when removing element from ’*loadedFileNames’, ‘plist’ is removed. However plist’s fullPath is the element that should be removed.

This bug will cause manually removed sprite sheet can not be loaded again, for example when create a UIWidget from json again. Then SpriteFrame can’t be found…

26_terry 2014-01-24 03:57

after examine the problem more precisely I found the bug is triggered when CCSGUIReader load widget:
when CCSGUIReader::widgetFromJsonFile is called, plist's full path is passed to
SpriteFrameCache::addSpriteFramesWithFile(const std::string& pszPlist), this will cause
the variable 'pszPlist' equal to 'fullPath'

walzer@cocos2d-x.org 2014-10-08 02:52

Redmine issue system is closed, we are using github issue system instead.

This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8302

Atom PDF

Status:Closed
Start date:2014-01-09
Priority:Low
Due date:
Assignee:-
% Done:

0%

Category:android
Target version:-