{ "id": "112166", "key": "TIMOB-13358", "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": "15398", "description": "2013 Sprint 07 JS", "name": "2013 Sprint 07 JS", "archived": true, "released": true, "releaseDate": "2013-04-08" }, { "id": "15105", "description": "2013 Sprint 07", "name": "2013 Sprint 07", "archived": true, "released": true, "releaseDate": "2013-04-08" }, { "id": "15490", "description": "2013 Sprint 10 JS", "name": "2013 Sprint 10 JS", "archived": true, "released": true, "releaseDate": "2013-05-20" }, { "id": "15108", "description": "2013 Sprint 10", "name": "2013 Sprint 10", "archived": true, "released": true, "releaseDate": "2013-05-20" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-05-31T02:46:57.000+0000", "created": "2013-04-03T23:01:04.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-closed-3.1.1", "qe-testadded" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-02-24T23:36:35.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": "13102", "name": "Code Processor", "description": "Analyzes JavaScript source" } ], "description": "If a native method is called that modifies the base object and is in an ambiguous block, it needs to convert the object to unknown. For example:\r\n{code}\r\nvar x = ['1', '2', '3'];\r\nif (Date.now()) {\r\n\tdelete x[2];\r\n} else {\r\n\tx[2] = x[2].length + 1;\r\n}\r\nconsole.log(x.join());\r\n{code}\r\nboth branches of the if are evaluated, but the first branch is evaluated first and deletes x[2] before the second branch is evaluated, resulting in a \"undefined value has no property \"length\"\" exception. Instead, the array needs to be converted to unknown.", "attachment": [ { "id": "39270", "filename": "iphoneResults_Alloy.zip", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-30T19:27:08.000+0000", "size": 761531, "mimeType": "application/zip" }, { "id": "39269", "filename": "newAlloy.zip", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-30T19:27:08.000+0000", "size": 7404780, "mimeType": "application/zip" }, { "id": "38272", "filename": "Screen Shot 2013-05-08 at 3.40.52 PM.png", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-08T22:43:57.000+0000", "size": 11965, "mimeType": "image/png" } ], "flagged": false, "summary": "Code Analyzer: Native methods that modify their objects don't respect ambiguous blocks", "creator": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "247872", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium-code-processor/pull/152\n1_0_X PR: https://github.com/appcelerator/titanium-code-processor/pull/162", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-17T00:25:55.000+0000", "updated": "2013-04-17T00:25:55.000+0000" }, { "id": "250908", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Still seeing this with 1.0.1:\r\nMac OS 10.8.3\r\nSafari: 6.0.4\r\nXcode 4.6\r\nCLI: 3.1.0\r\ntitanium-code-processor: 1.0.1\r\nAlloy: 1.1.2\r\nAppcelerator Studio, build: 3.1.1.201305072102\r\nTitanium SDK version 3.1.1.v20130508001914", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-08T22:43:20.000+0000", "updated": "2013-05-08T22:43:20.000+0000" }, { "id": "250909", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please see the attached screen shot", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-08T22:43:57.000+0000", "updated": "2013-05-08T22:44:16.000+0000" }, { "id": "252484", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium-code-processor/pull/192\n1_0_X PR: https://github.com/appcelerator/titanium-code-processor/pull/193", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T01:09:52.000+0000", "updated": "2013-05-17T01:09:52.000+0000" }, { "id": "254935", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[undefined value has no property \"length\"] exception is no longer visible on a classic Titanium Project.\r\n\r\nHowever, is still visible on an Alloy project.\r\nSee the attached 'newAlloy' sample project and 'iphoneResults_Alloy' results.\r\n\r\nEnvironment:\r\n Appcelerator Studio 3.1.1.201305292130\r\n Titanium SDK 3.1.1.v20130529114554\r\n Alloy 1.1.3-alpha\r\n Titanium-Code-Processor 1.1.3-alpha3\r\n\r\nReopening.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-30T19:27:08.000+0000", "updated": "2013-05-30T19:31:11.000+0000" }, { "id": "255076", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium-code-processor/pull/208\n1_0_X PR: https://github.com/appcelerator/titanium-code-processor/pull/209", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-31T01:16:48.000+0000", "updated": "2013-05-31T01:16:48.000+0000" }, { "id": "255092", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Testing instructions (for the alloy reopen):\n1) Add the above test code to index.js in an alloy controller.\n2) Run using \"ti analyze -p iphone -A\"\n3) If the bug is fixed, the error listed in the description will not appear", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-31T02:00:00.000+0000", "updated": "2013-05-31T02:00:00.000+0000" }, { "id": "255101", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Code and functional review passed. Both PRs merged.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-31T02:46:57.000+0000", "updated": "2013-05-31T02:46:57.000+0000" }, { "id": "255213", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified as fixed.\r\n\r\nEnvironment:\r\n Appcelerator Studio 3.1.1.201305312408\r\n Titanium SDK 3.1.1.v20130530204550\r\n Alloy 1.1.3-alpha\r\n Titanium-Code-Processor 1.1.3-alpha4\r\n\r\nClosing.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-31T18:27:10.000+0000", "updated": "2013-05-31T18:27:10.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }