{ "id": "173427", "key": "TIMOB-26967", "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": "20432", "name": "Release 8.0.1", "archived": false, "released": true, "releaseDate": "2019-05-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-05-15T22:02:32.000+0000", "created": "2019-04-02T03:27:13.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "issuelinks": [], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2019-05-15T22:02: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": [ { "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" } ], "attachment": [ { "id": "66542", "filename": "iPhoneXs.png", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-05T02:41:54.000+0000", "size": 31416, "mimeType": "image/png" }, { "id": "66541", "filename": "New Project.png", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-05T02:34:46.000+0000", "size": 49699, "mimeType": "image/png" }, { "id": "66543", "filename": "New Project (1).png", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-05T02:43:52.000+0000", "size": 172792, "mimeType": "image/png" }, { "id": "66536", "filename": "Xcode10.1_v8.0.1v20190401125424.png", "author": { "name": "wwong", "key": "wwong", "displayName": "Wayn Wong", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-03T02:27:33.000+0000", "size": 100264, "mimeType": "image/png" }, { "id": "66532", "filename": "xcode9_8.1.0.v20190328075104.png", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-02T03:27:03.000+0000", "size": 145175, "mimeType": "image/png" }, { "id": "66531", "filename": "xcode9_v6.3.0.GA.png", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-02T03:27:03.000+0000", "size": 149134, "mimeType": "image/png" }, { "id": "66530", "filename": "xcode9_v8.0.1.v20190401125424.png", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-02T03:27:03.000+0000", "size": 143783, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Memory leak in Ti.API.debug", "creator": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1128, "state": "closed", "name": "2019 Sprint 9", "startDate": "2019-04-14T19:05:00.000Z", "endDate": "2019-04-26T19:05:00.000Z", "completeDate": "2019-04-26T22:05:13.933Z", "originBoardId": 114 }, { "id": 1129, "state": "closed", "name": "2019 Sprint 10", "startDate": "2019-04-28T22:06:00.000Z", "endDate": "2019-05-17T22:06:00.000Z", "completeDate": "2019-05-20T16:48:42.522Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "447452", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Can you share a sample app that reproduces the issue? Please share steps to reproduce also. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-04-03T16:45:37.000+0000", "updated": "2019-04-03T16:45:37.000+0000" }, { "id": "447461", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "i have updated the description with more details, thanks", "updateAuthor": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-03T23:12:32.000+0000", "updated": "2019-04-03T23:12:32.000+0000" }, { "id": "447466", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~luke_lu],\r\nDid you manage to test on SDK Release 8.0.1?", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-04-04T08:42:34.000+0000", "updated": "2019-04-04T08:42:34.000+0000" }, { "id": "447484", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes Rakhi Mitro, we tested on 8.0.1 as well with the same result.", "updateAuthor": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-05T02:29:52.000+0000", "updated": "2019-04-05T02:29:52.000+0000" }, { "id": "447485", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "So, we again tested the app without API call, this time, we open the photo gallery and select an image and test on various devices/SDK version. We still can see the memory leak issue.\r\n\r\nVersions:\r\n_{color:#707070}Operating System\r\n Name = Mac OS X\r\n Version = 10.14.3\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 17179869184\r\n \r\n Node.js\r\n Node.js Version = 8.0.0\r\n npm Version = 5.0.0\r\n \r\n Titanium CLI\r\n CLI Version = 5.1.1\r\n \r\n Titanium SDK\r\n SDK Version = 8.1.0.v20190328075104\r\n SDK Path = /Users/suchanbadyakar/Library/Application Support/Titanium/mobilesdk/osx/8.1.0.v20190328075104\r\n Target Platform = iphone{color}_\r\n\r\n\r\nMemory profile for iphone 6s plus (12.2)\r\n !New Project.png|thumbnail! \r\n\r\nCode: \r\nfunction openGalleryClick(e) {\r\n\tTitanium.Media.openPhotoGallery({\r\n\t});\r\n}\r\n", "updateAuthor": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-05T02:35:31.000+0000", "updated": "2019-04-05T02:41:07.000+0000" }, { "id": "447486", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Memory profile for iPhone Xs(12.2)\r\n\r\n !iPhoneXs.png|thumbnail! \r\nfor the first click, it seems to release memory but afterwards same.\r\n\r\nApp view\r\n !New Project (1).png|thumbnail! \r\n\r\nSo, basically memory profile looks perfect for 6.X.X but breaks after 7.X.X for\r\n- API call\r\n- Photo Gallery", "updateAuthor": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-05T02:44:33.000+0000", "updated": "2019-04-05T02:47:26.000+0000" }, { "id": "447487", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We were able to replicate the same issue in the KitchenSink-v2 as well\r\nhttps://github.com/appcelerator/kitchensink-v2", "updateAuthor": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-05T04:25:34.000+0000", "updated": "2019-04-05T04:25:34.000+0000" }, { "id": "447520", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~luke_lu], if you compare between 6.3.0 and 8.0.0 please make sure to have {{true}} set. Otherwise you will be comparing the memory management of two different JS engines.\r\n\r\nNow, I couldn't see any leaks related to network requests anymore. However, the memory allocation indeed keeps growing when running you example. After some investigation i found out that the {{Ti.API.debug(this.responseText);}} statement is responsible for allocating a huge amount of memory and leaking it. In this case this is due to printing the response text. If you remove that statement you will also see the memory being released after some time (around 20 request and 2-3 minutes wait).\r\n\r\nMoving this to TIMOB for further investigation to leaks related to {{Ti.API.debug}}.\r\n", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-04-08T14:01:58.000+0000", "updated": "2019-04-08T14:01:58.000+0000" }, { "id": "447538", "author": { "name": "wwong", "key": "wwong", "displayName": "Wayn Wong", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi @jan, thanks for the update. ", "updateAuthor": { "name": "wwong", "key": "wwong", "displayName": "Wayn Wong", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-09T07:04:56.000+0000", "updated": "2019-04-09T07:04:56.000+0000" }, { "id": "448158", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~cwilliams], this appears to be the issue. I assumed there was some kind of leak but i did another check and it is indeed the log message queue that is responsible for the growing allocation one can see in instruments.\r\n\r\n[~amukherjee], this is an additional important fix we should take into 8.0.2!", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-05-02T21:27:47.000+0000", "updated": "2019-05-02T21:27:47.000+0000" }, { "id": "448286", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "So, it is getting better. we were able to get performance optimization when tried 8.1.X.\r\nBut our app got rejected from the app store for the following reason:\r\n#1: \"*Your app crashed on iPad running iOS 12.2 on WiFi when we:*\r\n\r\n- Log in using the provided credentials\r\n- Afterwards, the app crashes on launch\r\n\r\nWe have attached detailed crash logs to help troubleshoot this issue.\"\r\n\r\nAttached within the crash log they sent.\r\n\r\n*# 2: On investigation, we are getting this error that may be the cause of the issue*\r\n[ERROR] Could not load _index_.json require index, error was File not found\r\n[ERROR] Script Error: Couldn't find module: ./app for architecture: arm64\r\n\r\n\r\nAny idea how we can fix this, without this we cannot proceed forward in the app store.", "updateAuthor": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-05-10T05:38:25.000+0000", "updated": "2019-05-10T05:38:25.000+0000" }, { "id": "448344", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "8_0_X : https://github.com/appcelerator/titanium_mobile/pull/10886", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-05-13T21:26:01.000+0000", "updated": "2019-05-13T21:26:01.000+0000" }, { "id": "448360", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*FR Passed*, waiting on Jenkins build. [~cwilliams] [~jvennemann] were you able to take a quick look at the comment above? ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-05-14T12:00:27.000+0000", "updated": "2019-05-14T12:00:27.000+0000" }, { "id": "448363", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master/8_0_X.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-05-14T14:28:12.000+0000", "updated": "2019-05-14T14:28:12.000+0000" }, { "id": "448364", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "As for the \"missing\" {{_index_.json}} file, that is something the CLI build writes into the app. If you're trying to take the Xcode project from the app build and then run that under Xcode, it's likely that file won't exist (and is not a workflow we support).\r\n\r\nAre you seeing that using a normal SDK CLI/Studio build, or does that only happen when trying to build via Xcode?", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-05-14T14:36:43.000+0000", "updated": "2019-05-14T14:36:43.000+0000" }, { "id": "448381", "author": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "8.0.X fixed the crashing issue. Thank you so much, that saved my day. \r\n\r\nRegarding \"missing index.json\", Yes I tried to build from Xcode. I was able to build from Xcode for titanium SDK 7.4.1 but not after 8.X.X. But yeah thats not that important as we do build from the cli and was using Xcode to debug.", "updateAuthor": { "name": "luke_lu", "key": "luke_lu", "displayName": "Luke Lu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-05-15T00:44:04.000+0000", "updated": "2019-05-15T00:44:04.000+0000" }, { "id": "448413", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 8.0.1.v20190514113328.\r\n\r\nClosing.\r\n\r\nStudio Ver: 5.1.2.201903111843\r\nSDK Ver: 8.0.1.v20190514113328\r\nOS Ver: 10.14\r\nXcode Ver: Xcode 10.1\r\nAppc NPM: 4.2.13\r\nAppc CLI: 7.0.11\r\nDaemon Ver: 1.1.3\r\nTi CLI Ver: 5.1.1\r\nAlloy Ver: 1.13.9\r\nNode Ver: 8.15.1\r\nNPM Ver: 6.4.1\r\nJava Ver: 10.0.2\r\nIOS Device: Iphone 10 IOS 12", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-05-15T22:01:46.000+0000", "updated": "2019-05-15T22:01:46.000+0000" } ], "maxResults": 20, "total": 20, "startAt": 0 } } }