Problems loading file from zip

Problems loading file from zip
0.0 0


have a problem using cocos2d-x on android. I am trying to load a .zip file using

As this project is designed to be multiplatform, we also tried this code on an iPad3 and there it is working without problem. The problem is that the app gets an Segmentation Fault when loading the zip file.

Here is the whole code with some extra comments

std::stringstream filename;
filename << (int)startPoint.x << “_” << (int)startPoint.y << “.map”;
unsigned long filesize = 0;
const char* path = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath(“”);
// In the following two lines the error occurs
const char* buffer =(const char**) CCFileUtils::sharedFileUtils->getFileDataFromZip.c_str, &filesize);
std::istringstream fileBuffer;
std::string line;
// Here some code follows but this code does not produce the problem so I left it out
The used includes are:
#include <map>
#include “cocos2d.h”
The values for**path* and filename are and is in the assets folder and the .map file exists inside

The .map is a simple text file containing bytes, it is a binary file
filesize always stays 0

Thanks in advance


I’ve figured out why this is not working.

It seems to be the problem to pack another .zip into the .apk. When playing the .zip in the folder received by


and then open the zip with


the zip loads properly and I am able to read certain files from inside the zip.

And sorry for the bad formatation



I am trying to extract images from cchttpresponse. I downloaded .zip file and saved .
how to unzip them using full path to .zip file ?
const char* buffer =(const char*) CCFileUtils::sharedFileUtils()->getFileDataFromZip(path, filename.str().c_str(), &filesize); returns NULL for me .