{
"id": "167207",
"key": "TIMOB-24605",
"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": "20238",
"description": "",
"name": "Release 7.5.0",
"archived": false,
"released": true,
"releaseDate": "2018-11-15"
}
],
"resolution": {
"id": "1",
"description": "A fix for this issue is checked into the tree and tested.",
"name": "Fixed"
},
"resolutiondate": "2018-08-24T01:43:40.000+0000",
"created": "2017-04-20T09:40:20.000+0000",
"priority": {
"name": "Critical",
"id": "1"
},
"labels": [
"android",
"backgroundImage",
"defaultImage",
"url",
"view"
],
"versions": [],
"issuelinks": [],
"assignee": {
"name": "jquick",
"key": "jquick",
"displayName": "Joshua Quick",
"active": true,
"timeZone": "America/Los_Angeles"
},
"updated": "2018-08-24T01:43:44.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\nSetting Android {{View}} property \"backgroundImage\" to a URL will cause a crash if \"tiapp.xml\" property \"run-on-main-thread\" is set to {{true}}.\r\n\r\n_(This also happens with {{ImageView}} \"defaultImage\" property as well.)_\r\n\r\n*Steps to reproduce:*\r\n# Uninstall the app from the device if already installed. (Will delete cached web responses.)\r\n# Make sure the Android device has Internet access.\r\n# Set \"tiapp.xml\" file property \"run-on-main-thread\" to {{true}}.\r\n# Build and run the below code.\r\n# Notice that the app crashes/hangs on startup.\r\n\r\ntiapp.xml\r\n{code:xml}\r\n\r\n\r\n\ttrue\r\n\r\n{code}\r\n\r\napp.js\r\n{code:java}\r\nvar window = Ti.UI.createWindow();\r\nwindow.add(Ti.UI.createView({\r\n\tbackgroundImage: \"http://raw.githubusercontent.com/recurser/exif-orientation-examples/master/Portrait_1.jpg\",\r\n}));\r\nwindow.open();\r\n{code}\r\n\r\n\r\n----\r\n*Original Post:*\r\nI am unable to set background image for an imageView using an external URL. It crashes the app, but only if ran via main thread.\r\n\r\n*index.xml*\r\n{code:xml}\r\n\r\n\t\r\n\t \r\n\t\r\n\r\n{code}\r\n\r\n*index.js*\r\n{code:js}\r\nvar b = \"http://www.onlineinstruments.co.in/assets/images/Online%20Logo_PNG.png\";\r\n$.imageView.setBackgroundImage(b);\r\n{code}",
"attachment": [],
"flagged": false,
"summary": "Android: Setting \"backgroundImage\" to a web URL causes a crash if JS is running on the UI thread",
"creator": {
"name": "isener",
"key": "isener",
"displayName": "ILAY SENER",
"active": true,
"timeZone": "Australia/Sydney"
},
"subtasks": [],
"reporter": {
"name": "isener",
"key": "isener",
"displayName": "ILAY SENER",
"active": true,
"timeZone": "Australia/Sydney"
},
"environment": "Mac OSX\r\nStudio 4.8.1.201612050850\r\nTitanium SDK 6.0.3\r\nAndroid Emulator \r\nAndroid API 23",
"closedSprints": [
{
"id": 1058,
"state": "closed",
"name": "2018 Sprint 16 SDK",
"startDate": "2018-07-29T22:26:06.486Z",
"endDate": "2018-08-12T22:26:00.000Z",
"completeDate": "2018-08-13T17:38:16.757Z",
"originBoardId": 114
}
],
"comment": {
"comments": [
{
"id": "439636",
"author": {
"name": "jquick",
"key": "jquick",
"displayName": "Joshua Quick",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10222",
"updateAuthor": {
"name": "jquick",
"key": "jquick",
"displayName": "Joshua Quick",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2018-08-01T04:34:35.000+0000",
"updated": "2018-08-01T04:34:35.000+0000"
},
{
"id": "440741",
"author": {
"name": "smohammed",
"key": "smohammed",
"displayName": "Samir Mohammed",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "*Closing ticket.* Verified improvement in SDK version: {{7.4.0.v20180810061237}}. Application no longer crashes when setting a {{backgroundimage}} to a web URL when running on main thread. \r\n\r\n*FR Passed (Test Steps):*\r\n# Created a new application using Titanium \r\n# Set the \"tiapp.xml\" file property \"run-on-main-thread\" to true.\r\n# Built and ran the first test case in https://github.com/appcelerator/titanium_mobile/pull/10222\r\n# Image was displayed successfully without any issues \r\n# Uninstalled the created application\r\n# Changed the code to match the second test case found in https://github.com/appcelerator/titanium_mobile/pull/10222\r\n# Built and ran the second test case \r\n# Image was displayed \"upright\" successfully and the application did not crash\r\n\r\n*Test Environment*\r\n{code:java}\r\nAPPC Studio: 5.0.0.201712081732\r\nAPPC CLI: 7.0.4\r\nPixel XL (8.1)\r\nOperating System Name: Mac OS High Sierra\r\nOperating System Version: 10.13\r\nNode.js Version: 8.9.1\r\nXcode 9.2\r\n{code}\r\n",
"updateAuthor": {
"name": "smohammed",
"key": "smohammed",
"displayName": "Samir Mohammed",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2018-08-14T09:37:25.000+0000",
"updated": "2018-08-14T09:37:25.000+0000"
}
],
"maxResults": 2,
"total": 2,
"startAt": 0
}
}
}