nguyenduong / spritebuilder_cocos2dx

Sprite Builder lib for Cocos2-x
Other
80 stars 44 forks source link

crash when running parallel animations #1

Open likexx opened 10 years ago

likexx commented 10 years ago

the code crashes when I set 2 animations on the timeline for a single node (e.g. Sprite). Let's say I set rotation for the sprite on its timeline, it works fine. Then I add Opacity change for the same sprite on the timeline, it's going to crash.

More details:

repro: create a label on the layer; add few keyframes for rotation add few keyframes for opacity changes.

it's going to crash.

Debugging shows the problem happens here:

CCBReader.cpp

CCBReader::PropertyType type = (CCBReader::PropertyType)ccbReader->readInt(false);
std::string propertyName = ccbReader->readCachedString();

somehow the propertyName and type could mismatch (e.g. property name is "position" while the type is ScaleLock or something)