{ "id": "62426", "key": "TIMOB-1794", "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": "11239", "name": "Release 1.6.0 M06", "archived": true, "released": true, "releaseDate": "2011-01-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:57:11.000+0000", "created": "2011-04-15T03:02:35.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "release-1.6.0", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2011-04-17T01:57: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": "{html}

See Helpdesk\n42511

\n
\nvar win = Titanium.UI.createWindow();\nvar foo = [\"foo\", \"bar\",999];\n \n// uncommenting this fixes it, because its no longer mixed type\n// foo = [\"foo\", \"bar\",\"999\"];\n// this also works\n// foo = [111,222,3333];\n \n// exception doesnt happen until the array is assigned to a proxy object\nwin.foo = foo;\nalert(win.foo);\nwin.open();\n
\n

Wondering if this was a blocked issue until proxy assignment was\ncompleted.

{html}", "attachment": [], "flagged": false, "summary": "Android: Mixed type arrays assigned to proxies throw ClassCast exception", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126698", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

As discussed with Don, the following code also produces an\nexception in 1.4.3 (21Nov) but not in 1.5.X (17Dec).

\n
\nvar window = Titanium.UI.createWindow({  \n    backgroundColor:'red'\n});\n\nvar view = Titanium.UI.createView({\n    backgroundColor:\"blue\"\n});\n\nvar x = [ 1,2,3,4,5,6 ];\nview.myArray = x;\nwindow.add(view);\nwindow.open();\n\nfunction isArray(obj) {\n   if (obj.constructor.toString().indexOf(\"Array\") == -1)\n      return false;\n   else\n      return true;\n}\n\nTi.API.info(\"x type isArray = \"+isArray(x));\nTi.API.info(\"view.myArray[3] = \"+view.myArray[3]);\nTi.API.info(\"view.myArray type = \"+typeof(view.myArray));\nTi.API.info(\"view.myArray type isArray = \"+isArray(view.myArray));  //this causes the exception\n
\n

The exception output can be found here

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:02:35.000+0000", "updated": "2011-04-15T03:02:35.000+0000" }, { "id": "126699", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Not sure why this is still open if it's in 1.5.1 please test and\nclose if not valid.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:02:36.000+0000", "updated": "2011-04-15T03:02:36.000+0000" }, { "id": "126700", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [9e588f2c63514f614a78c32f37c14071a2a2d1a4])\nthe kroll invocation scope needs to pull from the current thread's\nti context top level scope instead of the \"start\" which is\nessentially the
\nsame as the \"thisObject\". added a kroll test, this fixes\n\"constructor\"
\nfor Array and other types [#1794 state:fixed-in-qa]
\n\nhttps://github.com/appcelerator/titanium_mobile/commit/9e588f2c6351...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:02:36.000+0000", "updated": "2011-04-15T03:02:36.000+0000" }, { "id": "126701", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "{html}

Verified crash is no longer occurring with test case from\nHal.

{html}", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T03:02:37.000+0000", "updated": "2011-04-15T03:02:37.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }