{ "id": "89490", "key": "TIMOB-8518", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13404", "description": "Sprint 2012-12 Core", "name": "Sprint 2012-12 Core", "archived": true, "released": true, "releaseDate": "2012-06-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-12-13T06:32:58.000+0000", "created": "2012-04-04T15:05:25.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_media", "qe-3.2.0", "qe-closed-3.2.0", "qe-testadded", "regression", "triage" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [ { "id": "33371", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "122867", "key": "TIMOB-15810", "fields": { "summary": "Android: Media: ImageView is not setting the captured image", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "17509", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "92294", "key": "TIMOB-9226", "fields": { "summary": "Android: Review composite layout feature requests", "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 } } } }, { "id": "17748", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "89195", "key": "TIMOB-8432", "fields": { "summary": "Android: Camera - On V8, taking a picture at least twice causes an OutOfMemoryError exception", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-25T19:12:18.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "This behavior can be seen when running the KS (1.8.2 version) camera test. Setting the width for the image view in the success callback to Ti.UI.FILL will result in the bounds of the bitmap created not being able to be determined. A work around of setting width to win.size.width addresses the symptom but there appears to be a timing issue where the bounds of the bitmap are determined before the Ti.UI.SIZE value is computed resulting in massive bitmaps with no scaling. This can result in memory issues.\r\n\r\nIt is suspected that this is a order of operations issue that needs to be addressed.", "attachment": [], "flagged": false, "summary": "Android: ImageView does not handle width or height set to Ti.UI.FILL correctly", "creator": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "196585", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Opie, can you attach an example ?", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-30T14:40:59.000+0000", "updated": "2012-05-30T14:40:59.000+0000" }, { "id": "198217", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test case:\r\n{code}\r\nvar win = Titanium.UI.createWindow({backgroundColor:'white'});\r\nwin.open();\r\nTitanium.Media.showCamera({\r\n\r\n\tsuccess:function(event)\r\n\t{\r\n\t\tvar cropRect = event.cropRect;\r\n\t\tvar image = event.media;\r\n\r\n\t\tTi.API.debug('Our type was: '+event.mediaType);\r\n\t\tif(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO)\r\n\t\t{\r\n\t\t\tvar imageView = Ti.UI.createImageView({\r\n\t\t\t\twidth:Ti.UI.FILL,\r\n\t\t\t\theight:Ti.UI.FILL,\r\n\t\t\t\timage:event.media\r\n\t\t\t});\r\n\t\t\twin.add(imageView);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\talert(\"got the wrong type back =\"+event.mediaType);\r\n\t\t}\r\n\t},\r\n\tcancel:function()\r\n\t{\r\n\t},\r\n\terror:function(error)\r\n\t{\r\n\t\t// create alert\r\n\t\tvar a = Titanium.UI.createAlertDialog({title:'Camera'});\r\n\r\n\t\t// set message\r\n\t\tif (error.code == Titanium.Media.NO_CAMERA)\r\n\t\t{\r\n\t\t\ta.setMessage('Please run this test on device');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ta.setMessage('Unexpected error: ' + error.code);\r\n\t\t}\r\n\r\n\t\t// show alert\r\n\t\ta.show();\r\n\t},\r\n\tsaveToPhotoGallery:true,\r\n\tallowEditing:true,\r\n\tmediaTypes:[Ti.Media.MEDIA_TYPE_VIDEO,Ti.Media.MEDIA_TYPE_PHOTO]\r\n});\r\n{code}\r\n\r\n1. Launch the app, and take a picture\r\n2. Click \"save\"\r\n\r\nExpected Results:\r\nYou should see the image in the next screen (a newly created image view)\r\n\r\nActual results:\r\nYou see a white screen and you get an out of memory error in the logs.\r\n\r\nNOTE: You may need to run this on a phone with a high megapixel camera. I am using galaxy s2.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-12T14:03:13.000+0000", "updated": "2012-06-12T14:03:13.000+0000" }, { "id": "198218", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The problem is that we create a full bitmap that is no scaled when we pass in a value like Ti.UI.FILL. This causes the out of memory exception. We need to handle the Ti.UI.FILL case correctly.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-12T14:05:12.000+0000", "updated": "2012-06-12T14:05:36.000+0000" }, { "id": "198226", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR ready: https://github.com/appcelerator/titanium_mobile/pull/2378", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-12T14:21:38.000+0000", "updated": "2012-06-12T14:21:38.000+0000" }, { "id": "199940", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix with\r\nTitanium Studio, build: 2.1.0.201206221045\r\nTitanium SDK: 2.1.0.v20120622174154\r\nDevice: Nexus S 4.0.4\r\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-23T15:05:20.000+0000", "updated": "2012-06-23T15:05:39.000+0000" }, { "id": "202316", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Reopening to update labels.", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-07-10T04:04:35.000+0000", "updated": "2012-07-10T04:04:35.000+0000" }, { "id": "281271", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to reproduce this issue on sdk 3.2.0.v20131122172908.I don't see the image in the imageView after capturing & saving the image.\r\nReopening.\r\n\r\nEnvironment:\r\nAppcel Studio : 3.2.0.201311221207\r\nTi SDK : 3.2.0.v20131122172908\r\nMac OSX : 10.8.5\r\nAlloy : 1.3.0-alpha6\r\nCLI - 3.2.0-alpha\r\nNexus 5 - android 4.4\r\nSamsung Galaxy S4 running android 4.2.2", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-11-25T22:51:37.000+0000", "updated": "2013-11-25T23:06:12.000+0000" }, { "id": "281522", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Before 3.2.0, the white window is a LW window which is the root activity. So the camera activity is on top of the root activity, and when the root activity is resumed (the camera activity is closed), the camera callback is invoked.\nOn 3.2.0, the white window is a HW window. But since opening a HW window is an async process, the camera activity is still on top of the root activity not the window activity. Therefore the camera callback will not be invoked until the root activity is resumed (the window activity is closed).\n\nTo test this ticket, we can either add {code}true{code} to tiapp.xml, or modify the test case to\n{code}\nvar win = Titanium.UI.createWindow({\n\tbackgroundColor : 'white'\n});\nwin.open();\nwin.addEventListener(\"open\", function() {\n\tTitanium.Media.showCamera({\n\n\t\tsuccess : function(event) {\n\t\t\tvar cropRect = event.cropRect;\n\t\t\tvar image = event.media;\n\n\t\t\tTi.API.debug('Our type was: ' + event.mediaType);\n\t\t\tif (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {\n\t\t\t\tvar imageView = Ti.UI.createImageView({\n\t\t\t\t\twidth : Ti.UI.FILL,\n\t\t\t\t\theight : Ti.UI.FILL,\n\t\t\t\t\timage : event.media\n\t\t\t\t});\n\t\t\t\twin.add(imageView);\n\t\t\t} else {\n\t\t\t\talert(\"got the wrong type back =\" + event.mediaType);\n\t\t\t}\n\t\t},\n\t\tcancel : function() {\n\t\t},\n\t\terror : function(error) {\n\n\t\t},\n\t\tsaveToPhotoGallery : true,\n\t\tallowEditing : true,\n\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_VIDEO, Ti.Media.MEDIA_TYPE_PHOTO]\n\t});\n}); \n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-26T21:56:19.000+0000", "updated": "2013-11-26T21:56:19.000+0000" }, { "id": "284177", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested Environment:\r\n\r\nAppcelerator Studio: 3.2.0.201312121648\r\nSDK:3.2.0.v20131212122847\r\nalloy: 1.3.0-cr\r\nacs: 1.0.10\r\nnpm: 1.3.2\r\ntitanium: 3.2.0-cr3\r\ntitanium-code-processor: 1.1.0-cr2\r\nXcode:5.0.2\r\nOS: Mac OSX 10.9\r\nDevice: Google Nexus7(v4.3),Iphone5s(v7.0.2)\r\n\r\n\r\n\r\nImageView respecting Ti.UI.Fill for both height and width.\r\nClosing as working fine. ", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-13T05:31:13.000+0000", "updated": "2013-12-13T05:31:13.000+0000" }, { "id": "284184", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening just add qe closed label", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-13T06:32:25.000+0000", "updated": "2013-12-13T06:32:25.000+0000" }, { "id": "284185", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Updated label.Hence closing", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-13T06:32:58.000+0000", "updated": "2013-12-13T06:32:58.000+0000" }, { "id": "310953", "author": { "name": "speedyankur@gmail.com", "key": "speedyankur@gmail.com", "displayName": "ankur garha", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have tested it again with Ti SDK 3.2.0, Its working when we set width and height both to Ti.UI.FILL. \r\n\r\nBut if we set only width to Ti.UI.FILL then its not working .", "updateAuthor": { "name": "speedyankur@gmail.com", "key": "speedyankur@gmail.com", "displayName": "ankur garha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-25T19:12:18.000+0000", "updated": "2014-06-25T19:12:18.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }