{ "id": "76285", "key": "TIMOB-4367", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-02-06T14:48:32.000+0000", "created": "2011-06-13T09:04:36.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tableviewrow", "qe-and012312", "qe-nfc", "qe-testadded" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "issuelinks": [ { "id": "15407", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "86988", "key": "TIMOB-7810", "fields": { "summary": "iOS: TableviewRow - Cannot run code from TIMOB-4367", "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 } } } }, { "id": "15079", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "85481", "key": "TIMOB-7409", "fields": { "summary": "Android: Memory leak for proxies that have no references", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "14809", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "84138", "key": "TIMOB-6809", "fields": { "summary": "Android: V8: Ti.Media.Android.scanMediaFiles - Runtime Error - 'Uncaught Error: Invalid value, expected type Array'", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T22:07: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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h1. Problem\r\nTable view rows that you create are never released.\r\n\r\nh2. Reproduction\r\n1. Drop the following in an app.js\r\n2. Load up DDMS and watch the Allocations or Sysinfo / Memory usage.\r\n3. Touch the \"Create big table view\" button in the app; a table view with 1500 rows will be created.\r\n4. Refresh the sysinfo and see how the memory footprint has grown.\r\n5. Hit the \"Back\" button in the app; the window is closed and the variables nullified.\r\n6. Refresh the sysinfo and see that the memory footprint hasn't changed.\r\n7. Repeat steps 3-7 and the memory footprint will only continue to grow.\r\n\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({ backgroundColor:'#fff' });\r\n\r\nvar btn = Ti.UI.createButton({\r\n color: 'black', layout:'center',\r\n title: 'Create big table view'\r\n});\r\nwin.add(btn);\r\nwin.open();\r\nbtn.addEventListener('click', function() {\r\n var newWin = Ti.UI.createWindow({\r\n backgroundColor: '#fff',\r\n layout:'vertical'\r\n });\r\n var back = Ti.UI.createButton({\r\n color: 'black', top: 10,\r\n title: 'Back'\r\n });\r\n newWin.add(back);\r\n\r\n var tv = createBigTableView();\r\n newWin.add(tv);\r\n newWin.open();\r\n\r\n function clickListener() {\r\n back.removeEventListener('click', clickListener);\r\n newWin.close();\r\n tv.data = null;\r\n tv = null;\r\n newWin = null;\r\n back = null;\r\n }\r\n\r\n back.addEventListener('click', clickListener);\r\n});\r\n\r\nfunction createBigTableView() {\r\n var data = [];\r\n for (i = 1; i <= 1500; i++) {\r\n data.push(createCustomTableViewRow('RowsNMore', i));\r\n }\r\n return Ti.UI.createTableView({\r\n top:0, bottom:0, left:0, right:0,\r\n separatorColor: 'white',\r\n data: data\r\n });\r\n}\r\n\r\nfunction createCustomTableViewRow(label1text, label2text) {\r\n var row = Ti.UI.createTableViewRow({ className: 'customTVRow' });\r\n var vw = Ti.UI.createView({layout: 'vertical'});\r\n row.add(vw);\r\n vw.add(Ti.UI.createLabel({\r\n text: label1text, color: 'black',\r\n font: {fontSize: '9pt', fontWeight: 'bold'}\r\n }));\r\n vw.add(Ti.UI.createLabel({\r\n text: label2text, color: 'gray',\r\n font: {fontSize: '7pt', fontWeight: 'normal'}\r\n }));\r\n return row;\r\n}\r\n{code}\r\n\r\nh3. Associated Helpdesk Ticket\r\nhttp://appc.me/c/APP-321721", "attachment": [ { "id": "25349", "filename": "amaze 2.3.4 v8 1.8.1.png", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-26T13:57:14.000+0000", "size": 46335, "mimeType": "image/png" }, { "id": "25350", "filename": "amaze 2.3.4 v8 1.8.1.txt", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-26T13:57:14.000+0000", "size": 53227, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: Table View Row Memory Leak", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium SDK version: 1.7.0 (06/06/11 15:46 64155ee...)", "comment": { "comments": [ { "id": "167724", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Pull request:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/522", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-03T19:55:20.000+0000", "updated": "2011-10-03T19:55:20.000+0000" }, { "id": "173812", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix on a Nexus One running 2.2.2 and an HTC Evo 4G running 2.3.3 with SDK 1.8.0.1.v20111122105459. Memory usage increases when rows are created and decreases when the back button is pressed.", "updateAuthor": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-22T15:16:05.000+0000", "updated": "2011-11-22T15:16:05.000+0000" }, { "id": "180734", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening as Valid.\r\nSDK: 1.8.1.v20120125154634\r\nAndroid: V8\r\nStudio: 1.0.8.201201210622\r\nOS: Lion\r\nDevices Tested: Nexus One 2.2.2, Amaze 2.3.4, Galaxy Tab 10.1 3.1\r\n\r\nThis test-case causes the app to crash after about 2-4 runs, depending on the device. The memory footprint continues to grow in DDMS. This code cannot be tested in 1.8.0.1 due to TIMOB-6809. There is no crash nor significant memory allocation in 1.7.5, though the fix was supposed to be in 1.8.0.\r\n\r\nDevice Results:\r\n\r\nNexus One: Crash.\r\nAmaze: Runtime error, freeze, then crash.\r\nGalaxy Tab 10.1: Freeze, then crash.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-26T13:53:16.000+0000", "updated": "2012-01-26T13:53:16.000+0000" }, { "id": "180735", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This but cannot be tested in 1.8.0.1 due to TIMOB-6809.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-26T13:54:32.000+0000", "updated": "2012-01-26T13:54:32.000+0000" }, { "id": "180736", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Attached screenshot and crash log for Amaze 2.3.4 V8 1.8.1 crash.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-26T13:58:03.000+0000", "updated": "2012-01-26T13:58:03.000+0000" }, { "id": "182079", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "1500 rows is a bit much for tableview. I tested with 500 rows and GC is cleaning up- this is done rather slowly at times but GC is collecting the table. It'd be best if QE can run customer app against latest CI build to see if memory is still an issue.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-06T12:52:08.000+0000", "updated": "2012-02-06T12:52:08.000+0000" }, { "id": "182109", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of 7409", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-06T14:48:32.000+0000", "updated": "2012-02-06T14:48:32.000+0000" }, { "id": "415083", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate and links to the related ticket have been provided above.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T22:07:35.000+0000", "updated": "2017-03-22T22:07:35.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }