Trouble with PLIST

Hi.
I have a trouble using a plist.
Everything is working well on iOS but when i try to load plist on Android app crashes at this point:

CCDictionary* dict = CCDictionary::createWithContentsOfFile(“config.plist”);

Error log:
03-08 16:25:53.832: E/cocos2d-x assert(11884): /Users/shinskix/cocos2d-2.1beta3-x-2.1.1/hello/proj.android/…/…/cocos2dx/support/data_support/ccCArray.cpp function:ccArrayAppendObject line:120
03-08 16:25:53.832: A/libc(11884): Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1), thread 11903 (Thread-3354)

Is there any idea how to fix that? Or it’s easier to make an XML file instead of Plist?

hi
i am facing the same issue can any one help us

I’m having the same issue, though it seems to work with one plist and crash with another.

The plist below works on iOS but crashes on Android :

page1piece1
    
        End
        {195,280}
        Start
        {108,100}
    
    page1piece2
    
        End
        {212,86}
        Start
        {117,412}

This is the error report :

/../../cocos2dx/support/data_support/ccCArray.cpp function:ccArrayAppendObject line:120

EDIT I got the file working by pasting the contents into a working plist file and then resaving. I’m not sure if there was some sort of issue with the formatting in the original file, but it seems to have fixed it!

the same issue ….please help…

we all changed the plist using someway,here is my way.

/*
* Use tinyxml2 to write plist files
**/
bool FileCopy::writeToFile
{
std::string fullPath = CCFileUtils::sharedFileUtils~~>getWriteablePath + pToFileName;

CCLOG (“tinyxml2 CCDictionary %d writeToFile %s”, dict->m_uID, fullPath.c_str());
bool bRet = false;
tinyxml2::XMLDocument pDoc = new tinyxml2::XMLDocument;
if
return false;
tinyxml2::XMLDeclaration
pDeclaration = pDoc~~>NewDeclaration;
if
return false;
pDoc~~>LinkEndChild;
tinyxml2::XMLElement docType = pDoc~~>NewElement;
pDoc~~>LinkEndChild;
tinyxml2::XMLElement
pRootEle = pDoc~~>NewElement;
pRootEle~~>SetAttribute;
if
return false;
pDoc~~>LinkEndChild;
tinyxml2::XMLElement**innerDict = generateElementForDict(dict, pDoc);
if (NULL innerDict )
return false;
pRootEle->LinkEndChild(innerDict);

bRet = tinyxml2::XML\_SUCCESS  pDoc-\>SaveFile(fullPath.c\_str());

if(pDoc)
delete pDoc;

return bRet;
}

I copy the faild plist from android to ios ,then ios can pass the CCDictionary* dict = CCDictionary::createWithContentsOfFile(“…”); …but android can’t

help