{ "id": "154147", "key": "TIMOB-20202", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-01-08T03:04:01.000+0000", "created": "2016-01-06T16:20:18.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2017-03-31T22:06:44.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": "Ti SDK 5.1 introduced permission checks on the camera module to prevent showCamera from being called when a user has denied permission but there are other possible scenarios besides permissions. The TiCameraActivity is missing a try catch block around Camera.open().\r\n\r\nSee Android documentation: http://developer.android.com/reference/android/hardware/Camera.html#open(int)\r\n", "attachment": [], "flagged": false, "summary": "Android: Camera.open() can throw a RuntimeException.", "creator": { "name": "CollinPrice", "key": "collinprice", "displayName": "Collin Price", "active": true, "timeZone": "America/Toronto" }, "subtasks": [], "reporter": { "name": "CollinPrice", "key": "collinprice", "displayName": "Collin Price", "active": true, "timeZone": "America/Toronto" }, "environment": null, "closedSprints": [ { "id": 555, "state": "closed", "name": "2016 Sprint 1 SDK", "startDate": "2016-01-02T01:31:50.127Z", "endDate": "2016-01-16T01:31:00.000Z", "completeDate": "2016-01-18T00:52:43.848Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "373907", "author": { "name": "CollinPrice", "key": "collinprice", "displayName": "Collin Price", "active": true, "timeZone": "America/Toronto" }, "body": "Pull request created:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/7616", "updateAuthor": { "name": "CollinPrice", "key": "collinprice", "displayName": "Collin Price", "active": true, "timeZone": "America/Toronto" }, "created": "2016-01-06T16:22:26.000+0000", "updated": "2016-01-06T16:22:26.000+0000" }, { "id": "374059", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "PR merged.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-01-08T03:04:07.000+0000", "updated": "2016-01-08T03:04:07.000+0000" }, { "id": "374136", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "Yup. If the camera on an android device has locked up, the error callback on the js side is never called.\r\n\r\n~~~\r\n[WARN] [Nexus 6] CameraBase: An error occurred while connecting to camera: 0\r\n~~~\r\n\r\nWrapping in a try/catch on the js side doesnt help, as the app dies on the far side of the bridge.\r\n\r\nNice fix @collinprice\r\n\r\n", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2016-01-10T22:28:49.000+0000", "updated": "2016-01-10T22:28:49.000+0000" }, { "id": "374138", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~sfeather] Thanks for the information. Is there a way that you are testing to get the camera locked up in order to get that error?", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-01-11T01:57:25.000+0000", "updated": "2016-01-11T04:22:41.000+0000" }, { "id": "374147", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "The easiest way has been to use a google branded nexus 6, ProjectFi version of 6.0.1, no January 2016 security patch, you can trigger an error by getting the autofocus to get confused (try to get the lense close enough to an object that the autofocus just tries its darndest to engage). \r\nIf the app locks up, it usually leaves the camera hardware in an unstable state. \r\nNext app to try and grab the hardware will get an error.\r\n\r\nI'd add, that maybe look into extending Collin's pr, that we be sure the showCamera() error callback be sent back across the bridge to JS so the exception can be handled smoothly there.\r\n\r\nPower cycling a locked device should clear the hardware.", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2016-01-11T03:53:05.000+0000", "updated": "2016-01-11T03:53:05.000+0000" }, { "id": "416565", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed, if there are any problems, please file a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-31T22:06:44.000+0000", "updated": "2017-03-31T22:06:44.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }