{
"id": "169820",
"key": "TIMOB-25409",
"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": "20102",
"name": "Release 7.1.1",
"archived": false,
"released": true,
"releaseDate": "2018-05-02"
}
],
"resolution": {
"id": "1",
"description": "A fix for this issue is checked into the tree and tested.",
"name": "Fixed"
},
"resolutiondate": "2018-03-22T21:34:18.000+0000",
"created": "2017-09-18T11:54:42.000+0000",
"priority": {
"name": "Critical",
"id": "1"
},
"labels": [
"android",
"blob",
"gallery"
],
"versions": [],
"issuelinks": [],
"assignee": {
"name": "gmathews",
"key": "gmathews",
"displayName": "Gary Mathews",
"active": true,
"timeZone": "America/Los_Angeles"
},
"updated": "2018-03-23T11:28:10.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": "Test project\r\n\r\n*index.js:*\r\n{code:javascript}\r\nfunction openGallery() {\r\n Ti.Media.openPhotoGallery({\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],\r\n success:function(e) {\r\n console.log(\"\\n success\");\r\n\r\n var image = Ti.UI.createImageView({\r\n image: e.media.imageAsResized(300, 150),\r\n width: \"150dp\",\r\n height: \"75dp\",\r\n top: \"10dp\"\r\n });\r\n $.win.add(image);\r\n },\r\n cancel: function() {\r\n console.log(\"cancel\");\r\n },\r\n error:function(error) {\r\n console.log(\"error\");\r\n }\r\n });\r\n}\r\n\r\nfunction onGallery() {\r\n if(!Ti.Filesystem.hasStoragePermissions()) {\r\n Ti.Filesystem.requestStoragePermissions(function(result) {\r\n if(result.success) {\r\n openGallery();\r\n }\r\n });\r\n } else {\r\n openGallery();\r\n }\r\n}\r\n\r\n$.win.open();\r\n{code}\r\n\r\n*index.xml:*\r\n{code:javascript}\r\n\r\n\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n*I'm getting error if select image from google drive:*\r\n{code:java}\r\n[WARN] W/System.err: java.lang.NullPointerException\r\n[WARN] W/System.err: at java.io.File.(File.java:262)\r\n[WARN] W/System.err: at org.appcelerator.titanium.io.TitaniumBlob.getNativeFile(TitaniumBlob.java:138)\r\n[WARN] W/System.err: at org.appcelerator.titanium.TiBlob.getNativePath(TiBlob.java:534)\r\n[WARN] W/System.err: at org.appcelerator.titanium.TiBlob.getImage(TiBlob.java:586)\r\n[WARN] W/System.err: at org.appcelerator.titanium.TiBlob.imageAsResized(TiBlob.java:722)\r\n[WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)\r\n[WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57)\r\n[WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:43)\r\n[WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function$1.run(V8Function.java:70)\r\n[WARN] W/System.err: at android.os.Handler.handleCallback(Handler.java:751)\r\n[WARN] W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)\r\n[WARN] W/System.err: at android.os.Looper.loop(Looper.java:154)\r\n[WARN] W/System.err: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:118)\r\n[ERROR] TiExceptionHandler: (main) [18317,18317] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] TiExceptionHandler: (main) [1,18318] - In /alloy/controllers/index.js:1,358\r\n[ERROR] TiExceptionHandler: (main) [0,18318] - Message: Uncaught Java Exception occurred\r\n[ERROR] TiExceptionHandler: (main) [0,18318] - Source: (function (exports, require, module, __filename, __dirname, Titanium, Ti, global, kroll) {function __processArg(a,b){var c=null;return a&&(c=a[b]||null,delete a[b]),c}function Controller(){function a(){Ti.Media.openPhotoGallery({mediaTypes:[Ti.Media.MEDIA_TYPE_PHOTO],success:function(a){console.log(\"\\n success\");var b=Ti.UI.createImageView({image:a.media.imageAsResized(300,150),width:\"150dp\",height:\"75dp\",top:\"10dp\"});c.win.add(b)},cancel:function(){console.log(\"cancel\")},error:function(){console.log(\"error\")}})}function b(){Ti.Filesystem.hasStoragePermissions()?a():Ti.Filesystem.requestStoragePermissions(function(b){b.success&&a()})}require(\"/alloy/controllers/BaseController\").apply(this,Array.prototype.slice.call(arguments)),this.__controllerPath=\"index\",this.args=arguments[0]||{},arguments[0]&&(__processArg(arguments[0],\"__parentSymbol\"),__processArg(arguments[0],\"$model\"),__processArg(arguments[0],\"__itemTemplate\"));var c=this,d={},e={};c.__views.win=Ti.UI.createWindow({id:\"win\",backgroundColor:\"white\"}),c.__views.win&&c.addTopLevelView(c.__views.win),c.__views.__alloyId4=Ti.UI.createButton({bottom:\"10dp\",width:\"80%\",height:\"50dp\",title:\"Gallery\",id:\"__alloyId4\"}),c.__views.win.add(c.__views.__alloyId4),b?c.addListener(c.__views.__alloyId4,\"click\",b):e[\"$.__views.__alloyId4!click!onGallery\"]=!0,d.destroy=function(){},_.extend(c,c.__views),\"use strict\",c.win.open(),e[\"$.__views.__alloyId4!click!onGallery\"]&&c.addListener(c.__views.__alloyId4,\"click\",b),_.extend(c,d)}var Alloy=require(\"/alloy\"),Backbone=Alloy.Backbone,_=Alloy._;module.exports=Controller;\r\n[ERROR] V8Exception: Exception occurred at /alloy/controllers/index.js:1: Uncaught Java Exception occurred\r\n[ERROR] V8Exception: Java Exception occurred\r\n{code}\r\n\r\n*I managed to get around it by:*\r\n{code:javascript}\r\nfile.write(e.media);\r\nvar blob = file.read();\r\nblob.imageAsResized(); // now you can use this method\r\n{code}\r\n\r\n\r\nP.S. of course, working fine for local images",
"attachment": [],
"flagged": false,
"summary": "Android: getting image from Google Drive via openPhotoGallery causes a crash",
"creator": {
"name": "zozo4kin",
"key": "zozo4kin",
"displayName": "Zakhar Zhuravlev",
"active": true,
"timeZone": "America/Los_Angeles"
},
"subtasks": [],
"reporter": {
"name": "zozo4kin",
"key": "zozo4kin",
"displayName": "Zakhar Zhuravlev",
"active": true,
"timeZone": "America/Los_Angeles"
},
"environment": "Tested with 6.1.1.GA and 6.2.0.GA.\r\nAndroid 7.0",
"closedSprints": [
{
"id": 1008,
"state": "closed",
"name": "2018 Sprint 06 SDK",
"startDate": "2018-03-11T22:18:04.396Z",
"endDate": "2018-03-25T22:18:00.000Z",
"completeDate": "2018-03-25T21:52:36.683Z",
"originBoardId": 216
}
],
"comment": {
"comments": [
{
"id": "429249",
"author": {
"name": "sdarda",
"key": "sdarda",
"displayName": "Sharif AbuDarda",
"active": false,
"timeZone": "Asia/Dhaka"
},
"body": "I was able to reproduce the issue with SDK 6.2.2.GA. App crash only when selecting image from Google drive, From Google photo it's ok. And also on the local image. ",
"updateAuthor": {
"name": "sdarda",
"key": "sdarda",
"displayName": "Sharif AbuDarda",
"active": false,
"timeZone": "Asia/Dhaka"
},
"created": "2017-10-18T19:48:52.000+0000",
"updated": "2017-10-18T19:48:52.000+0000"
},
{
"id": "434741",
"author": {
"name": "hini",
"key": "hini",
"displayName": "Hani Hamadeh",
"active": true,
"timeZone": "Asia/Beirut"
},
"body": "Waiting for this fix too",
"updateAuthor": {
"name": "hini",
"key": "hini",
"displayName": "Hani Hamadeh",
"active": true,
"timeZone": "Asia/Beirut"
},
"created": "2018-02-21T23:04:37.000+0000",
"updated": "2018-02-21T23:04:37.000+0000"
},
{
"id": "435219",
"author": {
"name": "gmathews",
"key": "gmathews",
"displayName": "Gary Mathews",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "master: https://github.com/appcelerator/titanium_mobile/pull/9906",
"updateAuthor": {
"name": "gmathews",
"key": "gmathews",
"displayName": "Gary Mathews",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2018-03-06T00:23:31.000+0000",
"updated": "2018-03-06T00:23:31.000+0000"
},
{
"id": "435823",
"author": {
"name": "lchoudhary",
"key": "lchoudhary",
"displayName": "Lokesh Choudhary",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "[~gmathews], Can you please provide a backport.",
"updateAuthor": {
"name": "lchoudhary",
"key": "lchoudhary",
"displayName": "Lokesh Choudhary",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2018-03-21T22:09:09.000+0000",
"updated": "2018-03-21T22:09:09.000+0000"
},
{
"id": "435824",
"author": {
"name": "lchoudhary",
"key": "lchoudhary",
"displayName": "Lokesh Choudhary",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "FR passed for master PR.",
"updateAuthor": {
"name": "lchoudhary",
"key": "lchoudhary",
"displayName": "Lokesh Choudhary",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2018-03-21T22:10:09.000+0000",
"updated": "2018-03-21T22:10:09.000+0000"
},
{
"id": "435829",
"author": {
"name": "lchoudhary",
"key": "lchoudhary",
"displayName": "Lokesh Choudhary",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "Master PR merged.",
"updateAuthor": {
"name": "lchoudhary",
"key": "lchoudhary",
"displayName": "Lokesh Choudhary",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2018-03-21T23:16:30.000+0000",
"updated": "2018-03-21T23:16:30.000+0000"
},
{
"id": "435853",
"author": {
"name": "lchoudhary",
"key": "lchoudhary",
"displayName": "Lokesh Choudhary",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "FR Passed for backport PR.\r\nPR merged.",
"updateAuthor": {
"name": "lchoudhary",
"key": "lchoudhary",
"displayName": "Lokesh Choudhary",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2018-03-22T21:34:12.000+0000",
"updated": "2018-03-22T21:34:12.000+0000"
},
{
"id": "435860",
"author": {
"name": "smohammed",
"key": "smohammed",
"displayName": "Samir Mohammed",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "Verified in SDK Version 7.1.1.v20180322144031 and 7.2.0.v20180322112525. \r\n\r\nTest and other information can be found at:\r\n7_1_X: https://github.com/appcelerator/titanium_mobile/pull/9954\r\nMaster: https://github.com/appcelerator/titanium_mobile/pull/9906",
"updateAuthor": {
"name": "smohammed",
"key": "smohammed",
"displayName": "Samir Mohammed",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2018-03-23T11:28:03.000+0000",
"updated": "2018-03-23T11:28:03.000+0000"
}
],
"maxResults": 8,
"total": 8,
"startAt": 0
}
}
}