{ "id": "140533", "key": "TIMOB-18096", "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": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-12-02T18:43:22.000+0000", "created": "2014-11-25T20:38:30.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "issuelinks": [ { "id": "43445", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "outwardIssue": { "id": "136864", "key": "TIMOB-17740", "fields": { "summary": "iOS: Aborting upload causes file to stay in RAM", "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": "2015-01-08T02:07:36.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": "12305", "name": "Core", "description": "Central component of the Platform (outside of Tooling, or platform specific implementation details)" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Titanium proxies are not being released.\r\n\r\nProxies are released correctly using 3.4.1.GA\r\n\r\nh6. Steps to reproduce:\r\n1. Run the code below\r\n2. Run instruments on the xcode project generated\r\n3. Look at allocations\r\n4. Filter by \"proxy\"\r\n5. Click the buttons in the example app.\r\n6. Notice that the proxies are never released\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"white\",\r\n layout: 'vertical'\r\n});\r\nwin.open();\r\n \r\naddButton({\r\n title: 'create objects',\r\n callback: function(e) {\r\n var view = Ti.UI.createView();\r\n var httpClient = Titanium.Network.createHTTPClient();\r\n var file = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory,'app.js');\r\n }\r\n});\r\n\r\naddButton({\r\n title: 'open window',\r\n callback: function(e) {\r\n openWindow();\r\n }\r\n});\r\n \r\nfunction addButton(args) {\r\n var b1 = Ti.UI.createButton({\r\n title: args.title,\r\n top: 40\r\n });\r\n b1.addEventListener('click', args.callback);\r\n win.add(b1);\r\n}\r\n\r\nfunction openWindow() {\r\n var win2 = Ti.UI.createWindow({\r\n backgroundColor: 'blue'\r\n });\r\n var v = Ti.UI.createView({\r\n backgroundColor: 'red',\r\n height: 50, width: 50\r\n });\r\n win2.add(v);\r\n win2.addEventListener('click', function() {\r\n win2.close();\r\n });\r\n win2.open();\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Proxies not being released", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 3_5_X and master branch", "closedSprints": [ { "id": 258, "state": "closed", "name": "2014 Sprint 24 SDK", "startDate": "2014-11-24T22:28:25.425Z", "endDate": "2014-12-06T01:00:00.000Z", "completeDate": "2014-12-08T17:21:15.171Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "333705", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "h5. 3.4.1.GA\r\n# Event Type ∆ RefCt RefCt Timestamp Responsible Library Responsible Caller\r\n Malloc/Retain/Autorelease/Release (7) 08:43.458.260 Test -[TiModule createProxy:forName:context:]\r\n1 Retain +1 2 08:43.458.287 Test -[KrollObject initWithTarget:context:]\r\n2 Retain +1 3 08:43.458.323 Test -[KrollBridge registerProxy:krollObject:]\r\n3 Autorelease 08:43.458.422 Test -[KrollMethod call:]\r\n4 Release -1 2 08:43.458.449 Test KrollCallAsFunction\r\n5 Release -1 1 09:04.565.618 Test -[KrollBridge unregisterProxy:]\r\n6 Release -1 0 09:04.565.619 Test -[KrollObject dealloc]\r\n7 Free 0 09:04.565.632 Test -[TiProxy dealloc]\r\n\r\nh5. master\r\n# Event Type ∆ RefCt RefCt Timestamp Responsible Library Responsible Caller\r\n0 Malloc +1 1 00:04.624.994 Titanium -[TiModule createProxy:forName:context:]\r\n1 Retain +1 2 00:04.625.020 Titanium -[KrollObject initWithTarget:context:]\r\n2 Retain +1 3 00:04.625.046 Titanium -[KrollBridge registerProxy:krollObject:]\r\n3 Autorelease 00:04.625.137 Titanium -[KrollMethod call:]\r\n4 Release -1 2 00:04.625.157 Titanium KrollCallAsFunction\r\n\r\n\r\nIt looks like ~KrollFinalizer~ doesn't get called in master", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-25T20:45:56.000+0000", "updated": "2014-11-25T21:22:22.000+0000" }, { "id": "333896", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Looks like the behavior of the Garbage Collector has changed. \r\nKrollFinalizer does get called but there has to be real memory pressure.\r\n\r\nI modified the sample as shown below and was successfully able to get the GC to kick in and collect objects periodically. \r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"white\",\r\n layout: 'vertical'\r\n});\r\nwin.open();\r\n \r\naddButton({\r\n title: 'create objects',\r\n callback: function(e) {\r\n var view = Ti.UI.createView();\r\n var httpClient = Titanium.Network.createHTTPClient();\r\n var file = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory,'app.js');\r\n }\r\n});\r\n \r\naddButton({\r\n title: 'open window',\r\n callback: function(e) {\r\n openWindow();\r\n }\r\n});\r\n \r\nfunction addButton(args) {\r\n var b1 = Ti.UI.createButton({\r\n title: args.title,\r\n top: 40\r\n });\r\n b1.addEventListener('click', args.callback);\r\n win.add(b1);\r\n}\r\n \r\nfunction openWindow() {\r\n var win2 = Ti.UI.createWindow({\r\n backgroundColor: 'blue',\r\n layout:'horizontal'\r\n });\r\n for (var i=0;i<500;i++) {\r\n var v = Ti.UI.createView({\r\n backgroundColor: 'red',\r\n height: 50, width: 50,\r\n top:5, left:5\r\n });\r\n\r\n var l = Ti.UI.createLabel({text: i})\r\n v.add(l);\r\n win2.add(v);\r\n }\r\n win2.addEventListener('click', function() {\r\n win2.close();\r\n });\r\n win2.open();\r\n}\r\n{code}\r\n\r\nGoing to resolve this as Invalid", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-11-26T18:21:44.000+0000", "updated": "2014-11-26T18:21:44.000+0000" }, { "id": "334350", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\nhttps://github.com/appcelerator/tijscore/pull/18", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-02T17:37:53.000+0000", "updated": "2014-12-02T17:37:53.000+0000" }, { "id": "335720", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note, this evidently is a problem with using the built-in JavaScriptCore.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-09T22:39:35.000+0000", "updated": "2014-12-09T22:39:35.000+0000" }, { "id": "338314", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.10.1\r\nAppcelerator Studio, build: 3.4.1.201410281743\r\nTitanium SDK build: 3.5.0.v20150106102524\r\nTitanium CLI, build: 3.4.1\r\nAlloy: 1.5.1\r\nXcode 6.1.1\r\niPhone 6 Plus (8.1)\r\n\r\nRan the attached code and filtered for proxies in Instrument->Allocations, the proxies are being released as expected.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-01-08T02:07:20.000+0000", "updated": "2015-01-08T02:07:20.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }