{ "id": "119981", "key": "TIMOB-15188", "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": "15691", "description": "2013 Sprint 19", "name": "2013 Sprint 19", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15693", "description": "2013 Sprint 19 API", "name": "2013 Sprint 19 API", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "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-16T17:59:09.000+0000", "created": "2013-09-15T21:40:04.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tabgroup", "qe-manualtest", "regression", "triage" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-08-07T20:34:01.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": "h2. Problem\r\nIn version 3.1.3 and above tapping the tab's button to return to the root window of the tab orphans any windows between the current window and the root window. This works as expected in 3.1.2 GA but 3.1.3 has serious regression bug\r\n\r\nh2. Why This Is A Problem\r\nOrphaned windows equate to leaked memory. Windows in the middle of the root and last window are orphaned and all resources are trapped. Causes crash on device after lots of use.\r\n\r\nh2. Expected Behavior\r\nTapping the tab's button should close every window that is open on that tab's stack, not just the current window. On version 3.1.2 it does the following which is correct:\r\n\r\n{code:lang=none|title=3.1.2 Console Log}\r\n[ERROR] : Opened: A\r\n[ERROR] : Opened: B\r\n[ERROR] : Opened: C\r\n[ERROR] : Closed: C\r\n[ERROR] : Closed: B\r\n[ERROR] : Closed: A\r\n{code}\r\n\r\nh2. Reproduction\r\nDrop the following in an app.js. Use the Open Window A, B & C buttons to drill through the widows. Notice in the log which windows were opened, and which were closed. Tap the tab to return to root and only the last window (window c) is closed.\r\n\r\nh2. Test Case\r\n{code:lang=javascript|title=app.js}\r\n// Create Tab Group\r\nvar tabGrp = Ti.UI.createTabGroup({\r\n\tbackgroundColor:'white',\r\n});\r\n\r\n// Tab Window 1\r\nvar win1 = Ti.UI.createWindow({\r\n\tbackgroundColor:'red',\r\n\ttitle:'Tab 1'\r\n});\r\nvar button1 = Ti.UI.createButton({ title: 'Open Window A' });\r\nbutton1.addEventListener('click', function(event) {\r\n\ttab1.open(winA);\r\n});\r\nwin1.add(button1);\r\n\r\n// Tab Window 2\r\nvar win2 = Ti.UI.createWindow({\r\n\tbackgroundColor:'green',\r\n\ttitle:'Tab 2'\r\n});\r\n\r\n// Tab Window 3\r\nvar win3 = Ti.UI.createWindow({\r\n\tbackgroundColor:'blue',\r\n\ttitle:'Tab 3'\r\n});\r\n\r\n// Child Window A\r\nvar winA = Ti.UI.createWindow({\r\n\tbackgroundColor:'yellow',\r\n\ttitle:'Window A'\r\n});\r\nvar buttonA = Ti.UI.createButton({ title: 'Open Window B' });\r\nbuttonA.addEventListener('click', function(event) {\r\n\ttab1.open(winB);\r\n});\r\nwinA.add(buttonA);\r\nwinA.addEventListener('open', function(event) {\r\n\tTi.API.error('Opened: A');\r\n});\r\nwinA.addEventListener('close', function(event) {\r\n\tTi.API.error('Closed: A');\r\n});\r\n\r\n// Child Window B\r\nvar winB = Ti.UI.createWindow({\r\n\tbackgroundColor:'yellow',\r\n\ttitle:'Window B'\r\n});\r\nvar buttonB = Ti.UI.createButton({ title: 'Open Window C' });\r\nbuttonB.addEventListener('click', function(event) {\r\n\ttab1.open(winC);\r\n});\r\nwinB.add(buttonB);\r\nwinB.addEventListener('open', function(event) {\r\n\tTi.API.error('Opened: B');\r\n});\r\nwinB.addEventListener('close', function(event) {\r\n\tTi.API.error('Closed: B');\r\n});\r\n\r\n// Child Window C\r\nvar winC = Ti.UI.createWindow({\r\n\tbackgroundColor:'yellow',\r\n\ttitle:'Window C'\r\n});\r\nwinC.addEventListener('open', function(event) {\r\n\tTi.API.error('Opened: C');\r\n});\r\nwinC.addEventListener('close', function(event) {\r\n\tTi.API.error('Closed: C');\r\n});\r\n\r\n// Add Tabs\r\nvar tab1 = Ti.UI.createTab({window:win1,title:'TAB1'});\r\nvar tab2 = Ti.UI.createTab({window:win2,title:'TAB2'});\r\nvar tab3 = Ti.UI.createTab({window:win3,title:'TAB3'});\r\ntabGrp.addTab(tab1);\r\ntabGrp.addTab(tab2);\r\ntabGrp.addTab(tab3);\r\n\r\n// Open Tab Group\r\ntabGrp.open();\r\n{code}\r\n\r\nh2. Logs\r\n{code:lang=none|title=3.1.3 Console Log}\r\n[ERROR] : Opened: A\r\n[ERROR] : Opened: B\r\n[ERROR] : Opened: C\r\n[ERROR] : Closed: C\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS7: Tapping Tab Orphans Windows on Tab's Stack", "creator": { "name": "isams", "key": "isams", "displayName": "Alastair Price", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "isams", "key": "isams", "displayName": "Alastair Price", "active": true, "timeZone": "Europe/London" }, "environment": "Titanium SDK version: 3.1.3.v20130912132758, 3.1.3.v20130913160104\r\nJavascript Engine: V8\r\nPlatform & version: iOS 7.0\r\nDevice Details: iOS simulator - 7.0\r\nHost Operating System: OS X 10.8.5\r\nTitanium Studio version: 3.1.2.201308091617", "comment": { "comments": [ { "id": "271204", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Valid Bug. Memory Leak.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-16T08:09:28.000+0000", "updated": "2013-09-16T08:09:28.000+0000" }, { "id": "271219", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/4690\r\n3_1_X - https://github.com/appcelerator/titanium_mobile/pull/4691", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-16T10:08:06.000+0000", "updated": "2013-09-16T10:08:06.000+0000" }, { "id": "271334", "author": { "name": "isams", "key": "isams", "displayName": "Alastair Price", "active": true, "timeZone": "Europe/London" }, "body": "Thanks for resolving so quickly!", "updateAuthor": { "name": "isams", "key": "isams", "displayName": "Alastair Price", "active": true, "timeZone": "Europe/London" }, "created": "2013-09-16T19:53:38.000+0000", "updated": "2013-09-16T19:53:38.000+0000" }, { "id": "271436", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the Fix with:\r\nAppcelerator Studio: 3.1.3.201309132456\r\nSDK: 3.1.3.v20130916153052\r\nacs:1.0.6\r\nalloy:1.2.2-cr\r\nnpm:1.3.2\r\ntitanium:3.1.2\r\ntitanium-code-processo:1.0.2\r\nOSX: 10.8.4\r\nXcode:5.0 GM seed\r\nDevices: Simulator(v7.0),ipod Touch2(v7.0)\r\n\r\nTapping the tab's button now closes every window that is open on that tab's stack, not just the current window.Working Fine.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-17T06:41:45.000+0000", "updated": "2013-09-17T06:41:45.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }