{ "id": "141857", "key": "TIMOB-18260", "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": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-12-19T07:56:21.000+0000", "created": "2014-12-18T10:41:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "listview", "popover", "qe-3.5.0", "searchbar" ], "versions": [ { "id": "16676", "description": "Release 3.4.1", "name": "Release 3.4.1", "archived": false, "released": true, "releaseDate": "2014-11-14" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [ { "id": "44590", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "142516", "key": "TIMOB-18345", "fields": { "summary": "iOS: Crash if all results from search in ListView fit on view", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-08-10T21:55:04.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": "A popover that has a SearchBar attached to a ListView will crash if it hides will the SearchBar still has focus.\r\n\r\nSame goes for when the ListView is removed from its parent view while the SearchBar has focus, so that seems to be the actual problem.\r\n\r\nThe crashlog is attached.\r\n\r\nh1. Test case #1\r\n\r\n1. Install an app with the following code on an iPad (crashes on iOS Simulator as well, but doesn't show crashlog)\r\n2. Tap the button\r\n3. Tap the searchbar to focus\r\n4. Tap outside the popover to hide it\r\n5. App crashes after a second or so\r\n\r\n{code:javascript}\r\nvar w = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nvar b = Ti.UI.createButton({\r\n title: 'Click'\r\n});\r\n\r\nb.addEventListener('click', function() {\r\n\r\n var cw = Ti.UI.createWindow({\r\n width: 300,\r\n height: 300\r\n });\r\n\r\n var lv = Ti.UI.createListView({\r\n searchView: Ti.UI.createSearchBar()\r\n });\r\n\r\n cw.add(lv);\r\n\r\n var p = Ti.UI.iPad.createPopover({\r\n width: 300,\r\n height: 300,\r\n contentView: cw\r\n });\r\n\r\n p.show({\r\n view: b\r\n });\r\n\r\n});\r\n\r\nw.add(b);\r\nw.open();\r\n{code}\r\n\r\nh1. Test case #2\r\n\r\n1. Install an app with the following code on an iOS device (crashes on iOS Simulator as well, but doesn't show crashlog)\r\n2. Tap the searchbar to focus\r\n3. Tap the button to remove the ListView\r\n4. App crashes after a second or so\r\n\r\n{code:javascript}\r\nvar w = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nvar lv = Ti.UI.createListView({\r\n top: 100,\r\n searchView: Ti.UI.createSearchBar()\r\n});\r\n\r\nvar b = Ti.UI.createButton({\r\n top: 30,\r\n title: 'Click me after focussing on search field'\r\n});\r\n\r\nb.addEventListener('click', function() {\r\n w.remove(lv);\r\n});\r\n\r\nw.add(b);\r\nw.add(lv);\r\n\r\nw.open();\r\n{code}", "attachment": [ { "id": "53290", "filename": "popsearch.crash", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-12-18T10:41:30.000+0000", "size": 40547, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "iOS: Removing a ListView while SearchBar has focus results in crash", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "3.5.0.Beta\r\n3.4.1.GA", "closedSprints": [ { "id": 272, "state": "closed", "name": "2014 Sprint 25 SDK", "startDate": "2014-12-08T22:49:31.264Z", "endDate": "2014-12-22T01:00:00.000Z", "completeDate": "2015-01-05T18:18:28.523Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "337116", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Combined test case\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\nvar navWin = Titanium.UI.iOS.createNavigationWindow({\r\n window: win\r\n});\r\nvar b1 = Ti.UI.createButton({title:'TEST1', top:60});\r\nwin.add(b1);\r\nb1.addEventListener('click',function(){\r\n var w = Ti.UI.createWindow({backgroundColor:'white'})\r\n var lv = Ti.UI.createListView({\r\n top: 100,\r\n searchView: Ti.UI.createSearchBar()\r\n });\r\n var b = Ti.UI.createButton({\r\n top: 30,\r\n title: 'Click me after focussing on search field'\r\n });\r\n b.addEventListener('click', function() {\r\n w.remove(lv);\r\n });\r\n w.add(b);\r\n w.add(lv);\r\n navWin.openWindow(w, {animated:true});\r\n});\r\nif(Ti.Platform.osname == 'ipad'){\r\n var b2 = Ti.UI.createButton({title:'TEST2', top:120});\r\n win.add(b2);\r\n b2.addEventListener('click',function(){\r\n var w = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n });\r\n var b = Ti.UI.createButton({\r\n title: 'Click'\r\n });\r\n b.addEventListener('click', function() {\r\n var cw = Ti.UI.createWindow({\r\n width: 300,\r\n height: 300\r\n });\r\n var lv = Ti.UI.createListView({\r\n searchView: Ti.UI.createSearchBar()\r\n });\r\n cw.add(lv);\r\n var p = Ti.UI.iPad.createPopover({\r\n width: 300,\r\n height: 300,\r\n contentView: cw\r\n });\r\n p.show({\r\n view: b\r\n });\r\n });\r\n w.add(b);\r\n navWin.openWindow(w, {animated:true});\r\n });\r\n}\r\nnavWin.open();\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-19T05:22:00.000+0000", "updated": "2014-12-19T05:32:13.000+0000" }, { "id": "337117", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pulls pending\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/6513\r\n3_5_X - https://github.com/appcelerator/titanium_mobile/pull/6514", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-19T05:29:02.000+0000", "updated": "2014-12-19T05:29:02.000+0000" }, { "id": "337120", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please review this one.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-19T05:48:18.000+0000", "updated": "2014-12-19T05:48:18.000+0000" }, { "id": "337128", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "CR and FT passed. Merged PRs.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-19T07:56:21.000+0000", "updated": "2014-12-19T07:56:21.000+0000" }, { "id": "337130", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Thanks for the super quick fix guys.\r\n\r\nJust patched my 3.5.0.Beta and it works indeed.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-12-19T08:04:47.000+0000", "updated": "2014-12-19T09:15:34.000+0000" }, { "id": "337675", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed using:\r\n\r\nTitanium SDK 3.5.0.v20141222103320\r\nStudio 3.4.1.201410281743 \r\nXcode 6.1.1\r\n\r\nOn: \r\niPad mini, iOS 8.1\r\niPhone 6, iOS 8.2b3\r\niPhone 4S Sim, iOS 8.1", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-30T22:58:44.000+0000", "updated": "2014-12-30T22:58:44.000+0000" }, { "id": "338331", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~ingo] [~ewieber] I can still reproduce it with the code following and the next steps/environment\r\n\r\n1. Tap the button to open the popover\r\n2. Tap the searchbar and enter \"odd\"\r\n3. Hide the soft keyboard using the dedicated button on the soft keyboard\r\n4. App crashes\r\n\r\nTitanium SDK 3.5.0.v20141222103320\r\nCLI 3.4.1\r\nXcode 6.1.1\r\niPad MD788NF/A (Air), iOS 8.1.2\r\n\r\nI've found that it only happens if the number of items filtered is less then needed to fill the few height of the listview. If you increase the number of items to 50 you won't be able to replicate.\r\n\r\n{code}\r\nvar w = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nvar b = Ti.UI.createButton({\r\n title: 'Click Me'\r\n});\r\n\r\nb.addEventListener('click', function() {\r\n\r\n var cw = Ti.UI.createWindow({\r\n width: 300\r\n });\r\n\r\n var items = [];\r\n\r\n for (var i = 1, oe; i <= 20; i++) {\r\n oe = (i % 2 === 0) ? 'even' : 'odd';\r\n items.push({\r\n properties: {\r\n title: 'Row #' + i + ' (' + oe + ')',\r\n searchableText: oe\r\n }\r\n });\r\n }\r\n\r\n var lv = Ti.UI.createListView({\r\n searchView: Ti.UI.createSearchBar(),\r\n sections: [Ti.UI.createListSection({\r\n items: items\r\n })]\r\n });\r\n\r\n cw.add(lv);\r\n\r\n var p = Ti.UI.iPad.createPopover({\r\n contentView: cw\r\n });\r\n\r\n p.show({\r\n view: b\r\n });\r\n});\r\n\r\nw.add(b);\r\nw.open();\r\n{code}", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-01-08T09:11:28.000+0000", "updated": "2015-01-08T09:11:28.000+0000" }, { "id": "338332", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Don't know what happend to the code above. Here it is:\r\n\r\n{code}\r\nvar w = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nvar b = Ti.UI.createButton({\r\n title: 'Click Me'\r\n});\r\n\r\nb.addEventListener('click', function() {\r\n\r\n var cw = Ti.UI.createWindow({\r\n width: 300\r\n });\r\n\r\n var items = [];\r\n\r\n for (var i = 1, oe; i <= 20; i++) {\r\n oe = (i % 2 === 0) ? 'even' : 'odd';\r\n items.push({\r\n properties: {\r\n title: 'Row #' + i + ' (' + oe + ')',\r\n searchableText: oe\r\n }\r\n });\r\n }\r\n\r\n var lv = Ti.UI.createListView({\r\n searchView: Ti.UI.createSearchBar(),\r\n sections: [Ti.UI.createListSection({\r\n items: items\r\n })]\r\n });\r\n\r\n cw.add(lv);\r\n\r\n var p = Ti.UI.iPad.createPopover({\r\n contentView: cw\r\n });\r\n\r\n p.show({\r\n view: b\r\n });\r\n});\r\n\r\nw.add(b);\r\nw.open();\r\n{code}", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-01-08T09:12:11.000+0000", "updated": "2015-01-08T09:12:11.000+0000" }, { "id": "338333", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Ah... shows OK after refresh.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-01-08T09:12:35.000+0000", "updated": "2015-01-08T09:12:35.000+0000" }, { "id": "338383", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-08T18:33:58.000+0000", "updated": "2015-01-08T18:33:58.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }