{ "id": "81614", "key": "TIMOB-5756", "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": "15547", "description": "2013 Sprint 14", "name": "2013 Sprint 14", "archived": true, "released": true, "releaseDate": "2013-07-15" }, { "id": "15548", "description": "2013 Sprint 14 API", "name": "2013 Sprint 14 API", "archived": true, "released": true, "releaseDate": "2013-07-15" }, { "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-06-30T00:26:31.000+0000", "created": "2011-10-14T17:17:16.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "parity", "qe-testadded", "tbs-2.1.0" ], "versions": [ { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [], "assignee": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-03-11T10:06: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": "1) Create a new project and use the following app.js\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\r\nvar b = Ti.UI.createButton({\r\n\ttitle:'Log',\r\n\twidth:200,\r\n\theight:40\r\n});\r\nb.addEventListener('click', function() {\r\n\tTi.API.info('a*b|c#d');\r\n\tvar foo = 'bar*baz|bat#durp';\r\n\tTi.API.info(foo);\r\n\tTi.API.trace(\"trace\");\r\n\tTi.API.debug(\"Debug\");\r\n\tTi.API.notice(\"Notice\");\r\n\tTi.API.critical(\"Fatal\");\r\n\tTi.API.warn(\"Warn\");\r\n\tTi.API.error(\"Error\");\r\n\t\r\n\t// Coerce a warning from the system\r\n\tvar v = Ti.UI.createTableView();\r\n\tv.deleteRow(0);\r\n});\r\nwin.add(b);\r\nwin.open();\r\n{code}\r\n\r\n2) Launch app\r\n\r\nResults: Application crashing. Android log shows: java.lang.IllegalStateException: Index out of range. Non-existant row at 0.\r\n\r\nExpected results: The same application won't crash on an iOS device and the log output displays: [WARN] no rows found in table, ignoring delete\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: TableView deleteRow with invalid index crashes the application instead of warning", "creator": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 1.8.0.v20111013161411, Nexus One 2.2.2, Titanium Studio build: 1.0.4.201108101535, OSX 10.7.2", "comment": { "comments": [ { "id": "221090", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tried this with the 2.1.2 SDK, and the app throws a Javascript error, but doesn't crash on\nthe Java side.", "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-26T21:02:28.000+0000", "updated": "2012-09-26T21:02:28.000+0000" }, { "id": "259148", "author": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "body": "add log instead of crash\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4410", "updateAuthor": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-06-24T11:10:12.000+0000", "updated": "2013-06-24T11:10:12.000+0000" }, { "id": "275889", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with:\r\n\r\nAppc-Studio: 3.2.0.201310181700\r\nSdk:3.2.0.v20131018154951\r\nalloy:1.2.2\r\nnpm:1.3.2\r\ntitanium:3.2.0\r\ntitanium-code-processor:1.0.3\r\nDevice:Google Nexus 7(v4.3)\r\nXcode: 5\r\n\r\n\r\nAbove Code used for verification.\r\nOn Android and iOS app does not crash.\r\n\r\nBut for iOS we get warning logs as:\r\n[WARN] : No rows found in table, ignoring delete \r\n\r\nFor Android we get error logs as:\r\n E/TableViewProxy(25015): (main) [69421,101637] Unable to delete row. Index out of range. Non-existent row at 0.\r\n\r\n\r\nClosing the issue as fixed and application does not crash on both the platforms when using deleteRow for invalid index in tableView.\r\n\r\n", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-21T07:07:13.000+0000", "updated": "2013-10-21T07:07:13.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }