I am porting my game on Windows 8 phone. Its already live on iOS and Android. Its crash when I try to load images from a plist.
Unhandled exception at 0x69B76451 (libcocos2d.dll) in WickedChicks.exe: 0xC0000005: Access violation reading location 0x00000018.
My code is simple:
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile ("CommonObjects.plist");
My CommonObjects.plist and its png are present in resource folder & is working fine on iOS and Android.
Its giving null for
CCDictionary *dict = CCDictionary::createWithContentsOfFileThreadSafe(fullPath.c_str());
in
void CCSpriteFrameCache::addSpriteFramesWithFile(const char *pszPlist)
method.
Thanks in Advance
Right click on the .Plist file Go to Properties. In the Build Action , set it to "Content" and in "Copy to output Directory" section , set it as "Copy Always" Hope this work for you.
User contributions licensed under CC BY-SA 3.0