在windows平台下开发编译通过但运行内存报错

cocos2d-x 1.x

vc2008
win7 64bit

一运行就报内存读取错误、
422

原因是这一句:

 properties = (CCDictionary<std::string, cocos2d::CCObject*> *)pDeserTileMap->propertiesForGID(tileGid);
	properties->objectForKey(static_cast<std::string>("collidable"));

一旦tileid本身是没有属性的话、就必定会报内存错误、而不是如函数那样返回NULL指针

下面是项目文件源代码

421

cocos2dx 2.0运行HelloWorld在glGenVertexArrays(1, &m_uVAOname)时候报0x00000000错误解决办法:

在ccConfig.h中找打CC_TEXTURE_ATLAS_USE_VAO修改成如下

#ifndef CC_TEXTURE_ATLAS_USE_VAO
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS )
#define CC_TEXTURE_ATLAS_USE_VAO 1
#elif ((CC_TARGET_PLATFORM == CC_PLATFORM_WIN32))
/my computor not support/
#define CC_TEXTURE_ATLAS_USE_VAO 0
#else
/* Some android devices cannot support VAO very well, so we disable it by default for android platform. */
#define CC_TEXTURE_ATLAS_USE_VAO 0
#endif
#endif