{ "id": "78192", "key": "TIMOB-4771", "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": "11362", "description": "Mobile 1.8.0 M09", "name": "Sprint 2011-30", "archived": true, "released": true, "releaseDate": "2011-08-01" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-04T16:15:57.000+0000", "created": "2011-07-25T15:17:27.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_xml", "qe-testadded" ], "versions": [ { "id": "11367", "description": "", "name": "Release 1.7.1", "archived": true, "released": true, "releaseDate": "2011-06-21" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:46:11.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": "When trying to clone node, exception is thrown:\r\n\r\n\"07-25 16:29:33.160 13642 13651 E KrollMethod: (kroll$1: app://app.js) [7,2569] Exception calling kroll method cloneNode, invocation: null ]\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: org.w3c.dom.DOMException\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.apache.harmony.xml.dom.NodeImpl.setNameNS(NodeImpl.java:228)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.apache.harmony.xml.dom.ElementImpl.(ElementImpl.java:51)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.apache.harmony.xml.dom.DocumentImpl.createElementNS(DocumentImpl.java:337)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.apache.harmony.xml.dom.DocumentImpl.shallowCopy(DocumentImpl.java:157)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.apache.harmony.xml.dom.DocumentImpl.cloneOrImportNode(DocumentImpl.java:209)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.apache.harmony.xml.dom.NodeImpl.cloneNode(NodeImpl.java:77)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat ti.modules.titanium.xml.NodeProxy.cloneNode(NodeProxy.java:122)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat ti.modules.titanium.xml.NodeProxyBindingGen$24.invoke(NodeProxyBindingGen.java:931)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.appcelerator.titanium.kroll.KrollCoverage$KrollFunctionCoverage.call(KrollCoverage.java:213)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.appcelerator.titanium.testharness.Test_harnessActivity$1.run(Test_harnessActivity.java:90)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.appcelerator.titanium.TiMessageQueue.handleMessage(TiMessageQueue.java:219)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat android.os.Looper.loop(Looper.java:143)\r\n07-25 16:29:33.160 13642 13651 E KrollMethod: \tat org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86)\r\n07-25 16:29:33.551 13642 13651 D dalvikvm: GC_FOR_MALLOC freed 9833 objects / 572048 bytes in 95ms\r\n07-25 16:29:33.840 13642 13651 W TiConvert: (kroll$1: app://app.js) [14,3258] Unsupported type class org.appcelerator.kroll.KrollProxy$1\r\n07-25 16:29:33.918 13642 13651 D dalvikvm: GC_FOR_MALLOC freed 9055 objects / 556920 bytes in 54ms\"\r\n", "attachment": [], "flagged": false, "summary": "Android: apiXmlNodeCloneNode fails with exception", "creator": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "160649", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Google bug that is fixed in Honeycomb:\n\nhttp://code.google.com/p/android/issues/detail?id=2735", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-07-26T15:38:46.000+0000", "updated": "2011-07-26T15:38:46.000+0000" }, { "id": "160666", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Changed {{NodeProxy}} code to simply display warning when {{cloneNode}} called in pre-Honeycomb versions. Use this as test case and try both in pre-Honeycomb and Honeycomb or later:\r\n\r\n{code:title=app.js}\r\n//Titanium.Network // (workaround for TIMOB-3465)\r\nvar xmlString = '';\r\nvar doc = Ti.XML.parseString(xmlString);\r\nvar elem = doc.documentElement.firstChild;\r\nif (Ti.Platform.osname === 'android' &&\r\n\t\t!isNaN(parseInt(Ti.Platform.version)) &&\r\n\t\tparseInt(Ti.Platform.version) < 3) {\r\n\tTi.API.warn(\"Call to .clone() will probably throw DOMException. You should also see another warning from core code prior to the exception.\");\r\n}\r\nvar clone = elem.cloneNode(false);\r\n{code}\r\n\r\n* In pre-Honeycomb (pre-3.0) you should get a DOMException on screen. Check logcat, look above the exception stack traces, and make sure you see two warnings, one from the Javascript code above (and thus beginning with {{W/TiAPI}}) and one from our {{NodeProxy}} (thus beginning with {{W/TiNodeProxy}}).\r\n\r\n* In Honeycomb or later, you should get no exceptions, and you should not see any of the two warning messages described in the previous bullet.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-07-26T16:34:06.000+0000", "updated": "2011-07-29T09:45:22.000+0000" }, { "id": "161149", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "review and test.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-29T10:29:23.000+0000", "updated": "2011-07-29T10:29:23.000+0000" }, { "id": "175049", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 1.8.0.1.v20111205164258 v8/rhino on\r\nGalaxy 10.1 (3.1)\r\nDroid 1 (2.2.2)\r\nNexus S (2.3.6)\r\nEmulator (4.0)\r\n\r\nPre-HoneyComb: Do not get DOMException but get this warning\r\nW/TiAPI ( 1885): Call to .clone() will probably throw DOMException. You should also see another warning from core code prior to the exception.\r\nW/TiNodeProxy( 1885): (KrollRuntimeThread) [497,711] cloneNode will often throw exception in versions prior to Honeycomb.\r\n", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-06T14:27:13.000+0000", "updated": "2011-12-06T14:27:13.000+0000" }, { "id": "175076", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "open to add label", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-06T15:20:19.000+0000", "updated": "2011-12-06T15:20:19.000+0000" }, { "id": "178043", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening/closing to add/remove labels", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-04T16:15:35.000+0000", "updated": "2012-01-04T16:15:35.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }