Copy link to clipboard
Copied
my ios application download some .zip files and then start unzip. if .zip file is higher than 50MB, program crash after downloading. i can see it is fully downloaded in progress event but complete event cannot dispatch. also app crash when zip file is higher than 150MB in ipad 3.
Copy link to clipboard
Copied
Could you please share code snippet or sample application to reproduce the problem. Also, please share the iOS and AIR SDK version you are using?
Regards,
Nimit
Copy link to clipboard
Copied
air 3.7
ios 6.3
//download button click:
...
loader.dataFormat = URLLoaderDataFormat.BINARY;
loader.load(selectedContent.fileurl);
loader.addEventListener(ProgressEvent.PROGRESS, downloadProgress);
loader.addEventListener(Event.COMPLETE, downloadComplete);
...
private function downloadProgress(event:ProgressEvent):void | ||||||||
{ | ||||||||
loadingText.text = lang.getWord("player.mobile.downloading") + Math.round(event.bytesLoaded / 1024) + "/" + Math.round(event.bytesTotal / 1024); | ||||||||
} |
private function downloadComplete(event:Event):void
{
var fileName:String = "z" + downloadContent.loid.toString() + ".zip"; // new String(downloadContent.fileurl).split("/").pop();
//call the saveLocally function; loader.data has the bytes of the loaded resource
saveLocally("zip/" + fileName, loader.data);
loadingText.text = lang.getWord("player.mobile.downloadFinished");
loader.close();
loader == null;
try
{
unzipFile("zip/" + fileName);
}
catch (err:Error)
{
loadingText.visible = false;
downloadContent = null;
UI.hideActivityIndicator();
Warn(lang.getWord("player.mobile.downloadError"));
refreshList();
}
}
Copy link to clipboard
Copied
Are you sure that you are not just running out of memory on whatever iPad you are testing it? If you fill up the RAM memory, your iPad crashes and that's quite normal...
Copy link to clipboard
Copied
i can see memory usage while testing and it crash due to lack of memory. also smaller zip files can be downloaded and unzipped. is it normal to crash due to unzipping 50mb file?