{ "id": "92945", "key": "TIMOB-9984", "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": null, "resolutiondate": null, "created": "2012-06-07T09:52:48.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:31.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h6.Problem\r\nImageView error event not working with local files. If the image is remote image file the error event it will be executed accordingly.\r\n\r\nh6.Tested on\r\niOS simulator 4.3 & 5.1\r\n\r\nh6.Repro sequence\r\n{code:JavaScript}\r\nTitanium.UI.setBackgroundColor('#000');\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar label1 = Titanium.UI.createLabel({\r\n color:'#999',\r\n text:'I am Window 1',\r\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n textAlign:'center',\r\n width:'auto'\r\n});\r\n \r\nwin1.add(label1);\r\nwin1.open();\r\n \r\nvar img = Ti.UI.createImageView({\r\n // First run.- Attempting to load a remote image file\r\n image:'http://files.daddyhunt.com/sites/default/files/imagecache/mangrid-212/photos/z/z/z/277606/Photo_on_2010-09-14_at_13.14_3.jpg'\r\n \r\n // Second run.- Attempting to load a local image file\r\n //image: 'KS_na_ui.png' \r\n});\r\nwin1.add(img);\r\nimg.addEventListener('error', function(e){\r\n label1.text = e.image + \"image loading properly got an error!\";\r\n img.image = 'KS_nav_ui.png';//loading alternative image\r\n});\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: imageView error event not working on local files", "creator": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "subtasks": [], "reporter": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "environment": "Mac OS X 10.7.4 \r\niOS 4.3 & 5.1\r\nTitanium Studio, build: 2.0.3.201206051048\r\nTitanium SDK 2.0.1.GA2, 2.0.2.GA & 2.1.0.GA", "comment": { "comments": [ { "id": "198067", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "@Hazem Khaled Can you paste logs from 1.8.2 & 2.x SDKs here please? Furthermore, what are the iOS versions and devices/simulators that this was tested on?", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-11T14:42:12.000+0000", "updated": "2012-06-11T14:48:19.000+0000" }, { "id": "198556", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing due to inactivity.", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-14T14:22:01.000+0000", "updated": "2012-06-14T14:22:01.000+0000" }, { "id": "198832", "author": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "body": "worked with me on OS 4.2 with any SDK, but not work OS 5.0\r\n\r\n\r\n2.0.2 OS 5.0 log\r\n{code}\r\n[INFO] One moment, building ...\r\n[INFO] Detected third-party module: tibar/0.4.2\r\n[INFO] Detected third-party module: tibar/0.4.2\r\n[INFO] Titanium SDK version: 2.0.2 (05/30/12 10:21 2ff31a3)\r\n[INFO] iPhone Device family: iphone\r\n[INFO] iPhone SDK version: 5.0\r\n[INFO] iPhone simulated device: iphone\r\n[INFO] Compiling localization files\r\n[INFO] Launching application in Simulator\r\n[INFO] Launched application in Simulator (8.73 seconds)\r\n[INFO] Application started\r\n[INFO] eshtery/0.99 (2.0.2.GA.2ff31a3)\r\n[INFO] [object TibarModule] loaded\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto width value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto width value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto width value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto width value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto width value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto width value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto width value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.\r\n{code}\r\n\r\n1.8\r\n{code}\r\n\r\n[INFO] One moment, building ...\r\n[INFO] Detected third-party module: tibar/0.4.2\r\n[INFO] Detected third-party module: tibar/0.4.2\r\n[INFO] Titanium SDK version: 1.8.2 (02/23/12 17:46 59b3a90)\r\n[INFO] iPhone Device family: iphone\r\n[INFO] iPhone SDK version: 5.0\r\n[INFO] iPhone simulated device: iphone\r\n[INFO] Performing full rebuild. This will take a little bit. Hold tight...\r\n[INFO] Performing clean build\r\n[INFO] Compiling localization files\r\n[INFO] Launching application in Simulator\r\n[INFO] Launched application in Simulator (68.93 seconds)\r\n[INFO] Found 5.0 patch installed\r\n[INFO] Application started\r\n[INFO] eshtery/0.99 (1.8.2.59b3a90)\r\n[INFO] [object TibarModule] loaded\r\n{code}\r\n\r\nThanks", "updateAuthor": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2012-06-16T10:44:18.000+0000", "updated": "2012-06-16T10:44:18.000+0000" }, { "id": "200660", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Couldn't reproduce the issue as per sample you provided us.\r\n\r\nFurthermore, if I run code below starting from 1.8.2 to 2.1.0 CI SDKs will see the same output/behavior.\r\n\r\n- app.js\r\n\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar label1 = Titanium.UI.createLabel({\r\n color:'#999',\r\n text:'I am Window 1',\r\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n textAlign:'center',\r\n width:'auto'\r\n});\r\n \r\nwin1.add(label1);\r\nwin1.open();\r\n \r\nvar img = Ti.UI.createImageView({\r\n// image:'http://someurl.com/someimage.png'\r\n image:'http://files.daddyhunt.com/sites/default/files/imagecache/mangrid-212/photos/z/z/z/277606/Photo_on_2010-09-14_at_13.14_3.jpg'\r\n});\r\nwin1.add(img);\r\nimg.addEventListener('error', function(e){\r\n label1.text = e.image + \"image loading properly got an error\";\r\n img.image = 'KS_nav_ui.png';\r\n});\r\n{code}", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-27T14:03:13.000+0000", "updated": "2012-06-27T14:03:13.000+0000" }, { "id": "207760", "author": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "body": "after more check with 2.0 & 2.1 it don't work\r\n\r\non error working only fired if http link get error, but if wrong local file it don't work\r\n\r\n\r\n(not working)\r\n{code:title=not working}\r\nvar img = Ti.UI.createImageView({\r\n image : 'localfile.png'\r\n});\r\n\r\nimg.addEventListener('error', function () {\r\n alert('Yahooo'); \r\n});\r\n{code}\r\n\r\n\r\n(working)\r\n{code:title=working}\r\nvar img = Ti.UI.createImageView({\r\n image : 'http://domain.com/remotefile.png'\r\n});\r\n\r\nimg.addEventListener('error', function () {\r\n alert('Yahooo'); \r\n});\r\n{code}", "updateAuthor": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2012-07-16T11:45:24.000+0000", "updated": "2012-07-16T12:25:38.000+0000" }, { "id": "207956", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Moving to Titanium Mobile project to dig into it.\r\n\r\nAdded the labels, updated the test case and issue description.", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T21:38:05.000+0000", "updated": "2012-07-16T21:38:05.000+0000" }, { "id": "208021", "author": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "body": "imgaeView have events like (load & error), they will not fired with local files, only fired with remote files\r\n\r\nworking \r\n{code}\r\nvar img = Ti.UI.createImageView({\r\n image : 'http://domain.com/remoteFile.png'\r\n});\r\n\r\nimg.addEventListener('error', function () {\r\n alert('Yahooo'); \r\n});\r\n\r\nimg.addEventListener('load', function () {\r\n alert('Yahooo'); \r\n});\r\n{code}\r\n\r\nnot working\r\n{code}\r\nvar img = Ti.UI.createImageView({\r\n image : 'localFile.png'\r\n});\r\n\r\nimg.addEventListener('error', function () {\r\n alert('Yahooo'); \r\n});\r\n\r\nimg.addEventListener('load', function () {\r\n alert('Yahooo'); \r\n});\r\n{code}\r\n\r\nonly working with local files on Android when send it as blob data\r\n\r\nthe solution (Android only) (load event only)\r\n{code}\r\nvar img = Ti.UI.createImageView({\r\n image : Ti.Filesystem.getFile(Ti.Filesystem.getApplicationDataDirectory(), 'KS_nav_views.png')\r\n});\r\n\r\nimg.addEventListener('load', function () {\r\n alert('Yahooo'); \r\n});\r\n{code}\r\n\r\nThanks", "updateAuthor": { "name": "hazemkhaled", "key": "hazemkhaled", "displayName": "Hazem Khaled", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2012-07-17T06:13:29.000+0000", "updated": "2012-07-17T06:20:22.000+0000" }, { "id": "250058", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "issue reproduces\n\nTested with\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0\niOS iPhone Simulator: iOS SDK version: 6.0", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-03T07:19:34.000+0000", "updated": "2013-05-03T07:19:34.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }