{ "id": "103598", "key": "TIMOB-23341", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-08-11T21:58:44.000+0000", "created": "2012-10-18T12:29:48.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T17:12:19.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "When you are trying to add numerous rows to a TableView using insertRowAfter it randomly causes exceptions: \"no row found for index. in -TiUITableViewProxy insertRowAfter:\";\"\r\n\r\nIt looks line some code lines have been commented out for unknown reason and causing issues on the UI thread. Please see this commit:\r\nhttps://github.com/appcelerator/titanium_mobile/commit/040cb9ab4350e6f3bd6eb5e22770f76ec9791b5e\r\n\r\nAnd see this issue on the forum:\r\nhttp://developer.appcelerator.com/question/129708/obj-c-fix-for-error-on-tableview-insertrowbefore--insertrowafter\r\n\r\nThis line should be back on those methods:\r\nENSURE_UI_THREAD(insertRowAfter,args);", "attachment": [], "flagged": false, "summary": "Exception on iPhone: no row found for index. in -TiUITableViewProxy insertRowAfter", "creator": { "name": "petervaradi", "key": "petervaradi", "displayName": "Peter Varadi", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "petervaradi", "key": "petervaradi", "displayName": "Peter Varadi", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iPhone-SDK: 2.3.1", "closedSprints": [ { "id": 685, "state": "closed", "name": "2016 Sprint 16 SDK", "startDate": "2016-07-30T00:40:02.939Z", "endDate": "2016-08-13T00:40:00.000Z", "completeDate": "2016-08-15T08:00:33.056Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "245341", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This is a very old commit. Please provide some code that we can test with", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-02T23:22:36.000+0000", "updated": "2013-04-02T23:22:36.000+0000" }, { "id": "384991", "author": { "name": "baharroth", "key": "baharroth", "displayName": "Baharroth", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please reopen this ticket.\r\nThe 'no row found for index' is still present in SDK 5.2.\r\nIt's append when you use loop to insert row after the last row.\r\n\r\nPlease check the answer and the explaination here\r\nhttps://archive.appcelerator.com/question/129708/obj-c-fix-for-error-on-tableview-insertrowbefore--insertrowafter\r\n\r\n", "updateAuthor": { "name": "baharroth", "key": "baharroth", "displayName": "Baharroth", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-06T13:58:35.000+0000", "updated": "2016-05-06T13:58:35.000+0000" }, { "id": "384998", "author": { "name": "baharroth", "key": "baharroth", "displayName": "Baharroth", "active": true, "timeZone": "America/Los_Angeles" }, "body": "And this is how to reproduce the bug\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar tableData = [{\r\n\ttitle : 'Apples'\r\n}, {\r\n\ttitle : 'Bananas'\r\n}, {\r\n\ttitle : 'Carrots'\r\n}, {\r\n\ttitle : 'Potatoes'\r\n}];\r\n\r\nvar table = Ti.UI.createTableView({\r\n\tdata : tableData\r\n});\r\n\r\ntable.addEventListener(\"click\", function(e) {\r\n\tvar currentIndex = e.index;\r\n\tfor (var i = 0; i < 5; i ++) {\r\n\t\ttable.insertRowAfter(currentIndex, Ti.UI.createTableViewRow({\r\n\t\t\ttitle : 'test ' + i\r\n\t\t}), {\r\n\t\t\tanimated : true,\r\n\t\t\tanimationStyle : Titanium.UI.iPhone.RowAnimationStyle.TOP\r\n\t\t});\r\n\t}\r\n});\r\n\r\nwin.add(table);\r\nwin.open();\r\n{code}\r\n\r\n*EDIT by Hans*: Corrected the demo code and added some format.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-05-06T14:25:46.000+0000", "updated": "2016-05-08T16:03:12.000+0000" }, { "id": "385078", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Reopening ticket, this is a valid issue.\r\n\r\nPR: https://github.com/appcelerator/titanium_mobile/pull/7992", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-05-08T15:46:45.000+0000", "updated": "2016-05-08T15:46:45.000+0000" }, { "id": "414775", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to comments made above. Please re-open if this issue returns.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T17:12:19.000+0000", "updated": "2017-03-22T17:12:19.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }