{ "id": "62376", "key": "TIMOB-1744", "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": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2012-07-26T11:44:06.000+0000", "created": "2011-04-15T03:01:09.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "crash", "ios", "memory", "modal", "window" ], "versions": [], "issuelinks": [ { "id": "19376", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94532", "key": "TIMOB-9901", "fields": { "summary": "TiAPI: Review and clean up platform bugs and reduce bug count by 20%.", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-26T22:19:22.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": "{html}
I have reason to believe that the close event on a window\nhappens before all its assets are released from memory. I'm doing\nthis in the iPhone only. I'll explain below.
\nI create a modal window, and use the url property:
\n\nvar searchModal = Ti.UI.createWindow({ \n navBarHidden:true, \n url:'includes/search.js' \n});
\n
\nsearch.js has about 400k in image assets and\nabout 50k in JS includes (about a thousand lines of code total)\ninside it.
\nWhen opening and closing the modal, I do the following:
\n\nopenButton.addEventListener('click',function(){ \n searchModal.open(); \n});
\n
\nThen inside search.js:
\ncloseButton.addEventListener('click',function(){ \n searchModal.close();\n});
\n
\nIf I open the modal, close it, then immediately click the open\nbutton again, the app crashes. I can make it crash over and over\nagain. I put an event listener on the window close and notice that\nI'm clicking on the openButton after the 'close' event\nfires, and it still crashes.
\nIf I disable openButton once\nsearchModal opens, then re-enable it on the window\n'close' event, I can still get it to crash. However, if I\nre-enable openButton after about a 1000ms delay, I\ncan't ever get it to crash:
\n\nsearchModal.addEventListener('close',function(){\n setTimeout(function(){\n openButton.enabled = true; \n },1000);\n});
\n
\nPlease advise. Thank you!
Ticket title is misleading. Probably another proxy thing.
Also maybe not invalid.