{ "id": "61835", "key": "TIMOB-1203", "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": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-26T19:57:10.000+0000", "created": "2011-04-15T02:46:33.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "look1" ], "versions": [], "issuelinks": [ { "id": "19412", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94532", "key": "TIMOB-9901", "fields": { "summary": "TiAPI: Review and clean up platform bugs and reduce bug count by 20%.", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-16T22:05: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}

The following usecase demonstrates that setTimeout() periods of\n1000ms complete successfully for this specific code, whereas those\nwith 3000ms periods do not run.

\n

http://pastebin.com/raw.php?i=4Fzdx1qG

\n

I speculate that the reason for this is the script has completed\nexecution within the 3000ms timeout period, causing the timeout to\nbe disregarded. Conversely, 1000ms is long enough for the\ncommand/function inside setTimeout() to fire before the script\nfinishes.

\n

Please do not rely on my previous assumptions of tabGroups being\nthe cause of the issue. Also, opening a window is not a reliable\nworkaround - it may have seemed to resolve the issue in some cases,\nbut I think this was simply due to the fact that doing so extended\nthe script execution time long enough for setTimeout to\ncomplete.

\n

Please note that investigation into the true cause of this issue\nis required - the script execution idea I stated above is just a\ntheory.

\n

Please also note Bill Dawson's ticket #3083\nregarding setTimeout, which may possibly be relevant.

\n

Original poster noted that the setTimeout timer keeps on ticking\naway, as evident from the trace.

{html}", "attachment": [], "flagged": false, "summary": "setTimeout Android Issue", "creator": { "name": "biztactix", "key": "biztactix", "displayName": "Biztactix", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "biztactix", "key": "biztactix", "displayName": "Biztactix", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "125069", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Assigning to Don for triage.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:46:34.000+0000", "updated": "2011-04-15T02:46:34.000+0000" }, { "id": "133287", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The reason these timeouts don't work is because you're opening a new activity (TabGroup) on top of the one from app.js. In 3 seconds, the TabGroup has opened, and the Activity that the timeouts exist on is now suspended.", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-06T15:02:05.000+0000", "updated": "2011-05-06T15:02:05.000+0000" }, { "id": "170707", "author": { "name": "aalderi", "key": "aalderi", "displayName": "Mark Aalderink", "active": true, "timeZone": "Europe/Berlin" }, "body": "sorry, made a mistake: it does work!", "updateAuthor": { "name": "aalderi", "key": "aalderi", "displayName": "Mark Aalderink", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-28T01:26:15.000+0000", "updated": "2011-10-28T01:35:49.000+0000" }, { "id": "210020", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This should no longer be an issue post 1.8.0 since we removed this suspending behavior.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-26T19:57:10.000+0000", "updated": "2012-07-26T19:57:10.000+0000" }, { "id": "413265", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-16T22:05:27.000+0000", "updated": "2017-03-16T22:05:27.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }