I am running on a MAC OS X Snow Leopard (10.6.latest as 2/2/2011). And I am running the app with the iPhone simulator through XCode with SDK version 4.2.
Looks like I have the same problem. I’m trying to add sprite sheet to shared frames cache and get BAD_EXC_ACCESS during xml reading.
It happens here(CCXFileUtils_iphone.mm, line 195):
int result = xmlSAXUserParseMemory( &saxHandler, this, buffer, size );
if ( result != 0 )
{
return NULL;
}
Actually it crashes bit later when trying to get access to xml data via null pointer(it should be NSDictionary with xml)
“result” value is 4. Don’t know what does this mean. Somebody know?
PLIST file was generated by zwoptex with “cocos2d” export option. I’ve add it to the resources and looks like it was correctly read in memory. But framework stuck on xml parsing…
Thanks for the work around, switching .plist to .xml works for me too.
I wonder whats going on, because I can see the calls working in the test project, but once I create my own project this problem happens. Maybe the cocos2d-x team can help with this when they get back from the Chinese New Year.
Again thanks, I have been annoyed by this for about a week.
I’ve been having the same problem. xcode converts plist files to a binary format, but it looks like the cocos2d-x code uses fread() which expects text. I think it might need to change to use the Core Foundation libraries:
Thanks to all for you.
Bug #349 is created for this discussion.
Invoking Core Foundation APIs may only work for iOS. I think we had better to find a way to support binary .plist files on both iphone & android.
Hi,
I just wanted to say I had the same problem in XCode. I fixed it by right-clicking it in Resources > Get Info and changed its “File Type” to “text” used to be “text.plist.xml”. It seems it keeps the format inside the package. Works like a charm