{ "id": "116375", "key": "TIMOB-14532", "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": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-07-22T17:15:03.000+0000", "created": "2013-06-24T13:49:38.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "Mobile", "Titanium", "android", "mobilesdk" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "30355", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "117137", "key": "TIMOB-14540", "fields": { "summary": "Android: blob.imageAsResize causes java error", "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 } } } }, { "id": "30157", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "103377", "key": "AC-1984", "fields": { "summary": "Android: Titanium.Media.showCamera crashes for pictures of 6MP or more", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "39262", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "133516", "key": "AC-1631", "fields": { "summary": "Android: Titanium.Media.showCamera crashes for large images on load of ti.paint module", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T23:24:39.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": "*Problem*\r\nWhen using the imageAsResized function on a blob it causes a java memory error when using a device which has a camera with 6 megapixels or more.\r\n\r\nI used the code below on the Galaxy S3, and a lot of times it causes an error, sometimes it doesn't. When i set the camera to 3.2 megapixels for example the issue doesn't occur.\r\n\r\n*Steps to reproduce*\r\n1. Tap Open Camera\r\n2. Take photo\r\n3. Save photo\r\n4. Repeat until Runtime Error appears (see attachment)\r\n\r\n*Test case*\r\n{code:javascript}\r\nvar win1 = Titanium.UI.createWindow({\r\n\ttitle : 'cameratest',\r\n\tbackgroundColor : '#fff'\r\n});\r\n\r\nvar button = Titanium.UI.createButton({\r\n\tcolor : '#999',\r\n\ttitle : 'Open camera'\r\n});\r\n\r\nwin1.add(button);\r\n\r\nbutton.addEventListener(\"click\", function(e) {\r\n\tTi.Media.showCamera({\r\n\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO],\r\n\t\tsuccess : function(e) {\r\n\t\t\tvar width = e.media.width, height = e.media.height, scaleFactor = Math.sqrt((width * height ) / (1600 * 1200 ));\r\n\r\n\t\t\tif (scaleFactor > 1) {\r\n\t\t\t\twidth /= scaleFactor;\r\n\t\t\t\theight /= scaleFactor;\r\n\r\n\t\t\t\tvar image = e.media.imageAsResized(width, height);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n});\r\n\r\nwin1.open();\r\n{code}", "attachment": [ { "id": "40206", "filename": "IMG_0383.jpg", "author": { "name": "raymond.de.wit", "key": "raymond.de.wit", "displayName": "Raymond de Wit", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-25T15:13:33.000+0000", "size": 2972751, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "Android: blob.imageAsResized causes java error", "creator": { "name": "raymond.de.wit", "key": "raymond.de.wit", "displayName": "Raymond de Wit", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "raymond.de.wit", "key": "raymond.de.wit", "displayName": "Raymond de Wit", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Mobile SDK, Android", "comment": { "comments": [ { "id": "259202", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "To help us out, please could you edit your test case to be runnable in an app.js?\n\nAlso, please attach the error you're getting: logs, or a screenshot.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-24T18:09:55.000+0000", "updated": "2013-06-24T18:09:55.000+0000" }, { "id": "261535", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on Samsung Galaxy S3 4.0.4 with Ti SDK 3.2 CI (latest).", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-11T23:34:55.000+0000", "updated": "2013-07-11T23:34:55.000+0000" }, { "id": "262672", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of TIMOB-14540", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-22T17:15:03.000+0000", "updated": "2013-07-22T17:15:03.000+0000" }, { "id": "414147", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T23:24:39.000+0000", "updated": "2017-03-20T23:24:39.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }