{ "id": "171179", "key": "TIMOB-25803", "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": null, "resolutiondate": null, "created": "2018-02-24T00:38:24.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "19957", "description": "", "name": "Release 7.1.0", "archived": false, "released": true, "releaseDate": "2018-03-14" }, { "id": "20099", "name": "Release 7.2.0", "archived": false, "released": true, "releaseDate": "2018-06-14" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-02-26T18:39:29.000+0000", "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" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h5.Steps to reproduce:\r\n1. Use the code below in your app.js:\r\n{code}\r\nvar window = Ti.UI.createWindow(),\r\n tableView = Ti.UI.createTableView(),\r\n start = Ti.UI.createButton({\r\n title: 'START',\r\n left: '10dp',\r\n bottom: '10dp',\r\n });\r\n\r\nstart.addEventListener('click', function(e) {\r\n Ti.Media.openPhotoGallery({\r\n allowMultiple: true,\r\n allowEditing: false,\r\n autohide: true,\r\n mediaTypes: Ti.Media.MEDIA_TYPE_PHOTO,\r\n success: function(e) {\r\n \r\n for (let i in e.images) {\r\n var row = Ti.UI.createTableViewRow({title: e.images[i].media.file.name});\r\n\r\n row.addEventListener('click', function() {\r\n var child = Ti.UI.createWindow();\r\n child.add(Ti.UI.createImageView({\r\n image: e.images[i].media\r\n }));\r\n\r\n child.addEventListener('open', function(){\r\n setTimeout(() => { child.close() }, 1000);\r\n });\r\n\r\n child.open();\r\n });\r\n\r\n tableView.appendRow(row);\r\n }\r\n }\r\n });\r\n});\r\n\r\nwindow.add([tableView, start]);\r\nwindow.open();\r\n{code}\r\n2. Build for android device with lesser ram like Nexus 5.\r\n3. After the app launch tap start & select photos from the device.\r\n4. They will appear in a tableview.\r\n5. Tap each tableviewrow to open the image.\r\n6. Image should open in an imageview & close after a timeout of 1000ms i.e 1 sec.\r\n7. Continue doing this for few trys.\r\n\r\nh5.Actual results:\r\n1. We see an app crash & error :\r\n{code}\r\n[ERROR] : JavaObject: !!! OH NO! We tried to move a weak Java object back to strong, but it's aleady been GC'd by JVM! We're in a bad state! Key: 1449486177\r\n{code}\r\n2. According to [~gmathews], this can be improved by improving the imageview cache.\r\n\r\nh5.Expected result:\r\n1. The app should not crash & the images should keep opening in the imageview.", "attachment": [], "flagged": false, "summary": "Android: Improve Imageview cache on devices with lesser ram", "creator": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Studio Ver: 5.0.0.201712081732\r\nSDK Ver: latest 7.1.0 or 7.2.0\r\nOS Ver: 10.13.2\r\nXcode Ver: Xcode 9.2\r\nAppc NPM: 4.2.12\r\nAppc CLI: 7.0.2\r\nDaemon Ver: 1.0.1\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.11.0\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Nexus 5 --- Android 6.0.1\r\n ⇨ google Nexus 6P --- Android 8.0.0", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }