{ "id": "165172", "key": "TIMOB-24270", "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": "10000", "description": "", "name": "Done" }, "resolutiondate": "2017-01-24T09:59:26.000+0000", "created": "2017-01-03T18:48:16.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "look1" ], "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" }, "outwardIssue": { "id": "165349", "key": "TIMOB-24323", "fields": { "summary": "iOS : When 'allowEditing' is 'false', crash occurs in Titanium.Media.showCamera", "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": "53876", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "inwardIssue": { "id": "164964", "key": "TIMOB-24206", "fields": { "summary": "iOS: Memory leaks after select camera or photo gallery with jscore framework", "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 } } } } ], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-06T17:34: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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "the code snippet below opens the album, but logs the following when run in simulator:\r\n\r\n_[WARN] {\"success\":true,\"mediaType\":\"public.image\",\"code\":0,\"source\":{},\"type\":\"success\",\"media\":{}}_\r\n\r\nafter picking a photo i'd expect media to actually contain data. at least that was how it worked pre-6.0.1.GA.\r\n\r\n{code:java}\r\nTi.Media.openPhotoGallery({\r\n allowEditing:false,\r\n showControls:true,\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],\r\n\r\n success: function(e) {\r\n log.warn(JSON.stringify(e));\r\n change_profile_pic(photo_index, e.media, win);\r\n },\r\n cancel: function() { },\r\n error: function() { }\r\n });\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS 10.2: Ti.Media.openPhotoGallery returns empty media property", "creator": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 10.2 simulator\r\nmacOS 10.12\r\nXcode 8.2.1\r\nTi SDK 6.0.1.GA", "closedSprints": [ { "id": 796, "state": "closed", "name": "2017 Sprint 02 SDK", "startDate": "2017-01-15T00:00:41.845Z", "endDate": "2017-01-29T00:00:00.000Z", "completeDate": "2017-01-30T21:10:44.640Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "404025", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks for the report! So this worked in 6.0.0.GA? Are you very sure? Also I knoticed that it's only occurring when you don't run with main-thread enabled. Using it fixes the issue. We'll still investigate it, but need as many infos as possible.\r\n\r\nTest-Case:\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Trigger',\r\n top: 40\r\n});\r\n\r\nvar img = Ti.UI.createImageView({\r\n width: 300\r\n});\r\n\r\nwin.add(img);\r\n\r\nbtn.addEventListener('click', function() {\r\n Ti.Media.openPhotoGallery({\r\n allowEditing:false,\r\n showControls:true,\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],\r\n success: function(e) {\r\n img.setImage(e.media);\r\n },\r\n cancel: function() { },\r\n error: function() { }\r\n });\r\n});\r\n\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\n\r\n*EDIT*: I am able to reproduce it with 6.1.0 (master), but not with 6.0.1.GA and 5.5.1.GA. The issue is caused by TIMOB-24206, which is also only in master, so 6.0.X cannot be affected. It can be fixed by replacing line in {{adjustRotation}} (Ti.Utils.m}} from {{return [[imageCopy retain] autorelease];}} to {{return imageCopy;}}. I made the change between other changes, so probably not checked all use-cases. But anyway, this is all related to 6.1.0, 6.0.1.GA should work properly.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-03T19:39:08.000+0000", "updated": "2017-01-03T22:13:13.000+0000" }, { "id": "404033", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8727", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-03T22:12:22.000+0000", "updated": "2017-01-03T22:12:22.000+0000" }, { "id": "404068", "author": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "body": "thanks for the quick fix.\r\ni came from 5.5.1.GA and saw this issue.", "updateAuthor": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-04T10:06:03.000+0000", "updated": "2017-01-04T10:06:03.000+0000" }, { "id": "404070", "author": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "body": "i added to tiapp.xml:\r\n\r\n true\r\n true\r\n\r\nbut can not confirm that it fixes this issue with 6.0.1.GA.", "updateAuthor": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-04T10:27:56.000+0000", "updated": "2017-01-04T10:28:16.000+0000" }, { "id": "404071", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~tomquas] Did you have the jscore flag in there before? Does it change something to remove it?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-04T10:39:55.000+0000", "updated": "2017-01-04T10:45:46.000+0000" }, { "id": "404073", "author": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "body": "jscore was not in the config when i originally posted this issue.\r\n\r\ni removed jscore, left true but still am seeing this issue on 6.0.1.GA.", "updateAuthor": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-04T10:44:33.000+0000", "updated": "2017-01-04T10:44:33.000+0000" }, { "id": "404074", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The main-thread flag should be added like this (not in the section):\r\n{code:xml}\r\ntrue\r\n{code}\r\nIf possible, paste your (anonymized) tiapp.xml contents, thx!\r\n\r\n*EDIT*: And if possible, also upload the contents of this following file:\r\n{code}\r\n~/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/iphone/Classes/MediaModule.m\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-04T10:45:54.000+0000", "updated": "2017-01-04T10:50:47.000+0000" }, { "id": "404076", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~htbryant] Can you do a test with your (great) matrices? We'd need a comparison between toggling the following things:\r\n- 6.0.1.GA and 6.1.0 (master)\r\n- {{true/false}}\r\n- {{true/false}}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-04T10:49:07.000+0000", "updated": "2017-01-04T10:49:07.000+0000" }, { "id": "404078", "author": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "body": "@hans i set the property which, btw, opposes instructions available here: http://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference-section-src-29004921_tiapp.xmlandtimodule.xmlReference-run-on-main-thread\r\n\r\nstill an issue on 6.0.1.GA, w/ or w/o jscore...\r\n", "updateAuthor": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-04T11:03:34.000+0000", "updated": "2017-01-04T11:03:34.000+0000" }, { "id": "404079", "author": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "body": "tiapp.xml and MediaModule.m are available here: https://gist.github.com/tomquas/71c476c2d394f4fb93f963685d235e02", "updateAuthor": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-04T11:10:22.000+0000", "updated": "2017-01-04T11:10:22.000+0000" }, { "id": "404276", "author": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "body": "oops, several things left my dev sandbox in a rotten state.\r\n\r\ni can confirm that 6.0.1.GA w/o jscore works as expected.\r\ni could not make the app work using 6.1.0 at its current state, so no results here.\r\n\r\nwhat puzzles me is why the log output does not clearly state that a photo has been selected and its path available.\r\n\r\ni apologize for causing confusion. ", "updateAuthor": { "name": "tom", "key": "tom", "displayName": "tom quas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-09T09:48:56.000+0000", "updated": "2017-01-09T09:48:56.000+0000" }, { "id": "404779", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Linking the test-case from TIMOB-24323 here as well:\r\n{code:js}\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 success: function(event) {\r\n console.log(event.media.width, event.media.height);\r\n\r\n // called when media returned from the camera\r\n Ti.API.debug('Our type was: ' + event.mediaType);\r\n if (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {\r\n var imageView = Ti.UI.createImageView({\r\n width: win.width,\r\n height: win.height,\r\n image: event.media\r\n });\r\n win.add(imageView);\r\n } else {\r\n alert(\"got the wrong type back =\" + event.mediaType);\r\n }\r\n },\r\n cancel: function() {\r\n // called when user cancels taking a picture\r\n },\r\n error: function(error) {\r\n // called when there's an error\r\n var a = Titanium.UI.createAlertDialog({\r\n title: 'Camera'\r\n });\r\n if (error.code == Titanium.Media.NO_CAMERA) {\r\n a.setMessage('Please run this test on device');\r\n } else {\r\n a.setMessage('Unexpected error: ' + error.code);\r\n }\r\n a.show();\r\n },\r\n // saveToPhotoGallery:true,\r\n // allowEditing and mediaTypes are iOS-only settings\r\n allowEditing: false,\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO, Ti.Media.MEDIA_TYPE_PHOTO]\r\n });\r\n}\r\n\r\nwin.addEventListener('open', function() {\r\n Titanium.Media.requestCameraPermissions(function(e) {\r\n if (e.success) {\r\n showCamera();\r\n } else {\r\n Ti.API.error(e);\r\n }\r\n });\r\n})\r\n\r\nwin.open();\r\n{code}\r\n\r\nThanks for testing the prerelease verison so early guys! That really helps us tremendously to fix issues before GA!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-18T10:35:27.000+0000", "updated": "2017-01-18T10:35:41.000+0000" }, { "id": "405131", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8783\r\n\r\nThis issue is side effect of TIMOB-24206 . The leak issue, TIMOB-24206, is only with jscore and in all other cases its working fine. So as discuss with [~hansknoechel] , reverting changes of TIMOB-24206. We will find proper solution for same . ", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-24T05:02:49.000+0000", "updated": "2017-01-24T05:02:49.000+0000" }, { "id": "405151", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Reverted the fix from TIMOB-24206, so this one does not happen anymore. We'll need to find a more solid solution for the other one.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-24T09:59:26.000+0000", "updated": "2017-01-24T09:59:26.000+0000" }, { "id": "423046", "author": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "body": "Is this fixed? because in 6.1.1 GA I have the same problem", "updateAuthor": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "created": "2017-06-28T15:55:42.000+0000", "updated": "2017-06-28T15:55:42.000+0000" }, { "id": "439827", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closed as completed. If this is in error, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:34:44.000+0000", "updated": "2018-08-06T17:34:44.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }