{ "id": "161039", "key": "TIMOB-23535", "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": null, "resolutiondate": null, "created": "2016-06-13T06:26:07.000+0000", "priority": null, "labels": [], "versions": [], "issuelinks": [ { "id": "56876", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "172171", "key": "TIMOB-26354", "fields": { "summary": "Android: Refactor TabGroup and introduce new style", "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": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2018-10-04T13:45:13.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "here my issue is, in TabGroups I have created four tabs and mapped four controllers to those tabs each. after navigating to any other controller im unable to clear heapmemory or unable to close opened controllers in four tabs\r\n\r\nI have check heap memory creation in ddms tool. It is crashing my android app.\r\n\r\nTest Code:\r\n{code}\r\nvar allUserstories = Alloy.createController('allUserstories').getView();\r\nvar myUserstories = Alloy.createController('myUserstories').getView();\r\nvar confidenceReport = Alloy.createController('confidenceReport').getView();\r\nvar retrospectiveWn = Alloy.createController('retrospectiveWn').getView();\r\n\r\nvar tabGroup = Ti.UI.createTabGroup(\r\n{ tabs : [tab1, tab2, tab3, tab4], smoothScrollOnTabClick : true, }\r\n\r\n);\r\n\r\nvar tab1 = Ti.UI.createTab(\r\n{ window : allUserstories, title : 'All Issues' }\r\n\r\n),\r\ntab2 = Ti.UI.createTab(\r\n{ window : myUserstories, title : 'My Issues' }\r\n\r\n),\r\ntab3 = Ti.UI.createTab(\r\n{ window : confidenceReport, title : 'Confidence Report' }\r\n\r\n),\r\ntab4 = Ti.UI.createTab(\r\n{ window : retrospectiveWn, title : 'Retrospective' }\r\n\r\n);\r\n{code}\r\n\r\n Once I navigate to any other controller like naxtController.js or back to previousController.js I have to destroy all these four tabs associated tab controllers. Where in each controller there consist's a lot of view and other UI objects created which need to garbage collected.\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Memory leak with Ti.UI.TabGroup", "creator": { "name": "saijayanth@vidyayug.com", "key": "saijayanth@vidyayug.com", "displayName": "sai jayanth kumar pasupuleti", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "saijayanth@vidyayug.com", "key": "saijayanth@vidyayug.com", "displayName": "sai jayanth kumar pasupuleti", "active": true, "timeZone": "Asia/Kolkata" }, "environment": null, "comment": { "comments": [ { "id": "388186", "author": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\nThanks for reaching out. To understand your problem better and give you a workaround we need to reproduce the issue in our environment. So it will be appreciated if you give us test code and mention step to reproduce. Please try to give simple test code that reproduces this issue.\r\n\r\nThanks in advance", "updateAuthor": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2016-06-13T06:34:42.000+0000", "updated": "2016-06-13T06:34:42.000+0000" }, { "id": "388190", "author": { "name": "saijayanth@vidyayug.com", "key": "saijayanth@vidyayug.com", "displayName": "sai jayanth kumar pasupuleti", "active": true, "timeZone": "Asia/Kolkata" }, "body": "var allUserstories = Alloy.createController('allUserstories').getView();\r\nvar myUserstories = Alloy.createController('myUserstories').getView();\r\nvar confidenceReport = Alloy.createController('confidenceReport').getView();\r\nvar retrospectiveWn = Alloy.createController('retrospectiveWn').getView();\r\n\t\r\n\t\r\nvar tabGroup = Ti.UI.createTabGroup({\r\n\ttabs : [tab1, tab2, tab3, tab4],\r\n\tsmoothScrollOnTabClick : true,\r\n});\r\n\r\nvar tab1 = Ti.UI.createTab({\r\n\t\twindow : allUserstories,\r\n\t\ttitle : 'All Issues'\r\n\t}),\r\n\t tab2 = Ti.UI.createTab({\r\n\t\twindow : myUserstories,\r\n\t\ttitle : 'My Issues'\r\n\t}),\r\n\t tab3 = Ti.UI.createTab({\r\n\t\twindow : confidenceReport,\r\n\t\ttitle : 'Confidence Report'\r\n\t}),\r\n\t tab4 = Ti.UI.createTab({\r\n\t\twindow : retrospectiveWn,\r\n\t\ttitle : 'Retrospective'\r\n\t});\r\n\t\r\n// Once I navigate to any other controller like naxtController.js or back to previousController.js I have to destroy all these four tabs associated tab controllers. Where in each controller there consist's a lot of view and other UI objects created which need to garbage collected.\t", "updateAuthor": { "name": "saijayanth@vidyayug.com", "key": "saijayanth@vidyayug.com", "displayName": "sai jayanth kumar pasupuleti", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2016-06-13T08:13:20.000+0000", "updated": "2016-06-13T08:13:20.000+0000" }, { "id": "388273", "author": { "name": "saijayanth@vidyayug.com", "key": "saijayanth@vidyayug.com", "displayName": "sai jayanth kumar pasupuleti", "active": true, "timeZone": "Asia/Kolkata" }, "body": "By further debugging, I came to know when we are adding any UI components to the tab mapped controllers, Then it is causing memory leak even if after closing/destroy/ making null the UI components in each tab mapped controller.\r\n\r\n*Note:* When we keep a blank window mapped to a tab(without any UI components) then there is no memory leak issue.", "updateAuthor": { "name": "saijayanth@vidyayug.com", "key": "saijayanth@vidyayug.com", "displayName": "sai jayanth kumar pasupuleti", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2016-06-14T07:16:26.000+0000", "updated": "2016-06-14T07:16:26.000+0000" }, { "id": "388392", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, The code that you provided is not sufficient enough. You need to provide the code that are in seperate controllers with the UI eliments that it has. Also, Its not there, how you are closing/destroy/ making null the UI components in each tab mapped controller. \r\n\r\nSo, Please providde a full reproducible codes in seperate section with the indecated file name. We will try it in our environment. Also, please provide a full list of steps to follow. If we are able to regenerate the issue, we can ascalete the ticket for a fix. But. we need to test the issue. So, we need a full regeneratable code. \r\n\r\nPlease provide your environment info. \r\n\r\nRegards,\r\nSharif.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-06-15T16:21:31.000+0000", "updated": "2016-06-15T16:21:31.000+0000" }, { "id": "388546", "author": { "name": "saijayanth@vidyayug.com", "key": "saijayanth@vidyayug.com", "displayName": "sai jayanth kumar pasupuleti", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Hi,\r\n\r\nI have given a sample android app, Please download it from the below link.\r\nhttps://drive.google.com/file/d/0B-FjGZ0vRJROTm01dnpIWVQtNFE/view?usp=sharing\r\n\r\n1) Deploy app in your mobile with *android:debuggable=\"true\"* in tiapp.xml .\r\n2) Open DDMS tool and check heap memory for the app and note down occupied heap memory.\r\n3) Once app is opened with home controller(1st controller) in your mobile click on *\"Hello, World\"*\r\n4) Check Heap memory which will be changed, it is fine.\r\n5) surf in the given tabs (controllers) with swiping from left to right.\r\n6) Go back to the previous Home controller.\r\n7) Now memory should be released and it must be equal to first noted heap memory size, But check heap memory in DDMS tool where you can find a memory increase/leak of 1 to 2 mb.\r\n\r\nIn real scenario I have created lot many UI components dynamically from tab mapped controllers, which is creating a memory leak of 20mb from laving that tabgroup and navigating to other controllers. \r\n", "updateAuthor": { "name": "saijayanth@vidyayug.com", "key": "saijayanth@vidyayug.com", "displayName": "sai jayanth kumar pasupuleti", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2016-06-17T14:22:50.000+0000", "updated": "2016-06-17T14:25:34.000+0000" }, { "id": "388558", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I was able to follow your instructions and successfully regenerate the issue.\r\n\r\n1. Open DDMS tool and checked heap memory (18.125M).\r\n2. Clicking on \"Hello, World\", checked heap memory (19.37M).\r\n3. Surfing in the given tabs, checked heap memory (20.4M).\r\n4. Going back to previous Home controller, checked heap memory (23.5M).\r\n\r\nI see the issue is happening in Android device 4.4.2. I have tested with SDK 5.3.0.GA. Our engineering team will look into it for a fix. Moving the ticket.\r\n\r\nRegards,\r\nSharif.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-06-17T16:00:22.000+0000", "updated": "2016-06-17T16:02:33.000+0000" }, { "id": "389073", "author": { "name": "saijayanth@vidyayug.com", "key": "saijayanth@vidyayug.com", "displayName": "sai jayanth kumar pasupuleti", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Hi Chee Kiat Ng,\r\n\r\nCan I know the status update on this issue.\r\n\r\nThanks.\r\nP Sai Jayanth Kumar.\r\n ", "updateAuthor": { "name": "saijayanth@vidyayug.com", "key": "saijayanth@vidyayug.com", "displayName": "sai jayanth kumar pasupuleti", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2016-06-25T11:23:38.000+0000", "updated": "2016-06-25T11:23:38.000+0000" }, { "id": "415334", "author": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~saijayanth@vidyayug.com], Can you post a stack trace/log output for the crash?", "updateAuthor": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T18:23:48.000+0000", "updated": "2017-03-23T18:25:10.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }