Description
Calling 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
var win = Ti.UI.createWindow();
var view = Ti.UI.createView({
backgroundColor: 'red',
width: 400,
height: 400,
borderRadius: 200
});
win.add(view);
win.open();
view.toImage(function(image) {
console.log('image done');
console.log(image.length)
Ti.Media.saveToPhotoGallery(image, {
success: function(e) {
console.log('success');
},
error: function(e) {
console.log(' error');
}
});
});
Steps to reproduce
Add to an existing app.js and build for Windows
Actual
App crashes
Expected
App shouldn't crash, red circle should be written to gallery
master: https://github.com/appcelerator/titanium_mobile_windows/pull/1133
Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.