{ "id": "119341", "key": "TIMOB-15019", "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": "15646", "description": "2013 Sprint 18", "name": "2013 Sprint 18", "archived": true, "released": true, "releaseDate": "2013-09-06" }, { "id": "15690", "description": "2013 Sprint 18 API", "name": "2013 Sprint 18 API", "archived": true, "released": true, "releaseDate": "2013-09-06" }, { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" }, { "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-09-03T20:56:58.000+0000", "created": "2013-08-30T21:12:10.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "regression" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2013-09-10T06:52:33.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": "h4. Description\r\n\r\nWhen calling setData on a table that has been populated with sections and rows, setting the data to just rows causes a crash.\r\n\r\nh4. Code to reproduce\r\n\r\n{code}\r\nvar second = Ti.UI.createWindow();\r\n\r\nvar section = Ti.UI.createTableViewSection({\r\n\theaderTitle : \"Fruit\"\r\n});\r\n\r\nvar allNoteTypes = [{\r\n\ttitle : 'Apple'\r\n}, {\r\n\ttitle : 'Orange'\r\n}, {\r\n\ttitle : 'Banana'\r\n}, {\r\n\ttitle : 'Pear'\r\n}];\r\n\r\nvar searchBar = Ti.UI.createSearchBar({\r\n\thintText : \"Type Here\"\r\n});\r\nvar table = Ti.UI.createTableView({\r\n\twidth : Ti.UI.FILL,\r\n\tstyle : Titanium.UI.iPhone.TableViewStyle.GROUPED,\r\n\thideSearchOnSelection : false,\r\n\tsearch : searchBar\r\n});\r\n\r\nfor (var i = 0; i < 3; i++) {\r\n\tvar dataRow = Ti.UI.createTableViewRow({\r\n\t\theight : 44\r\n\t});\r\n\tvar lbl = Ti.UI.createLabel({\r\n\t\tleft : 10,\r\n\t\ttext : allNoteTypes[i].title\r\n\t});\r\n\tdataRow.add(lbl);\r\n\tsection.add(dataRow);\r\n}\r\n\r\ntable.setData([section]);\r\n\r\nfunction handleSearchBarFocus(_event) {\r\n\tTi.API.info(\"handleSearchBarFocus\");\r\n\ttable.setData(null);\r\n\ttable.setData(allNoteTypes);\r\n}\r\n\r\nfunction handleSearchBarCancel(_event) {\r\n\tTi.API.info(\"handleSearchBarCancel\");\r\n\ttable.setData([section]);\r\n\r\n}\r\n\r\nsearchBar.addEventListener(\"focus\", handleSearchBarFocus);\r\nsearchBar.addEventListener(\"cancel\", handleSearchBarCancel);\r\nsecond.add(table);\r\n\r\nsecond.open();\r\n\r\n{code}\r\n\r\nh4. Steps to reproduce\r\n\r\n1. Tap on search bar and type 'a'.\r\n2. Press search\r\n3. Press cancel\r\n4. Tap on search bar again\r\n5. App should crash\r\n\r\nPlease see the attached crash log.\r\nThe issue does not occur in 2.1.4GA\r\n", "attachment": [ { "id": "42036", "filename": "crashlog", "author": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-30T21:12:11.000+0000", "size": 6270, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "iOS: Tableview crash when calling setData after search", "creator": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 3.1.2, 3.1.1, 3.1.0", "comment": { "comments": [ { "id": "269301", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/4640", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-03T17:28:42.000+0000", "updated": "2013-09-03T17:28:42.000+0000" }, { "id": "269302", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "backport to 3_1_X https://github.com/appcelerator/titanium_mobile/pull/4641\n", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-03T17:30:29.000+0000", "updated": "2013-09-03T17:30:29.000+0000" }, { "id": "269418", "author": { "name": "sghosh", "key": "sghosh", "displayName": "Sid Ghosh", "active": true, "timeZone": "America/New_York" }, "body": "Vishal would you happen to know when can we expect a bug fix for this issue, will it make it to the nightly build ?\n\nSid", "updateAuthor": { "name": "sghosh", "key": "sghosh", "displayName": "Sid Ghosh", "active": true, "timeZone": "America/New_York" }, "created": "2013-09-04T01:16:05.000+0000", "updated": "2013-09-04T01:16:05.000+0000" }, { "id": "269421", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~sghosh] The 3.1.X PR is merged. Builds are kicked off as soon as there is new code to build, so it should be in a build already or if not, soon.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-04T01:26:37.000+0000", "updated": "2013-09-04T16:41:50.000+0000" }, { "id": "270545", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fixed with environment:\r\n\r\nAppc Studio: 3.1.3.201309072408\r\nSdk:3.1.3.v20130909192251\r\nCLI version : 3.1.2\r\nAlloy : 1.2.2-beta\r\nMAC OSX: 10.8.4\r\nXCode : 5beta6\r\nDevice: Ipad3(v7)\r\n\r\nTableView now does not crash on calling setData after search.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-10T06:52:33.000+0000", "updated": "2013-09-10T06:52:33.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }