{ "id": "100658", "key": "TIMOB-11675", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15107", "description": "2013 Sprint 09", "name": "2013 Sprint 09", "archived": true, "released": true, "releaseDate": "2013-05-06" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-04-25T05:53:30.000+0000", "created": "2012-09-09T14:39:06.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "Community", "exalture" ], "versions": [ { "id": "14137", "description": "Release 2.1.3", "name": "Release 2.1.3", "archived": true, "released": true, "releaseDate": "2012-10-03" } ], "issuelinks": [], "assignee": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T22:01:23.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h3. Problem description\r\nParsing a large XML file fails using V8\r\n\r\nh3. Sample code and steps to reproduce\r\n\r\ndata.xml file is attached\r\n\r\nApp.js :\r\n\r\n{code}\r\n\r\nvar file = Ti.Filesystem.getFile('data.xml');\r\n \r\nvar xmlData = file.read().text;\r\n \r\nvar xml = Ti.XML.parseString(xmlData);\r\n \r\nvar nodes = xml.documentElement.childNodes;\r\n \r\nvar i, j, k;\r\n \r\nfor (i = 0; i < nodes.length; i++) {\r\n if (nodes.item(i).hasAttributes()) {\r\n var attr = nodes.item(i).getAttributes();\r\n for (j = 0; j < attr.length; j++) {\r\n var nodeval = attr.item(j).nodeValue;\r\n Ti.API.info(attr.item(j).nodeName + ': ' + nodeval); \r\n }\r\n }\r\n // \r\n for (j = 0; j < nodes.item(i).childNodes.length; j++) {\r\n if (nodes.item(i).childNodes.item(j).nodeName == 'text') {\r\n var textNodes = nodes.item(i).childNodes.item(j);\r\n var text = \"\";\r\n for (k = 0; k < textNodes.childNodes.length; k++) {\r\n text += textNodes.childNodes.item(k).nodeValue;\r\n }\r\n Ti.API.info(text);\r\n }\r\n }\r\n}\r\n \r\nTi.API.info(\"Success!\");\r\n\r\nwin.open();\r\n{code}\r\n\r\niOS and Rhino run just fine, but V8 fails before finishing with:\r\n\r\n{code}\r\n09-09 17:29:08.808: E/dalvikvm(4734): JNI ERROR (app bug): weak global reference table overflow (max=51200)\r\n09-09 17:29:08.812: W/dalvikvm(4734): JNI weak global reference table (0x4d433008) dump:\r\n09-09 17:29:08.816: W/dalvikvm(4734): Last 10 entries (of 51200):\r\n09-09 17:29:08.816: W/dalvikvm(4734): 51199: 0x419fa0f0 ti.modules.titanium.xml.ElementProxy\r\n09-09 17:29:08.816: W/dalvikvm(4734): 51198: 0x41a01a78 ti.modules.titanium.xml.NodeListProxy\r\n09-09 17:29:08.816: W/dalvikvm(4734): 51197: 0x41a06ec0 ti.modules.titanium.xml.ElementProxy\r\n09-09 17:29:08.816: W/dalvikvm(4734): 51196: 0x41a10708 ti.modules.titanium.xml.NodeListProxy\r\n09-09 17:29:08.816: W/dalvikvm(4734): 51195: 0x41a17080 ti.modules.titanium.xml.TextProxy\r\n09-09 17:29:08.816: W/dalvikvm(4734): 51194: 0x41a1e348 ti.modules.titanium.xml.NodeListProxy\r\n09-09 17:29:08.816: W/dalvikvm(4734): 51193: 0x41a237c0 ti.modules.titanium.xml.NodeListProxy\r\n09-09 17:29:08.816: W/dalvikvm(4734): 51192: 0x41a2a308 ti.modules.titanium.xml.ElementProxy\r\n09-09 17:29:08.816: W/dalvikvm(4734): 51191: 0x41a2d868 ti.modules.titanium.xml.NodeListProxy\r\n09-09 17:29:08.816: W/dalvikvm(4734): 51190: 0x41a32178 ti.modules.titanium.xml.ElementProxy\r\n09-09 17:29:08.901: W/dalvikvm(4734): Summary:\r\n09-09 17:29:08.901: W/dalvikvm(4734): 1844 of ti.modules.titanium.xml.TextProxy (1844 unique instances)\r\n09-09 17:29:08.905: W/dalvikvm(4734): 4423 of ti.modules.titanium.xml.ElementProxy (4423 unique instances)\r\n09-09 17:29:08.905: W/dalvikvm(4734): 4426 of ti.modules.titanium.xml.NodeListProxy (4426 unique instances)\r\n09-09 17:29:08.905: W/dalvikvm(4734): 367 of ti.modules.titanium.xml.NamedNodeMapProxy (367 unique instances)\r\n09-09 17:29:08.909: W/dalvikvm(4734): 2944 of ti.modules.titanium.xml.AttrProxy (2944 unique instances)\r\n\r\n{code}\r\n\r\n\r\nBasically it seems like the Java-side proxies are not getting properly deleted when JS-scoping says they should be.", "attachment": [ { "id": "33230", "filename": "data.xml", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-06T21:33:37.000+0000", "size": 178814, "mimeType": "text/xml" } ], "flagged": false, "summary": "Android V8 XML parsing fails", "creator": { "name": "kt", "key": "kt", "displayName": "KT", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android V8", "comment": { "comments": [ { "id": "226354", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Confirmed. \nMoving to TiMOB", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-06T21:28:11.000+0000", "updated": "2012-11-06T21:28:11.000+0000" }, { "id": "248997", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot reproduce \r\n\r\nTested with\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 \r\nAndroid Emulator: Android SDK version: 2.2 ", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-25T05:53:30.000+0000", "updated": "2013-04-25T05:53:30.000+0000" }, { "id": "414518", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced and due to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T22:01:23.000+0000", "updated": "2017-03-21T22:01:23.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }