{ "id": "88875", "key": "TIMOB-8314", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13277", "name": "Sprint 2012-08", "archived": true, "released": true, "releaseDate": "2012-04-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-12-16T18:16:13.000+0000", "created": "2012-03-26T15:26:27.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "core", "module_window", "qe-testadded", "regression" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-16T21:46:15.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": "h4. Problem description\r\nI have a NavigationGroup, and two windows. Intermittently, when the second window is closed, the first window goes comatose (won't respond to any clicks).\r\n\r\nh4. Actual results\r\nthe window is not throwing the close event when closing. \r\n\r\nh4. Expected results\r\nthe window should throw the close event when closing\r\n\r\nh4. Test case\r\n1. Create a mobile project\r\n2. Add this three files\r\n{code:title=app.js|borderStyle=solid}\r\nvar FirstWindow=Ti.UI.createWindow({\r\n url:'MOMain.js',\r\n layout:'vertical',\r\n navBarHidden:false\r\n });\r\nTi.App.NavGroup=Ti.UI.iPhone.createNavigationGroup({window:FirstWindow});\r\nvar NavBase=Ti.UI.createWindow();\r\nNavBase.add(Ti.App.NavGroup);\r\nNavBase.open(); // this opens the \"root\" window, which is FirstWindow, automatically\r\n{code}\r\n\r\n{code:title=MOMain.js|borderStyle=solid}\r\nvar MainWin=Ti.UI.currentWindow;\r\n\r\n function OnFocus(evt)\r\n {\r\n if (evt.source == MainWin)\r\n {\r\n Ti.App.CurrentWindow=MainWin;\r\n }\r\n }\r\n\r\nMainWin.title='Here is something';\r\nTi.App.CurrentWindow=MainWin;\r\nMainWin.addEventListener('focus',OnFocus);\r\n\r\n function SetupButtonClick()\r\n {\r\n var SecondWin=Ti.UI.createWindow({\r\n url:'MOSetup.js',\r\n layout:'vertical',\r\n navBarHidden:false\r\n });\r\n Ti.App.NavGroup.open(SecondWin,{animated:true});\r\n }\r\nvar SetupButton=Ti.UI.createButton({width:200,\r\n height:100,\r\n title:'Hit Me'});\r\nSetupButton.addEventListener('click',SetupButtonClick);\r\nMainWin.add(SetupButton);\r\n{code}\r\n\r\n{code:title=MOMain.js|borderStyle=solid}\r\nvar Win2=Ti.UI.currentWindow;\r\n\r\n function HandleiPhoneCloseEvent()\r\n {\r\n if (Ti.App.DevelopmentMode)\r\n Ti.API.info('# Window HandleiPhoneCloseEvent fired');\r\n Win2.removeEventListener('close',HandleiPhoneCloseEvent);\r\n Win2=null; // attempt to release the window's memory\r\n }\r\n\r\nWin2.title='Window 2';\r\nTi.App.CurrentWindow=Win2;\r\nWin2.addEventListener('close',HandleiPhoneCloseEvent); // catches the iPhone NavGroup back button close\r\n{code}\r\n\r\n3. Run the app\r\n4. Click on the \"Hit Me\" button\r\n5. Click the navgroup's back button\r\n6. Try to click on the \"Hit Me\" button again\r\n\r\nh4. Extra info\r\nThis seems to be timing dependent, so you may have to repeat the 2 clicks several times. I can make it happen in under 30 seconds...usually within 5 seconds. My best reproduction comes by waiting 2.5 seconds before clicking the back button. If you have trouble reproducing this, vary the time between seeing the second window and clicking the back button (faster and then slower).\r\n\r\nAfter some investigation, I can see that the 'close' event of the second window never fires when the problem occurs (neither does the focus event of the first window).\r\n\r\nThis seems to point to a serious flaw. In a larger app, the failure occurs 80% of the time. Our app is totally dead in the water because of this, and we need to release it soon. Can you please take a look into this?\r\n\r\nPlease note that I've reduced this down about as far as possible, while still demonstrating the error. Removing any of the references to Ti.App or removing any of the event listeners hides the problem, but all of my apps are dependent on these.", "attachment": [ { "id": "28661", "filename": "TIMOB-8314.zip", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-23T15:35:57.000+0000", "size": 3123518, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Close event is not firing when closing a window", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": "Titanium SDK version: 2.0.0 (03/25/12 21:33 963fcfe)\r\nPlatform & version: iOS 5.0 \r\nDevice Details: iOS simulator \r\nHost Operating System: OSX 10.7.3 \r\nTitanium Studio version: 1.0.9", "comment": { "comments": [ { "id": "189778", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "The issue isn't just that the 'close' event doesn't occur...it's that no events occur and the entire UI goes dead. It has something to do with going \"back\" from a NavigationGroup (either by calling NavGroup.close(TheWindow) or simply clicking the native \"back\" button). The *previous* window doesn't get a focus event either, although it is shown.\r\n", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-04-04T06:25:22.000+0000", "updated": "2012-04-04T06:25:22.000+0000" }, { "id": "189779", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "HD ticket: http://support.appcelerator.com/tickets/APP-494437", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-04-04T06:25:59.000+0000", "updated": "2012-04-04T06:25:59.000+0000" }, { "id": "189817", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "More info: This is a *regression* that occurred between SDK 1.7.5 and SDK 1.8.0.1.\r\n\r\nWorks fine in 1.7.5\r\n\r\nBroken in 1.8.0.1, 1.8.1, 1.8.2, and 2.0.0.v...\r\n", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-04-04T09:30:36.000+0000", "updated": "2012-04-04T09:30:36.000+0000" }, { "id": "190863", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "More info: I can make this happen in a larger app, even after I removed the NavigationGroup and native Navbar, so the root cause of the problem may not be NavigationGroups at all.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-04-13T08:51:43.000+0000", "updated": "2012-04-13T08:51:43.000+0000" }, { "id": "191217", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can't reproduce. Attempted with sample app on iPod 4GT and iPhone Sim 5.1, with specified instructions with 2.1.0.c7fc284 (master @ 4/13/2012). We either require a more specific test which can reliably demonstrate this issue, or a confirmation that the problem has been resolved.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-16T15:19:44.000+0000", "updated": "2012-04-16T15:19:44.000+0000" }, { "id": "191273", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Stephen, please consider reopening this ticket. The highest version of iOS I tested on is iOS *5.0*, as specified in the Environment details. I have never found an exact set of steps that will reproduce this problem consistently, but the testcase I have presented in this ticket will produce the problem within 5 to 30 seconds max if you keep at it. I think your best bet for finding this problem is to use the 2.0.0 (03/25/12 21:33 963fcfe) SDK version with the iOS 5.0 simulator and see it break. Hopefully you can look at some kind of trace/log to find the problem, and then look for that same problem in the latest master SDK.\r\n\r\nI can provide a full-sized project that reproduces this problem. Federico reproduced it with the testcase (see the HD ticket referenced above).", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-04-16T19:13:29.000+0000", "updated": "2012-04-16T19:13:29.000+0000" }, { "id": "191311", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "I just reproduced this with the testcase shown in this ticket with *2 clicks*, using SDK 2.1.0.v20120416160358 and the 5.0 iOS simulator. Like I said in the ticket's text, \"My best reproduction comes by waiting 2.5 seconds before clicking the back button.\" Stephen, please email me directly if you still can't make this happen. Thanks.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-04-17T05:45:47.000+0000", "updated": "2012-04-17T05:45:47.000+0000" }, { "id": "191820", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Issue reopened because the test case is reproducable", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-04-19T09:35:02.000+0000", "updated": "2012-04-19T09:35:02.000+0000" }, { "id": "192110", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR merged https://github.com/appcelerator/titanium_mobile/pull/2038", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-20T14:28:19.000+0000", "updated": "2012-04-20T14:28:19.000+0000" }, { "id": "198008", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Verified fixed in SDK 2.1.0.v20120608174150.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-06-11T10:39:24.000+0000", "updated": "2012-06-11T10:39:24.000+0000" }, { "id": "199952", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as Fixed.\r\n\r\nSDK: 2.1.0.v20120622174154\r\nStudio: 2.1.0.201206221045\r\nOS: Lion 10.7.4\r\nXcode: 4.3.2\r\nDevices Tested: iPod 4.3.3, iPad3 5.1.1, iPhone Simulator 5.1\r\n\r\nTest Steps\r\n\r\n1. Run attached project TIMOB-8314.zip\r\n2. Perform the following cycle 30 times:\r\n\r\nOpen and close the window by pressing: 'Hit Me' then 'Here is something'\r\n\r\nExpected Result:\r\n\r\nFirst window should never freeze up.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-23T15:35:57.000+0000", "updated": "2012-06-23T15:35:57.000+0000" }, { "id": "336480", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue is seen with SDK : 3.5.0.v20141215113314. The close event does not fire & the first window goes dead(nothing happens on clicking \"Hit Me\"). \r\n\r\nI am able to reproduce this issue with in 2 clicks.\r\n\r\nThis is a regression. Issue is not seen with 3.4.1.GA.\r\n\r\nReopening.\r\n\r\nEnvironment:\r\nAppc Studio : 3.4.1.201410281743\r\nTi SDK : 3.5.0.v20141215113314\r\nCLI : 3.4.1\r\nAlloy : 1.5.1 GA\r\nCode Processor : 1.1.1\r\nMAC Yosemite : 10.10\r\nIphone 5S - 8.0.2\r\nIpad 3 - 8.1\r\nXCode - Version 6.1.1\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-16T00:23:37.000+0000", "updated": "2014-12-16T00:24:35.000+0000" }, { "id": "336483", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving into 3.5.0. We can bump it out if necessary. [~jalter] and [~cng], could you take a look?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-16T00:30:37.000+0000", "updated": "2014-12-16T00:31:27.000+0000" }, { "id": "336506", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "At a glance, the sample code uses Ti.UI.iPhone.NavigationGroup which has been removed since 3.2.0.\r\nIt has been replaced with Ti.UI.iOS.NavigationWindow. (since 3.1.3)\r\n [~lchoudhary], Is there an updated code sample so that we can reproduce this error?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-16T03:05:46.000+0000", "updated": "2014-12-16T03:06:30.000+0000" }, { "id": "336534", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Here's a simple test case for catching the close event:\r\n{code}\r\nvar win2 = Titanium.UI.createWindow({\r\n backgroundColor: 'red',\r\n title: 'Red Window'\r\n});\r\n\r\nvar win1 = Titanium.UI.iOS.createNavigationWindow({\r\n window: win2\r\n});\r\n\r\nvar win3 = Titanium.UI.createWindow({\r\n backgroundColor: 'blue',\r\n title: 'Blue Window'\r\n});\r\n\r\nvar button = Titanium.UI.createButton({\r\n title: 'Open Blue Window'\r\n});\r\nbutton.addEventListener('click', function(){\r\n win1.openWindow(win3, {animated:true});\r\n});\r\n\r\nwin2.add(button);\r\nvar button2 = Titanium.UI.createButton({\r\n title: 'Close Blue Window'\r\n});\r\nbutton2.addEventListener('click', function(){\r\n win1.closeWindow(win3, {animated:false});\r\n});\r\n\r\nwin3.add(button2);\r\n\r\nfunction HandleiPhoneCloseEvent()\r\n{\r\n Ti.API.info('# Window HandleiPhoneCloseEvent fired');\r\n}\r\n \r\nwin3.addEventListener('close',HandleiPhoneCloseEvent); // also catches the iPhone back button close\r\n\r\nwin1.open();\r\n{code}\r\n\r\nWorks fine in Environment:\r\nAppc Studio : 3.4.1.201410281743\r\nTi SDK : latest build, 3.5.0.v20141125154115, 3.4.1 GA\r\nCLI : 3.4.1\r\nMAC Yosemite : 10.10.1\r\niOS simulator - 7.1, 8.1\r\nXCode - Version 6.1", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-16T07:32:41.000+0000", "updated": "2014-12-16T09:17:52.000+0000" }, { "id": "336588", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cng] Verified it & the issue is not reproducible when using Ti.UI.iOS.NavigationWindow. \r\nClosing the ticket.\r\n\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-16T18:04:04.000+0000", "updated": "2014-12-16T18:04:22.000+0000" }, { "id": "336594", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The reopening of the issue was not valid as the test used NavigationGroup which is removed & is not reproducible with Navigationwindow.\r\n\r\nReverting back to the original resolution: \"Fixed\".", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-16T18:16:13.000+0000", "updated": "2014-12-16T18:16:13.000+0000" }, { "id": "413174", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue has been fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-16T21:46:15.000+0000", "updated": "2017-03-16T21:46:15.000+0000" } ], "maxResults": 19, "total": 19, "startAt": 0 } } }