{ "id": "105630", "key": "AC-1766", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-11-28T19:35:28.000+0000", "created": "2012-11-28T19:14:17.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:40:39.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": [], "description": "h3. Steps to Reproduce\r\n{code}\r\nvar mainWindow = Ti.UI.createWindow();\r\n\r\nvar a = function() {\r\n\tvar b = 1 + 2;\r\n};\r\nsetTimeout(a, 5000);\r\nclearTimeout(a);\r\n\r\nmainWindow.open();\r\n{code}\r\n\r\nClear timeout throws an java.lang.NumberFormatException: invalid int: \"org.mozilla.javascript.InterprededFunction@....\" (...)\r\n\r\nh3. Actual Result\r\nexception\r\n\r\nh3. Expected Result\r\ncleared timeout", "attachment": [ { "id": "33735", "filename": ".log", "author": { "name": "remmeier", "key": "remmeier", "displayName": "Remo", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-28T19:14:25.000+0000", "size": 276235, "mimeType": "text/plain" }, { "id": "33736", "filename": "diagnostic1306227832872066926.log", "author": { "name": "remmeier", "key": "remmeier", "displayName": "Remo", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-28T19:14:30.000+0000", "size": 1287, "mimeType": "text/plain" } ], "flagged": false, "summary": "clearTimeout throws exception", "creator": { "name": "remmeier", "key": "remmeier", "displayName": "Remo", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "remmeier", "key": "remmeier", "displayName": "Remo", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio 2.1.2", "comment": { "comments": [ { "id": "228866", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "You're passing clearTimeout a function value, when it only accepts a Number value. It should be:\r\n\r\n{code}\r\nvar mainWindow = Ti.UI.createWindow();\r\n\r\nvar a = function() {\r\n\tvar b = 1 + 2;\r\n};\r\nvar myTimeout = setTimeout(a, 5000);\r\nclearTimeout(myTimeout);\r\n\r\nmainWindow.open();\r\n{code}\r\n\r\nSee the docs: http://docs.appcelerator.com/titanium/latest/#!/api/Global-method-clearTimeout\r\n\r\nClosing as invalid.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-28T19:35:28.000+0000", "updated": "2012-11-28T19:35:28.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }