{ "id": "174590", "key": "TIMOB-27695", "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": "20949", "name": "Release 9.0.1", "archived": false, "released": true, "releaseDate": "2020-04-16" } ], "resolution": null, "resolutiondate": null, "created": "2019-12-21T01:39:24.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "58446", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "175182", "key": "TIMOB-27980", "fields": { "summary": "Ti.UI.ImageView Test Suite: Titanium.UI.ImageView Acceptance TIMOB-27695 Android only", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "10100", "description": "This Issue Type is used to create Zephyr Test within Jira.", "name": "Test", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-07-20T22:24:46.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "- Heavy image processing methods such as {{imageAsResized}} do not trigger garbage collection and may leave unwanted large blob references that cause {{OutOfMemory}} exceptions.\r\n\r\n*TEST CASE*\r\n{code:js}\r\nconst win = Ti.UI.createWindow({ backgroundColor: 'gray' });\r\nconst img = Ti.UI.createImageView();\r\n\r\nwin.addEventListener('open', async () => {\r\n\r\n // Obtain large image blob. (8205px, 11750px)\r\n let blob = await getImage('https://tinyurl.com/rxob7ju');\r\n\r\n // Keep re-sizing the image down by 10%\r\n for (let i = 0; i < 10; i++) {\r\n\r\n // De-reference original blob so it can be freed.\r\n blob = blob.imageAsResized(blob.width / 1.1, blob.height / 1.1);\r\n\r\n // Idle for 100ms, allowing V8 GC to collect.\r\n // QE: Should not need to do this to display image.\r\n // await new Promise(resolve => setTimeout(resolve, 100));\r\n }\r\n\r\n // Display re-sized image.\r\n img.image = blob;\r\n});\r\n\r\nwin.add(img);\r\nwin.open();\r\n\r\nfunction getImage(url) {\r\n return new Promise((resolve, reject) => {\r\n const client = Ti.Network.createHTTPClient({\r\n onload(e) {\r\n resolve(e.source.responseData);\r\n },\r\n onerror: reject,\r\n timeout : 10000\r\n });\r\n client.open('GET', url);\r\n client.send();\r\n });\r\n}\r\n{code}\r\n- Application should display resized image without crashing", "attachment": [ { "id": "67459", "filename": "TIMOB-27695_log_android 7.1.1.txt", "author": { "name": "srai", "key": "srai", "displayName": "Saumya Rai", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-24T11:07:52.000+0000", "size": 32989, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: Heavy image processing methods do not trigger GC", "creator": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1217, "state": "closed", "name": "2021 Sprint 4", "startDate": "2021-02-16T00:52:00.000Z", "endDate": "2021-02-27T00:52:00.000Z", "completeDate": "2021-02-28T18:56:28.465Z", "originBoardId": 114 }, { "id": 1219, "state": "closed", "name": "2021 Sprint 5", "startDate": "2021-03-01T19:02:00.000Z", "endDate": "2021-03-12T19:02:00.000Z", "completeDate": "2021-03-15T03:30:49.472Z", "originBoardId": 114 }, { "id": 1220, "state": "closed", "name": "2021 Sprint 6", "startDate": "2021-03-15T03:31:12.088Z", "endDate": "2021-03-27T03:31:00.000Z", "completeDate": "2021-03-26T19:18:15.760Z", "originBoardId": 114 }, { "id": 1221, "state": "closed", "name": "2021 Sprint 7", "startDate": "2021-03-29T19:18:00.000Z", "endDate": "2021-04-09T19:18:00.000Z", "completeDate": "2021-04-12T21:26:15.427Z", "originBoardId": 114 }, { "id": 1222, "state": "closed", "name": "2021 Sprint 8", "startDate": "2021-04-12T21:26:41.532Z", "endDate": "2021-04-23T21:26:00.000Z", "completeDate": "2021-04-28T15:13:56.824Z", "originBoardId": 114 }, { "id": 1223, "state": "closed", "name": "2021 Sprint 9", "startDate": "2021-04-26T15:14:42.215Z", "endDate": "2021-05-07T15:14:00.000Z", "completeDate": "2021-05-17T16:30:45.852Z", "originBoardId": 114 }, { "id": 1224, "state": "closed", "name": "2021 Sprint 10", "startDate": "2021-05-17T16:31:32.484Z", "endDate": "2021-05-28T16:31:00.000Z", "completeDate": "2021-05-28T22:15:02.543Z", "originBoardId": 114 }, { "id": 1225, "state": "closed", "name": "2021 Sprint 11", "startDate": "2021-05-28T22:19:23.792Z", "endDate": "2021-06-11T22:19:00.000Z", "completeDate": "2021-06-11T20:29:04.462Z", "originBoardId": 114 }, { "id": 1226, "state": "closed", "name": "2021 Sprint 14", "startDate": "2021-07-20T22:25:18.817Z", "endDate": "2021-08-13T22:25:00.000Z", "completeDate": "2021-09-22T21:41:17.520Z", "originBoardId": 114 }, { "id": 1227, "state": "closed", "name": "2021 Sprint 12", "startDate": "2021-06-11T20:29:43.936Z", "endDate": "2021-06-25T20:29:00.000Z", "completeDate": "2021-07-06T14:26:59.346Z", "originBoardId": 114 }, { "id": 1228, "state": "closed", "name": "2021 Sprint 13", "startDate": "2021-07-06T14:28:47.857Z", "endDate": "2021-07-20T14:28:00.000Z", "completeDate": "2021-07-20T22:24:46.215Z", "originBoardId": 114 }, { "id": 1175, "state": "closed", "name": "2019 Sprint 26", "startDate": "2019-12-16T06:12:12.044Z", "endDate": "2019-12-21T06:12:00.000Z", "completeDate": "2019-12-22T03:07:15.802Z", "originBoardId": 114 }, { "id": 1177, "state": "closed", "name": "2020 Sprint 2", "startDate": "2020-01-20T17:44:37.733Z", "endDate": "2020-01-31T17:44:00.000Z", "completeDate": "2020-01-31T16:57:44.689Z", "originBoardId": 114 }, { "id": 1180, "state": "closed", "name": "2020 Sprint 4", "startDate": "2020-02-17T09:48:41.834Z", "endDate": "2020-02-28T09:48:00.000Z", "completeDate": "2020-02-28T17:07:21.344Z", "originBoardId": 114 }, { "id": 1181, "state": "closed", "name": "2020 Sprint 5", "startDate": "2020-03-02T18:45:02.513Z", "endDate": "2020-03-13T18:45:00.000Z", "completeDate": "2020-03-13T16:42:04.632Z", "originBoardId": 114 }, { "id": 1215, "state": "closed", "name": "2021 Sprint 2", "startDate": "2021-01-18T20:36:00.000Z", "endDate": "2021-01-29T20:36:00.000Z", "completeDate": "2021-01-31T17:42:28.052Z", "originBoardId": 114 }, { "id": 1216, "state": "closed", "name": "2021 Sprint 3", "startDate": "2021-02-01T17:42:00.000Z", "endDate": "2021-02-12T17:42:00.000Z", "completeDate": "2021-02-12T22:01:52.235Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "453424", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/11412", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-02T19:04:58.000+0000", "updated": "2020-01-02T19:04:58.000+0000" }, { "id": "454813", "author": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "body": "*FR: Pass*\r\n\r\n*Test Environment*\r\nSDK Ver: 9.0.0.GA & 9.1.0(this PR)\r\nOS Ver: 10.14.6\r\nAppc NPM: 5.0.0\r\nAppc CLI: 8.0.0\r\nTi CLI Ver: 5.2.2\r\nNode Ver: 10.17.0\r\nJava Ver: 1.8.0_162\r\nDevices: ⇨ Google Pixel 3a (Android 10)", "updateAuthor": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "created": "2020-03-23T15:22:31.000+0000", "updated": "2020-03-23T15:22:31.000+0000" }, { "id": "454839", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master, cherry-picked to 9_0_X for 9.0.1", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-03-24T18:08:52.000+0000", "updated": "2020-03-24T18:08:52.000+0000" }, { "id": "455053", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket.* Fix verified in SDK version 9.1.0.v20200406120646. and 9.0.1.v20200408050151 (Note image took a long time to load, although it could be due to internet connection as the image is 22mb).\r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/11412", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-04-09T14:41:45.000+0000", "updated": "2020-04-09T14:41:45.000+0000" }, { "id": "455927", "author": { "name": "srai", "key": "srai", "displayName": "Saumya Rai", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It works fine on android 10 and android 9.\r\nI am getting below error on android versions < 9.0\r\n{color:#d04437}zygote: Throwing OutOfMemoryError \"Failed to allocate a 33554448 byte allocation with 25165824 free bytes and 28MB until OOM, max allowed footprint 96254928, growth limit 100663296\"\r\n[WARN] W/System.err: java.lang.OutOfMemoryError: Failed to allocate a 33554448 byte allocation with 25165824 free bytes and 28MB until OOM, max allowed footprint 96254928, growth limit 100663296{color}\r\n\r\nReopening the ticket. Log attached for the reference of environment details (TIMOB-27695_log_android 7.1.1.txt)", "updateAuthor": { "name": "srai", "key": "srai", "displayName": "Saumya Rai", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-24T11:01:57.000+0000", "updated": "2020-06-24T11:07:39.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }