{ "id": "165349", "key": "TIMOB-24323", "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": "2017-01-18T10:33:41.000+0000", "created": "2017-01-18T06:26:28.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "issuelinks": [ { "id": "53950", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "165172", "key": "TIMOB-24270", "fields": { "summary": "iOS 10.2: Ti.Media.openPhotoGallery returns empty media property", "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": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-23T22:46:57.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "false\r\n\r\n6.1.0.v20161217060946 is ok,\r\nbut 6.1.0.v20161219221123 is crash.\r\n\r\nMaybe this code has problem.\r\nhttps://github.com/appcelerator/titanium_mobile/commit/d687cd2b3d314de8807f96f3d002c55d45bee7e1\r\n\r\nWhen 'run-on-main-thread' is true, works normal.\r\n\r\nTest code here.\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n title: 'test',\r\n backgroundColor: '#fff'\r\n});\r\n\r\n\r\n// This example is only able to capture video on the iOS platform.\r\n// To capture video on the Android platform, see the Android Capture Video Example below.\r\nfunction showCamera() {\r\n Titanium.Media.showCamera({\r\n \tsuccess:function(event) {\r\n console.log(event.media.width, event.media.height);\r\n\r\n \t\t// called when media returned from the camera\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\tvar imageView = Ti.UI.createImageView({\r\n \t\t\t\twidth: win.width,\r\n \t\t\t\theight: win.height,\r\n \t\t\t\timage: event.media\r\n \t\t\t});\r\n \t\t\twin.add(imageView);\r\n \t\t} else {\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\t// called when user cancels taking a picture\r\n \t},\r\n \terror:function(error) {\r\n \t\t// called when there's an error\r\n \t\tvar a = Titanium.UI.createAlertDialog({title:'Camera'});\r\n \t\tif (error.code == Titanium.Media.NO_CAMERA) {\r\n \t\t\ta.setMessage('Please run this test on device');\r\n \t\t} else {\r\n \t\t\ta.setMessage('Unexpected error: ' + error.code);\r\n \t\t}\r\n \t\ta.show();\r\n \t},\r\n \t// saveToPhotoGallery:true,\r\n // allowEditing and mediaTypes are iOS-only settings\r\n \tallowEditing: false,\r\n \tmediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO,Ti.Media.MEDIA_TYPE_PHOTO]\r\n });\r\n}\r\n\r\nsetTimeout(function() {\r\n Titanium.Media.requestCameraPermissions(function (e) {\r\n if (e.success) {\r\n showCamera();\r\n } else {\r\n console.error(e);\r\n }\r\n });\r\n}, 2000);\r\n\r\nwin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS : When 'allowEditing' is 'false', crash occurs in Titanium.Media.showCamera", "creator": { "name": "engross", "key": "engross", "displayName": "Dongwoo Gim", "active": true, "timeZone": "Asia/Seoul" }, "subtasks": [], "reporter": { "name": "engross", "key": "engross", "displayName": "Dongwoo Gim", "active": true, "timeZone": "Asia/Seoul" }, "environment": null, "comment": { "comments": [ { "id": "404773", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Good catch, we will investigate it asap! It's [this line|https://github.com/appcelerator/titanium_mobile/commit/d687cd2b3d314de8807f96f3d002c55d45bee7e1#diff-da4efcba6ff32fa7582070baafb81526R789] causing the issue when running on kroll-thread, making it a duplicate of TIMOB-24270. I will add this test-case to that ticket and go from there. Thx!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-18T09:49:28.000+0000", "updated": "2017-01-18T10:33:28.000+0000" }, { "id": "415499", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as Duplicate with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T22:46:57.000+0000", "updated": "2017-03-23T22:46:57.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }