Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14082] Android: cannot parse big XML data - getting "out of memory" error

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2013-07-01T21:05:28.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 13 API, 2013 Sprint 13
ComponentsAndroid
Labelsn/a
ReporterDavide Cassenti
AssigneeIngo Muschenetz
Created2013-06-03T11:06:08.000+0000
Updated2017-03-22T17:51:45.000+0000

Description

Problem description

Trying to get from an HttpClient call a big anmount of XML data fails with Out of Memory error.

Steps to reproduce

Using an xhr request, get a big xml file (tested on Emulator with ~6MB). The following code will show the problem:
var xhrDocument = Ti.Network.createHTTPClient({
	onload: function() {
		var ResponseXML =  xhrDocument.getResponseXML();
		var ResponseData = ResponseXML.getElementsByTagName('GetDocResult').item(0).text;
		var decodeData = Ti.Utils.base64decode(ResponseData);
		
		alert('Done');
	}
});

xhrDocument.open('GET', 'test.xml');
xhrDocument.send();

Attachments

FileDateSize
test.xml.zip2013-06-19T13:45:30.000+00002018737

Comments

  1. Vishal Duggal 2013-07-01

    Workaround provided
  2. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments. A workaround is provided above.

JSON Source