{ "id": "169686", "key": "TIMOB-25220", "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": "18414", "description": "", "name": "Release 6.2.0", "archived": false, "released": true, "releaseDate": "2017-09-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-09-21T23:29:17.000+0000", "created": "2017-09-01T15:12:30.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "automated", "regression" ], "versions": [ { "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": "2017-10-05T21:21:45.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": "Summary:\r\nIn 6.2.0.RC getFile() returns a FileProxy that can't be shown in an ImageView\r\n\r\n*Steps:*\r\n* Create a default Titanium Classic project\r\n* add this code:\r\n{code}\r\n\r\nvar win = Ti.UI.createWindow({backgroundColor: 'grey'});\r\nvar f = Ti.Filesystem.getFile(\"assets/images/tab1.png\");\r\nif (f.exists()) {\r\n\tconsole.log(\"file exists\");\r\n\tvar img = Ti.UI.createImageView({\r\n\t\timage: f,\r\n\t\ttop: 10\r\n\t});\r\n\twin.add(img);\r\n\r\n\tvar img2 = Ti.UI.createImageView({\r\n\t\timage: f.nativePath\r\n\t});\r\n\twin.add(img2);\r\n} else {\r\n\tconsole.log(\"file does not exists at \" + f.nativePath);\r\n}\r\nwin.open();\r\n{code}\r\n\r\n*Output*\r\n\r\n6.1.2.GA shows both images:\r\n !612_ga_images.png|thumbnail! \r\n\r\n6.2.0.RC only shows one image:\r\n !6_2_0_rc_images.png|thumbnail! \r\nand this error:\r\n\r\n{noformat}\r\nTiDrawableReference: (main) [83,83] Unknown image resource type: FileProxy. Returning null drawable reference\r\n{noformat}\r\n", "attachment": [ { "id": "63165", "filename": "6_2_0_rc_images.png", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-09-01T15:10:21.000+0000", "size": 31169, "mimeType": "image/png" }, { "id": "63164", "filename": "612_ga_images.png", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-09-01T15:10:21.000+0000", "size": 30694, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: ImageView doesn't accept File", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 944, "state": "closed", "name": "2017 Sprint 18 SDK", "startDate": "2017-08-27T21:13:39.311Z", "endDate": "2017-09-10T21:13:00.000Z", "completeDate": "2017-09-10T21:24:16.435Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "427522", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Thanks for the report [~michael], moving over to TIMOB\r\n\r\nCan reproduce using\r\n\r\nTi SDK 6.2.0.v20170831112315\r\nOnePlus 3 7.1.1", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-09-01T15:57:09.000+0000", "updated": "2017-09-01T15:57:09.000+0000" }, { "id": "427540", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/9392\r\n6_2_X: https://github.com/appcelerator/titanium_mobile/pull/9394", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-04T14:03:43.000+0000", "updated": "2017-09-04T14:04:18.000+0000" }, { "id": "427599", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed for master & backport.\r\nPR's merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-05T19:07:11.000+0000", "updated": "2017-09-05T19:07:11.000+0000" }, { "id": "427655", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 6.2.0.v20170906064110 & 7.0.0.v20170906103333.\r\n\r\nClosing.\r\n\r\nStudio Ver: 4.9.1.201707200100\r\nSDK Ver: 6.2.0.v20170906064110\r\nOS Ver: 10.12.3\r\nXcode Ver: Xcode 8.3.3\r\nAppc NPM: 4.2.9\r\nAppc CLI: 6.2.4-9\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.9.13\r\nNode Ver: 6.11.2\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Pixel --- Android 7.1.1\r\n ⇨ google Nexus 5 --- Android 6.0.1\r\nEmulator: Android 4.4.2", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-06T21:42:32.000+0000", "updated": "2017-09-06T21:42:32.000+0000" }, { "id": "428046", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to correct code in steps.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-18T21:19:21.000+0000", "updated": "2017-09-18T21:19:21.000+0000" }, { "id": "428759", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Code for appium automation:\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'grey'}),\r\n file = Ti.Filesystem.getFile('titanium.png'),\r\n img = Ti.UI.createImageView({\r\n width: 100,\r\n height: 100,\r\n image: file\r\n });\r\nwin.add(img);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-05T21:21:45.000+0000", "updated": "2017-10-05T21:21:45.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }