{ "id": "154439", "key": "TIMOB-20260", "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": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-02-04T22:03:18.000+0000", "created": "2016-01-20T23:56:19.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Android6.0", "camera", "module_media", "qe-testadded" ], "versions": [ { "id": "17072", "name": "Release 5.1.2", "archived": false, "released": true, "releaseDate": "2016-01-12" }, { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2017-07-10T11:04:25.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": "h6. Issue Description\r\nAndroid 6.0 camera view with overlay sometimes hangs after taking a picture. The hang resumes for about 45 seconds to a minute after which the app crashes with message \"AppName is not responding\". After closing the app camera issue persist. Even native camera app is not working as the result of this crash. The only way to restore both apps to working state is to restart users device.\r\n\r\nThis was tested on on Nexus 9 tablet and Nexus 5X devices running Marshmallow 6.0.1\r\n\r\nh6.Steps to replicate: \r\n# Create a new Alloy Default Project\r\n# Open the app folder and replace the existing folders with the attached files\r\n# Run\r\n# Press \"Open Camera\" button; you should be presented with camera screen with an \r\noverlay. \r\n# Press \"Take\" button \r\n# If the app does not crash a preview screen will appear with captured picture. If that \r\nhappens either press \"Keep\" button to return to main page or press \"Retake\" button \r\nto come back to camera screen. \r\n# Keep taking pictured until crash is reproduced (it sometimes takes a few tries to \r\nreproduce). \r\n", "attachment": [ { "id": "58034", "filename": "cameraTest.zip", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-01-20T23:55:48.000+0000", "size": 7213, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android 6: CameraView with overlay crash with message \"AppName is not responding\"", "creator": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android Marshmallow 6.0.1\r\nSDK 5.1.2GA", "closedSprints": [ { "id": 580, "state": "closed", "name": "2016 Sprint 3 SDK", "startDate": "2016-01-30T01:31:48.991Z", "endDate": "2016-02-13T01:31:00.000Z", "completeDate": "2016-02-15T05:32:40.725Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "375759", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm sorry ! please download the full test-case here: \r\n\r\nhttps://drive.google.com/file/d/0BwTWo-c2a0b9OFhTZzVtR0IzMDQ/view?usp=sharing\r\n\r\n", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-02-02T20:25:29.000+0000", "updated": "2016-02-02T20:25:29.000+0000" }, { "id": "375983", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "5_2_X PR: https://github.com/appcelerator/titanium_mobile/pull/7679\r\nMaster PR: https://github.com/appcelerator/titanium_mobile/pull/7680", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-02-04T04:03:17.000+0000", "updated": "2016-02-04T04:06:27.000+0000" }, { "id": "376064", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nThere is no ANR & issue if camera not being released due to it.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.5.0.201601262138\r\nTi SDK : 5.2.0.v20160204140025\r\nTi CLI : 5.0.6\r\nAlloy : 1.7.33\r\nMAC Yosemite : 10.10.5\r\nAppc NPM : 4.2.3-2\r\nAppc CLI : 5.2.0-242\r\nNode: 4.2.2\r\nNexus 6P - Android 6.0", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-02-04T23:54:47.000+0000", "updated": "2016-02-04T23:54:47.000+0000" }, { "id": "393008", "author": { "name": "mfogg", "key": "mfogg", "displayName": "Mike Fogg", "active": true, "timeZone": "America/New_York" }, "updateAuthor": { "name": "mfogg", "key": "mfogg", "displayName": "Mike Fogg", "active": true, "timeZone": "America/New_York" }, "created": "2016-08-12T14:44:09.000+0000", "updated": "2016-08-12T14:44:09.000+0000" }, { "id": "393239", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~mfogg] So you are getting multiple success? Which is caused by https://github.com/appcelerator/titanium_mobile/pull/7679/files?\r\n\r\nCould you provide the a sample app if you can and the log.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-08-16T04:15:53.000+0000", "updated": "2016-08-16T04:15:53.000+0000" }, { "id": "393270", "author": { "name": "mfogg", "key": "mfogg", "displayName": "Mike Fogg", "active": true, "timeZone": "America/New_York" }, "updateAuthor": { "name": "mfogg", "key": "mfogg", "displayName": "Mike Fogg", "active": true, "timeZone": "America/New_York" }, "created": "2016-08-16T11:08:14.000+0000", "updated": "2016-08-16T11:08:14.000+0000" }, { "id": "394381", "author": { "name": "mfogg", "key": "mfogg", "displayName": "Mike Fogg", "active": true, "timeZone": "America/New_York" }, "body": "For anyone who's running into this issue (and feels like hacking in a solution like we did), the solution we came up with was to only allow the \"onAutoFocus\" callback to be fired once.\r\n\r\nWe modified that function to include:\r\n\r\n{code}\r\n// Globally add this\r\n...\r\nprivate static boolean blockAutoFocus = false;\r\n...\r\n{code}\r\n\r\nAnd then replace the takePicture() function with:\r\n\r\n{code}\r\nstatic public void takePicture()\r\n\t{\r\n\t try {\r\n\t String focusMode = camera.getParameters().getFocusMode();\r\n\t if (!(focusMode.equals(Parameters.FOCUS_MODE_EDOF)\r\n\t || focusMode.equals(Parameters.FOCUS_MODE_FIXED) || focusMode\r\n\t .equals(Parameters.FOCUS_MODE_INFINITY))) {\r\n\r\n\t AutoFocusCallback focusCallback = new AutoFocusCallback()\r\n\t {\r\n\t public void onAutoFocus(boolean success, Camera camera)\r\n\t {\r\n if(blockAutoFocus) return;\r\n blockAutoFocus = true;\r\n\r\n\t camera.takePicture(shutterCallback, null, jpegCallback);\r\n\r\n\t if (!success) {\r\n\t Log.w(TAG, \"Unable to focus.\");\r\n\t }\r\n \r\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {\r\n\t\t\t\t\t\t\tcamera.cancelAutoFocus();\r\n\t }\r\n\t }\r\n\t };\r\n \r\n blockAutoFocus = false;\r\n\t camera.autoFocus(focusCallback);\r\n\t } else {\r\n\t camera.takePicture(shutterCallback, null, jpegCallback);\r\n\t }\r\n\t } catch (Exception e) {\r\n\t if (camera != null) {\r\n\t camera.release();\r\n\t }\r\n\t }\r\n\t}\r\n{code}\r\n\r\nThis has \"solved\" the problem for us in the short term. Definitely not a long term solution.", "updateAuthor": { "name": "mfogg", "key": "mfogg", "displayName": "Mike Fogg", "active": true, "timeZone": "America/New_York" }, "created": "2016-08-25T15:03:59.000+0000", "updated": "2016-08-25T15:03:59.000+0000" }, { "id": "423762", "author": { "name": "zozo4kin", "key": "zozo4kin", "displayName": "Zakhar Zhuravlev", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm also caught this error in 6.1.1.GA, but I don' t understand is it fixed or I should do something?", "updateAuthor": { "name": "zozo4kin", "key": "zozo4kin", "displayName": "Zakhar Zhuravlev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-07-10T11:04:25.000+0000", "updated": "2017-07-10T11:04:25.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }