{ "id": "162316", "key": "TIMOB-23711", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2016-08-02T15:44:10.000+0000", "created": "2016-08-01T17:43:35.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-5.4.0" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "issuelinks": [ { "id": "52313", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "162248", "key": "TIMOB-23701", "fields": { "summary": "iOS: close() is applied to multiple window views with Storyboard enabled", "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": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-08-02T16:38:32.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": [], "description": "*This does not occur with 5.3.1.GA*\r\n\r\nwhen opening and closing the window a couple of times, I receive the following DEBUG log: \r\n{code:java}\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n{code}\r\n\r\nThe log count is incremented every time I cycle through Open / Close. For example after 5 cycles I receive the following:\r\n{code:java}\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n[DEBUG] : Window is not open. Ignoring this close call\r\n{code}\r\n\r\n( 1 + 2 + 3 + 4 + 5 ) \r\n\r\nh3. TEST CODE\r\n{code:java}\r\nTi.UI.backgroundColor = \"Black\";\r\n \r\nvar win = Ti.UI.createWindow({backgroundColor:'blue'});\r\n \r\nvar open = Ti.UI.createButton({\r\n\ttitle: 'Open Window'\t\r\n});\r\n \r\nvar close = Ti.UI.createButton({\r\n\ttitle: 'Close Window'\r\n});\r\n \r\nopen.addEventListener('click', function(){\r\n\tvar win2 = Ti.UI.createWindow({backgroundColor:'green'});\r\n\twin2.add(close);\r\n\tclose.addEventListener('click', function(){\r\n\t\twin2.close();\r\n\t});\r\n\twin2.open();\r\n});\r\n \r\nwin.add(open);\r\nwin.open();\r\n{code}\r\n\r\nh2. Steps to Reproduce\r\n1. Create a new Classic Mobile Project.\r\n2. Copy above test code into app.js file.\r\n4. Run App to device / sim.\r\n5. Click on \"Open Window\" button.\r\n6. Click on \"Close Window\" button.\r\n7. Repeat Steps 5-6 to receive the log message\r\n\r\nh2. Actual Result\r\n\r\nIncrementing count of {{[DEBUG] : Window is not open. Ignoring this close call}}\r\n\r\nh2. Expected Result\r\n\r\n{{[DEBUG] : Window is not open. Ignoring this close call}} only when relevant, and should not increment every cycle. ", "attachment": [], "flagged": false, "summary": "iOS: Incrementing instances of \"Window is not open Ignoring this close call\" on win.close() ", "creator": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "environment": "iPhone 6S (9.3.3) Device\r\nMac OSX El Capitan 10.11.5 \r\nTi SDK: 5.4.0.v20160801022303\r\nAppc Studio: 4.7.0.201607111053\r\nAppc NPM: 4.2.7\t\r\nApp CLI: 5.4.0-37\r\nXcode 7.3\r\nNode v4.4.7", "comment": { "comments": [ { "id": "392139", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I'm wondering if that could be related to the event-listeners inside the event-listener causing. But as you're saying it didn't happen in 5.3.1.GA, it's making me unsure.\r\n\r\n*EDIT*: The {{close}} button is defined outside the scope, I'm 80 % sure that's the problem here. That would also explain, why the sum of logs (1+2+3+4+5) is as it is, because the existing event-listeners are still being triggered because they are scoped to the {{close}} button outside the click-event.\r\n\r\n*EDIT2*: And the reason why it isn't logged in 5.3.1.GA may be, because the log is only thrown when using main-thread.\r\n\r\n*EDIT3*:\r\nNot reproducible anymore using the correct demo-code following here:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({backgroundColor:'blue'});\r\n \r\nvar open = Ti.UI.createButton({\r\n\ttitle: 'Open Window'\t\r\n});\r\n \r\nopen.addEventListener('click', function(){\r\n\tvar win2 = Ti.UI.createWindow({backgroundColor:'green'});\r\n\t\r\n\tvar close = Ti.UI.createButton({\r\n\t\ttitle: 'Close Window'\r\n\t});\r\n\t\r\n\twin2.add(close);\r\n\tclose.addEventListener('click', function(){\r\n\t\twin2.close();\r\n\t});\r\n\twin2.open();\r\n});\r\n \r\nwin.add(open);\r\nwin.open();\r\n{code}\r\n\r\n[~htbryant] Please verify and close, thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-01T19:14:12.000+0000", "updated": "2016-08-01T19:20:50.000+0000" }, { "id": "392205", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Resolving as invalid for now, [~htbryant] to confirm.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-02T15:44:10.000+0000", "updated": "2016-08-02T15:44:10.000+0000" }, { "id": "392216", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Can confirm that the issue was the {{close}} button being defined outside of the scope. Closing as Invalid. ", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-02T16:38:25.000+0000", "updated": "2016-08-02T16:38:25.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }