{ "id": "83312", "key": "TIMOB-6424", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2012-03-12T14:42:45.000+0000", "created": "2011-12-01T15:55:06.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "12570", "name": "Release 1.7.5", "archived": true, "released": true, "releaseDate": "2011-11-02" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-10T19:18:43.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": "Ti.UI.createImageView fails to decode image on creation (log attached) in Android 2.2 (NookColor and Emulator). The Android 2.3.6 Device and Tab 3.1 have a separate error of filenotfound (attached), but the iPhone Simulator 5.0 and iPhone 5.0 correctly load and decode the remote image. Local images work in all cases.\r\n\r\nAndroid 2.2 Error Log Excerpt:\r\n\r\n12-01 14:12:07.093: W/TiDrawableReference(374): (main) [6,1703] Bitmap bounds could not be determined. If bitmap is loaded, it won't be scaled.\r\n12-01 14:12:07.103: D/skia(374): --- SkImageDecoder::Factory returned null\r\n12-01 14:12:07.113: E/TiUIImageView(374): (main) [20,1723] Max retries reached, giving up decoding image source: http://www.zoomout.gr/assets/media/PICTURES/???????/651_thumb1.jpg\r\n\r\nAndroid 2.3.6, 3.1 Error Log Excerpt:\r\n\r\n12-01 15:11:26.505: E/TiDownloadManager(2872): (pool-3-thread-1) [365,13155] Exception downloading http://www.zoomout.gr/assets/media/PICTURES/???????/651_thumb1.jpg\r\n12-01 15:11:26.505: E/TiDownloadManager(2872): java.io.FileNotFoundException: http://www.zoomout.gr/assets/media/PICTURES/???????/651_thumb1.jpg\r\n12-01 15:11:26.505: E/TiDownloadManager(2872): \tat org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:521)\r\n12-01 15:11:26.505: E/TiDownloadManager(2872): \tat java.net.URL.openStream(URL.java:645)\r\n12-01 15:11:26.505: E/TiDownloadManager(2872): \tat org.appcelerator.titanium.util.TiDownloadManager$DownloadJob.run(TiDownloadManager.java:134)\r\n12-01 15:11:26.505: E/TiDownloadManager(2872): \tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)\r\n12-01 15:11:26.505: E/TiDownloadManager(2872): \tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)\r\n12-01 15:11:26.505: E/TiDownloadManager(2872): \tat java.lang.Thread.run(Thread.java:1019)\r\n\r\nSteps to Reproduce:\r\n\r\n1. Run the following code in a new app.\r\n\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\nvar win = Titanium.UI.createWindow({backgroundColor:'#fff'});\r\nvar test_img = Titanium.UI.createImageView({image:'http://www.zoomout.gr/assets/media/PICTURES/ΜΟΥΣΙΚΗ/651_thumb1.jpg'}); \r\nwin.add(test_img);\r\nwin.open();\r\n{code}\r\n\r\nExpected Result:\r\n\r\nImage should download, decode and display.\r\n\r\nActual Result:\r\n\r\nNo image displays, errors log to the console. Android 2.2 has decode errors, Android 2.3.6 has filenotfound errors, iOS Simulators/Devices work correctly.\r\n\r\nNote:\r\n\r\nThe local image 'KS_nav_ui.png' works as expected across platforms.", "attachment": [ { "id": "24432", "filename": "2.2 imageview decode error log.txt", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-01T15:55:06.000+0000", "size": 4767, "mimeType": "text/plain" }, { "id": "24431", "filename": "2.3.6 filenotfound error.txt", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-01T15:55:06.000+0000", "size": 2011, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: Ti.UI.createImageView fails to either find or decode remote initial image", "creator": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK: 1.8.0.1.v20111201115057, 1.7.5\r\nAndroid Runtimes: V8, Rhino\r\nStudio: 1.0.7.201111302035\r\nOS: OS X Lion\r\nDevices Tested: NookColor, Android Emulator 2.2, Android Device 2.3.6, Android Tab 3.1, iOS Simulator 5.0, iPhone 5.0", "comment": { "comments": [ { "id": "186078", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This bug has been fixed a while back. The fix is simple in JS:\r\n{code}\r\n\r\n\r\n// this is a remote URL with a UTF-8 character encoded. We should be able\r\n// to fetch this image OK\r\n\r\nvar test_img = Titanium.UI.createImageView({\r\n\t\timage: 'http://www.zoomout.gr/assets/media/PICTURES/' + encodeURIComponent('ΜΟΥΣΙΚΗ') + '/651_thumb1.jpg'\r\n\r\n}); \r\n\r\nwin.add(test_img);\r\n{code}", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-12T14:33:33.000+0000", "updated": "2012-03-12T14:34:06.000+0000" }, { "id": "186084", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It is not possible for us to automatically URL-encode specific portions of URLs, because we can't know if (or what parts) of the URL are safe for encoding.\r\n\r\niOS does have some automagic here, but IIRC there are cases where it will break and be too optimistic about encoding (which there is no way to get out of).\r\n\r\nWe provide a method already for allowing explicit control of URL encoding called {{encodeURIComponent}}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-12T14:42:45.000+0000", "updated": "2012-03-12T14:42:45.000+0000" }, { "id": "411320", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue will not fix.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-10T19:18:43.000+0000", "updated": "2017-03-10T19:18:43.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }