{ "id": "101000", "key": "TIMOB-10891", "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": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14165", "description": "2012 Sprint 21 API", "name": "2012 Sprint 21 API", "archived": true, "released": true, "releaseDate": "2012-10-22" }, { "id": "14273", "description": "2012 Sprint 21", "name": "2012 Sprint 21", "archived": true, "released": true, "releaseDate": "2012-10-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-10-17T20:17:19.000+0000", "created": "2012-09-13T04:49:01.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "module_tabgroup", "qe-ios090112", "qe-ios6", "qe-testadded" ], "versions": [ { "id": "14137", "description": "Release 2.1.3", "name": "Release 2.1.3", "archived": true, "released": true, "releaseDate": "2012-10-03" } ], "issuelinks": [ { "id": "21018", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "92848", "key": "TIMOB-9400", "fields": { "summary": "iOS: Children are not removed from parents view hierarchy when context is shutdown", "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": "24266", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "102564", "key": "TIMOB-11986", "fields": { "summary": "iOS: App crashes with: \"A view can only be associated with at most one view controller at a time\"", "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": "Medium", "id": "3" }, "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": "2013-01-08T14:46:27.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": "This is not a regression. It happens on 2.1.2 also.\r\nApp do not crashes on iOS 5.1\r\nSteps to reproduce:\r\n1. Use the app below\r\n{code}\r\nvar basewin = Ti.UI.createWindow();\r\nbasewin.open();\r\n\r\nvar openwin1 = Ti.UI.createButton({\r\n        title:\"Case 1\",\r\n    });\r\n\r\nbasewin.add(openwin1);\r\n\r\nopenwin1.addEventListener('click', function(e) {\r\n\t\tvar tabGroup = Titanium.UI.createTabGroup();\r\n\t\tvar _window = Ti.UI.createWindow();\r\n\t _window.title='Tab 1';\r\n\t _window.backgroundColor='#fff';\r\n\t\r\n\t \r\n\t\tvar tab1 = Titanium.UI.createTab({ \r\n\t\t icon:'KS_nav_views.png',\r\n\t\t title:'Tab 1',\r\n\t\t window:_window\r\n\t\t});\r\n\t\tvar regionSV = {latitude:37.337681,longitude:-122.038193,latitudeDelta:0.04, longitudeDelta:0.04};\r\n\t\t \r\n\t\t var mapview = Titanium.Map.createView({\r\n\t\t mapType: Titanium.Map.STANDARD_TYPE,\r\n\t\t animate:true,\r\n\t\t region: regionSV,\r\n\t\t regionFit:true,\r\n\t\t userLocation:true,\r\n\t\t visible: true,\r\n\t\t});\r\n\t\t_window.add(mapview);\r\n\t\t \r\n\t\tvar win2 = Titanium.UI.createWindow({ \r\n\t\t title:'Tab 2',\r\n\t\t backgroundColor:'#fff'\r\n\t\t});\r\n\t\tvar tab2 = Titanium.UI.createTab({ \r\n\t\t icon:'KS_nav_ui.png',\r\n\t\t title:'Tab 2',\r\n\t\t window:win2\r\n\t\t});\r\n\t\t \r\n\t\tvar label2 = Titanium.UI.createLabel({\r\n\t\t color:'#999',\r\n\t\t text:'I am Window 2',\r\n\t\t font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\t\t textAlign:'center',\r\n\t\t width:'auto'\r\n\t\t});\r\n\t\t \r\n\t\twin2.add(label2);\r\n\t\t \r\n\t\ttabGroup.addTab(tab1); \r\n\t\ttabGroup.addTab(tab2); \r\n\t\ttabGroup.open();\r\n\t\t\r\n\t\tvar close = Ti.UI.createButton({\r\n\t\t        title:\"Close\",\r\n\t\t        bottom:'20dp',\r\n\t\t        height:'35dp',\r\n\t\t        width:'180dp'\r\n\t\t});\r\n\t\t\r\n\t\tclose.addEventListener('click', function(e) {\r\n\t\t        tabGroup.close();\r\n\t\t \t\tbasewin.open();\r\n\t\t});\r\n\t\ttabGroup.add(close); \r\n\t\t\r\n});\r\n{code}\r\n2. Run app on iOS 6.Click the 'Case 1' button.\r\n3. Click the 'Close' button.\r\n4. Click the 'Case 1' button again(may need to repeat steps 2 to 4 couple of times).\r\n\r\nExpected result\r\n2. After step 2, a tabgroup with a map in first tab will get open.\r\n3. Tabgroup will be closed.Initial window will be displayed.\r\n4. Again the tabgroup with a map in first tab should get open.\r\n\r\nActual result:\r\n2. After step 2, a tabgroup with a map in first tab will get open.\r\n3. Tabgroup will be closed.Initial window is displayed.\r\n4. The tabgroup opens up, but after a while the app also crahes.\r\n\r\nDevice logs are attached with the bug.", "attachment": [ { "id": "31252", "filename": "Map1309120457PM.crash", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-13T04:49:01.000+0000", "size": 53669, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "iOS: App having 'tabgroup containing map' crashes when opened from a window (iOS 6)", "creator": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK: 2.1.3.v20120907163110\r\nTitanium  Studio: 2.1.3.201209101847\r\nDevice - iPad iOS 6\r\nMachine OS - MAC 10.8", "closedSprints": [ { "id": 3, "state": "closed", "name": "Release 3.0.0", "startDate": "2012-09-27T05:26:46.636Z", "endDate": "2012-10-08T20:05:00.000Z", "completeDate": "2012-12-20T17:03:19.403Z" } ], "comment": { "comments": [ { "id": "219064", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "On iOS 6 apple changed the mapview engine.Which is not smart enough to stop rendering once the view itself is off screen. Solution is to remove tab after the closing the tabGroup in the close eventListener function. \r\nRemove tab will ensure the mapview is removed properly.This doesnot occur with windows because windows detach views on closing.But tabGroups donot detach tabs on closing, since they can be opened again and the expected behavior is to restore the existing tabs again.\r\n\r\nModified code snippet.\r\n{code}\r\n        close.addEventListener('click', function(e) {\r\n                tabGroup.close();\r\n\t\t\t\ttabGroup.removeTab(tab1);\r\n\t\t\t\ttabGroup.removeTab(tab2);\r\n        });\r\n\r\n{code}", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-14T14:39:10.000+0000", "updated": "2012-09-14T14:39:10.000+0000" }, { "id": "219066", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Marking ticket as invalid. ", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-14T14:39:22.000+0000", "updated": "2012-09-14T14:39:22.000+0000" }, { "id": "219137", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Recommend documenting it for the release on the 18th, and attempting a better fix for the 28th.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-14T22:30:35.000+0000", "updated": "2012-09-14T22:30:35.000+0000" }, { "id": "223354", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "\r\nState Retention Test\r\n1. Set memoryTest variable to false\r\n2. Open tabGroup.\r\n3. Open a bunch of windows on either tab.\r\n4. Close Tab Group.\r\n5. Open Tab Group Again\r\nExpected result - TabGroup is exactly where we left off.\r\n\r\n\r\nMemory Test 1\r\n1. Set memoryTest variable to true\r\n2. Open Tab Group\r\n3. Close Tab Group\r\n4. Simulate memory warning. \r\nExpected result - 1 Button and 1 Window proxy\r\n\r\n\r\nMemory Test 2\r\n1. Set memoryTest variable to true\r\n2. Open Tab Group\r\n3. Switch to Tab2\r\n4. Close Tab Group\r\n5. Simulate memory warning\r\nExpected result - 1 Button and 1 Window proxy\r\n\r\n\r\nMemory Test 3\r\n1. Set memoryTest variable to true\r\n2. Open Tab Group\r\n3. Open a bunch of windows on Tab1\r\n4. Close Tab Group\r\n5. Simulate memory warning\r\nExpected result - 1 Button and 1 Window proxy\r\n\r\n\r\nMemory Test 4\r\n1. Set memoryTest variable to true\r\n2. Open Tab Group\r\n3. Open a bunch of windows on Tab1\r\n4. Switch to Tab2\r\n5. Close Tab Group\r\n6. Simulate memory warning\r\nExpected result - 1 Button and 1 Window proxy\r\n\r\n\r\nMemory Test 5\r\n1. Set memoryTest variable to true\r\n2. Open Tab Group\r\n3. Open a bunch of windows on Tab1\r\n4. Switch to Tab2\r\n5. Open a bunch of windows on Tab2\r\n6. Close Tab Group\r\n7. Simulate memory warning\r\nExpected result - 1 Button and 1 Window proxy\r\n\r\n\r\nTest Code below\r\n\r\n\r\n{code}\r\nvar base = Ti.UI.createWindow({\r\n\tbackgroundColor:'black'\r\n});\r\n\r\nvar b = Ti.UI.createButton({\r\n\ttitle:'OPEN TABGROUP'\r\n})\r\n\r\nbase.add(b);\r\n\r\nvar memoryTest = false;\r\n\r\nvar tabGroup = null;\r\nvar counter1 = 1;\r\nvar initWindow = function(Thetitle, theTab)\r\n{\r\n\tvar win = Ti.UI.createWindow({\r\n\t\tbackgroundColor:'white',\r\n\t\ttitle:Thetitle\r\n\t});\r\n\t\r\n\tvar b1 = Ti.UI.createButton({\r\n\t\ttitle:'CLOSE TAB GROUP',\r\n\t\ttop:10\r\n\t})\r\n\t\r\n\tb1.addEventListener('click',function(){\r\n\t\ttabGroup.close();\r\n\t});\r\n\t\r\n\tvar b2 = Ti.UI.createButton({\r\n\t\ttitle:'ADD ANOTHER',\r\n\t\tbottom:10\r\n\t});\r\n\t\r\n\tb2.addEventListener('click',function(){\r\n\t\tvar temp2 = 'ANOTHER '+counter1;\r\n\t\tvar win1 = initWindow(temp2, theTab);\r\n\t\ttheTab.open(win1);\r\n\t\t\r\n\t});\r\n\t\r\n\twin.addEventListener('open',function(e){\r\n\t\tcounter1 ++;\r\n\t\tTi.API.info('WINDOW OPENED '+counter1);\r\n\t});\r\n\twin.addEventListener('close',function(e){\r\n\t\tcounter1 --;\r\n\t\tTi.API.info('WINDOW CLOSED '+counter1);\r\n\t});\r\n\t\r\n\twin.add(b1);\r\n\twin.add(b2);\r\n\r\n\treturn win;\r\n}\r\n\r\nvar initTabGroup = function()\r\n{\r\n\ttabGroup = Ti.UI.createTabGroup();\r\n\t\r\n\tvar tab1 = Ti.UI.createTab({\r\n\t\ttitle:'THE TAB'\r\n\t});\r\n\tvar win1 = initWindow('TAB1', tab1);\r\n\ttab1.window = win1;\r\n\r\n\tvar tab2 = Ti.UI.createTab({\r\n\t\ttitle:'the TAB'\r\n\t});\r\n\tvar win2 = initWindow('TAB2', tab2);\r\n\ttab2.window = win2;\r\n\t\r\n\ttabGroup.addTab(tab1);\r\n\ttabGroup.addTab(tab2);\r\n}\r\n\r\nb.addEventListener('click',function(){\r\n\r\n\tif (!tabGroup) {\r\n\t\tinitTabGroup();\r\n\t}\r\n\ttabGroup.open();\r\n\t\r\n\tif (memoryTest == true) {\r\n\t\ttabGroup.addEventListener('close',function(){\r\n\t\t\tTi.API.info('TAB GROUP CLOSED');\r\n\t\t\ttabGroup = null;\r\n\t\t});\r\n\t}\r\n\t\r\n});\r\n\r\nbase.open();\r\n{code}\r\n", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-10-13T01:27:35.000+0000", "updated": "2012-10-13T01:29:13.000+0000" }, { "id": "223355", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/3203", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-10-13T01:38:49.000+0000", "updated": "2012-10-13T01:38:49.000+0000" }, { "id": "224072", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "3_0_X PR https://github.com/appcelerator/titanium_mobile/pull/3267", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-10-17T21:42:06.000+0000", "updated": "2012-10-17T21:42:06.000+0000" }, { "id": "224130", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3_0_X crash:\n{code}\nThread 4 name: KrollContext\nThread 4 Crashed:\n0 libobjc.A.dylib \t0x31686fd8 objc_msgSend + 44\n1 CoreFoundation \t0x37aef020 CFRetain + 76\n2 CoreFoundation \t0x37af8bac +[__NSArrayI __new::] + 48\n3 CoreFoundation \t0x37af8ac6 -[__NSPlaceholderArray initWithObjects:count:] + 294\n4 UIKit \t0x34f87aa0 -[UIView dealloc] + 76\n5 libobjc.A.dylib \t0x316880be _objc_rootRelease + 30\n6 UIKit \t0x34f5fb48 -[UIView(Hierarchy) removeFromSuperview] + 176\n7 UIKit \t0x34f87b5e -[UIView dealloc] + 266\n8 UIKit \t0x35029b7e -[UINavigationTransitionView dealloc] + 162\n9 libobjc.A.dylib \t0x316880be _objc_rootRelease + 30\n10 UIKit \t0x34f5fb48 -[UIView(Hierarchy) removeFromSuperview] + 176\n11 UIKit \t0x34f87b5e -[UIView dealloc] + 266\n12 UIKit \t0x35029a88 -[UILayoutContainerView dealloc] + 84\n13 libobjc.A.dylib \t0x316880be _objc_rootRelease + 30\n14 UIKit \t0x3502918e -[UIViewController dealloc] + 222\n15 UIKit \t0x35029010 -[UINavigationController dealloc] + 192\n16 libobjc.A.dylib \t0x316880be _objc_rootRelease + 30\n17 Titanium \t0x0008afd4 0x1000 + 565204\n18 Titanium \t0x0008b0f2 0x1000 + 565490\n19 Titanium \t0x000a69ca 0x1000 + 678346\n20 libobjc.A.dylib \t0x316880be _objc_rootRelease + 30\n21 Titanium \t0x0004c054 0x1000 + 307284\n22 libobjc.A.dylib \t0x316880be _objc_rootRelease + 30\n23 Titanium \t0x0004aaea 0x1000 + 301802\n24 Titanium \t0x00209e62 0x1000 + 2133602\n25 Titanium \t0x00229cc2 0x1000 + 2264258\n26 Titanium \t0x0022a3da 0x1000 + 2266074\n27 Titanium \t0x0022a36e 0x1000 + 2265966\n28 Titanium \t0x00209920 0x1000 + 2132256\n29 Titanium \t0x00044792 0x1000 + 276370\n30 Titanium \t0x00045a0a 0x1000 + 281098\n31 Foundation \t0x31a4ca8a -[NSThread main] + 66\n32 Foundation \t0x31ae059a __NSThread__main__ + 1042\n33 libsystem_c.dylib \t0x35fcec16 _pthread_start + 314\n34 libsystem_c.dylib \t0x35fcead0 thread_start + 0\n\n{code}", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-18T00:40:56.000+0000", "updated": "2012-10-18T00:40:56.000+0000" }, { "id": "229996", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "closing as fixed.\nTested and verified fix with:\nTitanium Studio, build: 3.0.0.201211301903\nTitanium SDK, build: 3.0.0.v20121130200208\nDevice:\niPad mini iOS 6.0.1\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-04T23:50:20.000+0000", "updated": "2012-12-04T23:50:20.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }