I took a test just a moment ago. In the test, I add a sprite into a CCTMXTiledMap object as a child. The code like this:
CCSprite* pSprite = CCSprite::spriteWithFile("Images/close.png");
CCTMXLayer* pLayer = map->layerNamed("XXX");
But it works well, no crash occurred.
Also, I think it’s a bug of our engine. I only want to know how can I reproduce the bug.
Then I can test whether my solution is correct or not.
Thanks a lot!
By the way, my test environment is cocos2d-0.99.5-x-0.8.2.