{ "id": "169781", "key": "TIMOB-25281", "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": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-11-17T16:53:38.000+0000", "created": "2017-09-14T15:31:46.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "parity" ], "versions": [ { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" }, { "id": "18414", "description": "", "name": "Release 6.2.0", "archived": false, "released": true, "releaseDate": "2017-09-13" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-06T17:49:37.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "h5.Description\r\n\r\nCalling Ti.Media.saveToPhotoGallery with a blob crashes an application, when running normally the app crashes with no error. Running in debug from VS shows that the error is occurring [here|https://github.com/appcelerator/titanium_mobile_windows/blob/91c53831aa37f46cda9ec9d0140d444fced41a3e/Source/Media/src/Media.cpp#L378] as media is empty\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar view = Ti.UI.createView({\r\n backgroundColor: 'red',\r\n width: 400,\r\n height: 400,\r\n borderRadius: 200\r\n});\r\n\r\n\r\nwin.add(view);\r\nwin.open();\r\n\r\nview.toImage(function(image) {\r\n console.log('image done');\r\n console.log(image.length)\r\n Ti.Media.saveToPhotoGallery(image, {\r\n success: function(e) {\r\n console.log('success');\r\n },\r\n error: function(e) {\r\n console.log(' error');\r\n }\r\n });\r\n});\r\n{code}\r\n\r\nh5.Steps to reproduce\r\n\r\n# Add to an existing app.js and build for Windows\r\n\r\n\r\nh5.Actual\r\n\r\nApp crashes\r\n\r\nh5.Expected\r\n\r\nApp shouldn't crash, red circle should be written to gallery", "attachment": [], "flagged": false, "summary": "Windows: Ti.Media.saveToPhotoGallery does not accept a blob", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Ti SDK: 6.1.2.GA, 6.2.0.v20170912203804, 7.0.0.v20170906135653", "comment": { "comments": [ { "id": "428715", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile_windows/pull/1133", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-04T22:20:02.000+0000", "updated": "2017-10-04T22:20:02.000+0000" }, { "id": "440247", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:49:37.000+0000", "updated": "2018-08-06T17:49:37.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }