{ "id": "139296", "key": "TIMOB-17994", "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": "2014-11-08T13:13:56.000+0000", "priority": null, "labels": [ "alloy", "applyProperties", "backgroundImage" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2020-01-21T09:49:20.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "h1. The problem\r\n\r\nWhile working on an Alloy project that used {{autoStyle}} on some views, I sow these 4 lines scrolling by all the time:\r\n\r\n{code}\r\n[WARN] could not find image: \r\n[WARN] could not find image: \r\n[WARN] could not find image: \r\n[WARN] could not find image: \r\n{code}\r\n\r\nh1. The source\r\n\r\nI tracked it down to a call to {{$.removeClass($.proxy, \\['class'\\])}}.\r\n\r\nWhen Alloy removes a class it will use a [RESET object|https://github.com/appcelerator/alloy/blob/master/Alloy/lib/alloy.js#L38] as defaults for the remaining styles.\r\n\r\nI then made a test case that reproduces:\r\n\r\n{code:javascript}\r\nvar w = Ti.UI.createWindow({\r\n backgroundColor: 'green'\r\n});\r\n\r\nvar v = Ti.UI.createButton({ // replacing with Ti.UI.View reduces from 4 to 0 warning (!)\r\n width: 100,\r\n height: 100,\r\n backgroundColor: 'red'\r\n});\r\nw.add(v);\r\n\r\nw.open();\r\n\r\nv.applyProperties({\r\n \"backgroundColor\": 'red', // removing reduces from 4 to 2 warnings\r\n \"shadowColor\": null, // removing reduces from 4 to 2 warnings\r\n \"shadowOffset\": null, // removing reduces from 4 to 2 warnings\r\n \"backgroundImage\": null, // removing reduces from 4 to 1 warning (!)\r\n \"backgroundRepeat\": null, // removing reduces from 4 to 2 warnings\r\n \"backgroundSelectedColor\": null, // removing reduces from 4 to 2 warnings\r\n \"backgroundSelectedImage\": null, // removing reduces from 4 to 1 warning (!)\r\n \"visible\": true, // removing reduces from 4 to 2 warnings\r\n \"backgroundGradient\": {}, // removing reduces from 4 to 2 warnings\r\n \"borderRadius\": 0, // removing reduces from 4 to 2 warnings\r\n \"backgroundLeftCap\": 0, // removing reduces from 4 to 2 warnings\r\n \"backgroundTopCap\": 0 // removing reduces from 4 to 2 warnings\r\n});\r\n{code}\r\n\r\nThe actually error must originate from:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/58198c641d77e17d156431666e80bae732b5c130/iphone/Classes/TiUIView.m#L315\r\n\r\nBut what is weird is that on line 311 of the above source, it checks for the image to be {{nil}} which I assume the {{null}} values of the above test case should have been converted to.\r\n\r\nIt's also striking that these warnings don't show for a {{View}}, but only for a {{Button}}. So the issue must be somewhere between lines 233 and 255 of [TiUIButton.m|https://github.com/appcelerator/titanium_mobile/blob/58198c641d77e17d156431666e80bae732b5c130/iphone/Classes/TiUIButton.m#L233-L255]", "attachment": [], "flagged": false, "summary": "Different button-properties set to NULL give: [WARN] could not find image: ", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 3.4.0.GA", "comment": { "comments": [ { "id": "341848", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Having the same issue using $.resetClass(view, 'class1 class2');", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-02-03T17:19:13.000+0000", "updated": "2015-02-03T17:19:13.000+0000" }, { "id": "449735", "author": { "name": "NewportSolutions", "key": "newportsolutions", "displayName": "Joe", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Still having this issue on 7.5.1GA when using $.resetClass(view, 'class1 class2');", "updateAuthor": { "name": "NewportSolutions", "key": "newportsolutions", "displayName": "Joe", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-07-11T17:34:10.000+0000", "updated": "2019-07-11T17:34:10.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }