{ "id": "86650", "key": "TIMOB-7705", "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": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-03-19T12:45:04.000+0000", "created": "2012-02-17T09:24:57.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "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": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T22:15:09.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "In the attached test case, if you quickly tap \"Open window\" and \"close window\" over and over again, you will eventually see this debug message in the log:\r\n\r\n{code}\r\nI/TiAPI ( 4250): closing window 2\r\nD/Window ( 4250): unable to close, window is not opened\r\n{code}\r\n\r\nThere isn't an associated stack trace, but it seems the fast open/close is causing the internal state tracking in window.js to be out of sync\r\n\r\nHere's the code:\r\n{code}\r\n//create window 1.\r\nTi.API.info(\"opening window 1\");\r\nvar win = Ti.UI.createWindow({ \r\n\tbackgroundColor: \"#fff\", \r\n\tnavBarHidden: true, \r\n\tsoftInputMode: Ti.UI.Android.SOFT_INPUT_ADJUST_RESIZE, \r\n\texitOnClose: true \r\n});\r\nwin.open();\r\n\r\nvar label = Ti.UI.createLabel({ text: \"Window 1\", width: \"auto\", height: \"auto\", top: 10 });\r\nwin.add(label);\r\n\r\nvar openWindow2Button = Ti.UI.createButton({ title: \"Open Window 2\", height: \"auto\", width: \"auto\", bottom: 10 });\r\nopenWindow2Button.addEventListener(\"click\", function() { \r\n\r\n\t//create window 2.\r\n\tTi.API.info(\"opening window 2\");\r\n\tvar win2 = Ti.UI.createWindow({ \r\n\t\tbackgroundColor: \"#fff\",\r\n\t\tnavBarHidden: true,//this causes crash on window 2 close!!\r\n\t\tsoftInputMode: Ti.UI.Android.SOFT_INPUT_ADJUST_RESIZE, \r\n\t\texitOnClose: false \r\n\t});\r\n\twin2.open();\r\n\r\n\tvar label2 = Ti.UI.createLabel({ text: \"Window 2\", width: \"auto\", height: \"auto\", top: 10 });\r\n\twin2.add(label2);\r\n\t\r\n\tvar closeWindow2Button = Ti.UI.createButton({ title: \"Close Window 2\", height: \"auto\", width: \"auto\", bottom: 10 });\r\n\tcloseWindow2Button.addEventListener(\"click\", function() { \r\n\t\tTi.API.info(\"closing window 2\");\r\n\t\twin2.close(); \r\n\t});\r\n\twin2.add(closeWindow2Button);\r\n\r\n\tvar table = Ti.UI.createTableView({ top: 60, bottom: 60, left: 0, right: 0, data: [] });\r\n\twin2.add(table);\r\n\t\r\n});\r\nwin.add(openWindow2Button);\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Quickly opening and closing windows eventually causes new window to not close", "creator": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "JS Runtime: Rhino", "comment": { "comments": [ { "id": "242896", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue does not reproduces \r\n\r\nTested with\r\n\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 (03/11/13 15:43 0c88429)\r\nTitanium SDK version: 3.0.2 (02/07/13 16:46 a4def81)\r\nDevice: Samsung galaxy s duos Android version: 4.0.4\r\n\r\njithinpv", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-19T12:45:04.000+0000", "updated": "2013-03-19T12:45:04.000+0000" }, { "id": "267090", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I have exactly the same issue, but a simplified test like the following doesn't replicate so the weight of the actually windows being closed must be part of the problem:\r\n\r\n{code}\r\nvar appWindow = Ti.UI.createWindow({\r\n backgroundColor: 'red',\r\n exitOnClose: true,\r\n modal: false // Force heavyweight\r\n});\r\n\r\nvar mainWindow = Ti.UI.createWindow({\r\n backgroundColor: 'green',\r\n modal: false // Force heavyweight\r\n});\r\n\r\nmainWindow.addEventListener('click', function () {\r\n Ti.API.info('Main window tapped, now closing main window');\r\n mainWindow.close();\r\n});\r\n\r\nmainWindow.addEventListener('close', function () {\r\n Ti.API.info('Main window closed, now closing app window');\r\n appWindow.close();\r\n});\r\n\r\nappWindow.addEventListener('open', function () {\r\n Ti.API.info('App window opened, now opening main window');\r\n mainWindow.open();\r\n});\r\n\r\nappWindow.open();\r\n{code}", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-08-19T09:25:27.000+0000", "updated": "2013-08-19T09:25:27.000+0000" }, { "id": "267091", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "(deleted - not relevant)", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-08-19T10:13:12.000+0000", "updated": "2013-08-31T08:45:10.000+0000" }, { "id": "414554", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced and due to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T22:15:09.000+0000", "updated": "2017-03-21T22:15:09.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }