{ "id": "62853", "key": "TIMOB-2221", "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": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:58:27.000+0000", "created": "2011-04-15T03:13:54.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "android_refactor", "defect", "javascript", "refactor", "regression" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:58:27.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}

Variable/method passing through contexts was completely broken\nin 1.4.1.1 on Android, but in 1.4.2 (a build from 10/7) it was\nfixed and working beautifully. However, now in 1.5.0 it's broken\nagain (though not quite as broken as before).

\n

Here's what the log shows in 1.4.2 when I run the attached\ntestcase:

\n
\n[INFO] Titanium SDK version: 1.4.2 (10/07/10 15:15 2373d78)\n[INFO] Deployed Sandbox ... Application should be running.\n[INFO] [194,2438] 1.0\n[INFO] [14,2452] win.b() = hello\n[INFO] [11,2463] {\"instanceVar\":123,\"method\":\"org.appcelerator.titanium.kroll.KrollCallback@43eb9160\"}\n[INFO] [7,2470] 123.0\n[INFO] [17,2487] function method called\n[INFO] [10,2497] function getProps called\n[INFO] [6,2503] win.glob.getProps(): [object Object]\n[INFO] [8,2511] win.glob.getProps().propOne: property 1\n[INFO] [4,2515] function getClass called\n[INFO] [12,2527] win.glob.getClass(): [object Object]\n[INFO] [11,2538] win.glob.getClass().instanceVar: 123\n
\n

And here's what it shows in 1.5.0:

\n
\n[INFO] Titanium SDK version: 1.5.0 (10/26/10 19:22 6add5e1)\n[INFO] Deployed Sandbox ... Application should be running.\n[INFO] [95,3090] 1.0\n[INFO] [62,3152] win.b() = undefined\n[INFO] [68,3220] {\"instanceVar\":123,\"method\":\"org.appcelerator.titanium.kroll.KrollCallback@43ecd520\"}\n[INFO] [3,3223] 123.0\n[INFO] [183,3406] win.glob.getProps(): undefined\n[INFO] [30,3436] win.glob.getProps().propOne: undefined\n[INFO] [3,3439] win.glob.getClass(): undefined\n[INFO] [3,3442] win.glob.getClass().instanceVar: undefined\n[INFO] [9,3451] function method called\n[INFO] [2,3453] function getProps called\n[INFO] [4,3457] function getClass called\n
\n

Here's an abridged example from the test case:

\n
\n// parent context (app.js)\nvar glob = {};\nglob.getProps = function() {
\n
\n\n\n
\n
\n
\nTi.API.info('function getProps called');\n\nreturn {propOne: 'property 1', propTwo: 'property 2'};\n
\n
\n\n\n
\n};\nwin.glob = glob;\n\n
\n// child context (test.js)\nvar obj = win.glob.getProps(); // runs code in method but returns undefined\n
{html}", "attachment": [ { "id": "18122", "filename": "app.js", "author": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:13:55.000+0000", "size": 1054, "mimeType": "application/x-javascript" }, { "id": "18123", "filename": "test.js", "author": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:13:55.000+0000", "size": 665, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "Regression: methods passed through contexts not returning values", "creator": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "127860", "author": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This appears to be a partial regression of the fixes done in the\nhigh-priority, milestone-1.5 #1223

{html}", "updateAuthor": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:13:55.000+0000", "updated": "2011-04-15T03:13:55.000+0000" }, { "id": "127861", "author": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

In case this helps, the closest potential culprit I've found is\n\nhttp://github.com/appcelerator/titanium_mobile/commit/26a8a4d58b667...

{html}", "updateAuthor": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:13:55.000+0000", "updated": "2011-04-15T03:13:55.000+0000" }, { "id": "127862", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Standardizing title and assigning over to Marshall.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:13:56.000+0000", "updated": "2011-04-15T03:13:56.000+0000" }, { "id": "127863", "author": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Marshall, do you have any clue when you'll get around to looking\nat this one? Sometime this week hopefully?

{html}", "updateAuthor": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:13:56.000+0000", "updated": "2011-04-15T03:13:56.000+0000" }, { "id": "127864", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [2e76a75f4bd6e3b6cc46f044f07dee0646d0d53c])\nuse an event wrapper for the Ti.Yahoo.yql callback, enable YQL in\nKS, and added a new yahoo test suite. Handle undefined more\ngracefully in KrollConverter, and made a fix for unwrapping\nKrollCallback to it's source function [#755\nstate:fixed-in-qa] [#2221 state:fixed-in-qa] \nhttps://github.com/appcelerator/titanium_mobile/commit/2e76a75f4bd6...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:13:56.000+0000", "updated": "2011-04-15T03:13:56.000+0000" }, { "id": "127865", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Titanium SDK version: 1.5.0 (12/10/10 08:19 f37ab6c)

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:13:56.000+0000", "updated": "2011-04-15T03:13:56.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }