If I create a tile map by Tiled SW and include in my visual studio project then it crashes when I run the project with emulator. Some tmx files provided by cocos2d work fine in my example and some don't work. If I create a simple map by Tiled SW and include the tmx and png in my project it never work. Just wonder if my map is corrupted (created windows 8 with latest Tiled). Always get the following error.
Any tips?
Update more info:
Call Stack:
libcocos2d.dll!cocos2d::CCTexture2D::hasPremultipliedAlpha() Line 173 C++ libcocos2d.dll!cocos2d::CCSpriteBatchNode::updateBlendFunc() Line 668 C++ libcocos2d.dll!cocos2d::CCSpriteBatchNode::initWithTexture(cocos2d::CCTexture2D * tex, unsigned int capacity) Line 90 C++ libcocos2d.dll!cocos2d::CCTMXLayer::initWithTilesetInfo(cocos2d::CCTMXTilesetInfo * tilesetInfo, cocos2d::CCTMXLayerInfo * layerInfo, cocos2d::CCTMXMapInfo * mapInfo) Line 65 C++ libcocos2d.dll!cocos2d::CCTMXLayer::create(cocos2d::CCTMXTilesetInfo * tilesetInfo, cocos2d::CCTMXLayerInfo * layerInfo, cocos2d::CCTMXMapInfo * mapInfo) Line 45 C++ libcocos2d.dll!cocos2d::CCTMXTiledMap::parseLayer(cocos2d::CCTMXLayerInfo * layerInfo, cocos2d::CCTMXMapInfo * mapInfo) Line 133 C++ libcocos2d.dll!cocos2d::CCTMXTiledMap::buildWithMapInfo(cocos2d::CCTMXMapInfo * mapInfo) Line 217 C++ libcocos2d.dll!cocos2d::CCTMXTiledMap::initWithTMXFile(const char * tmxFile) Line 75 C++ ShootingCar.exe!HelloWorld::init() Line 59 C++ ShootingCar.exe!HelloWorld::create() Line 28 C++ ShootingCar.exe!HelloWorld::scene() Line 26 C++ ShootingCar.exe!AppDelegate::applicationDidFinishLaunching() Line 52 C++ libcocos2d.dll!cocos2d::CCApplication::run() Line 71 C++ ShootingCar.exe!ShootingCar::[Windows::ApplicationModel::Core::IFrameworkView]::Run() Line 69 C++ [External Code] [Frames below may be incorrect and/or missing, no symbols loaded for AppModelCore.dll]
Calling Code:
_tileMap = new CCTMXTiledMap();
_tileMap->initWithTMXFile("untitled.tmx");
addChild(_tileMap);
Crashes happens:
bool CCTexture2D::hasPremultipliedAlpha()
{
return m_bHasPremultipliedAlpha;
}
Like I mentioned some tmx files work fine with this example (I just include and use the files). But for my tmx file never works, always crashes. I noticed some tmx file also crashes as my one (some in the cocos2d package)