{ "id": "173033", "key": "TIMOB-26841", "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": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-05-09T09:09:09.000+0000", "created": "2019-02-21T09:11:28.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "background", "engSchedule", "view" ], "versions": [ { "id": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "issuelinks": [], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2019-05-09T09:09:09.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": "Using Android SDK 7.5.0, text field touch start event is failing with below error. \r\n\r\n{code}\r\n[WARN] : Settings: mValues not put! needsGenerationTracker: true currentGeneration: -1 name: enable_navbar value: null\r\n[ERROR] : TiExceptionHandler: (main) [39572,39572] ti:/titanium.js:207\r\n[ERROR] : TiExceptionHandler: \t\t\tserialized[k] = this[k];\r\n[ERROR] : TiExceptionHandler: ^\r\n[ERROR] : TiExceptionHandler: Error: android.graphics.drawable.PaintDrawable cannot be cast to android.graphics.drawable.StateListDrawable\r\n[ERROR] : TiExceptionHandler: at TextField.value (ti:/titanium.js:207:24)\r\n[ERROR] : TiExceptionHandler: at JSON.stringify ()\r\n[ERROR] : TiExceptionHandler: at TextField. (/app.js:23:20)\r\n[ERROR] : TiExceptionHandler: at TextField.value (ti:/events.js:49:21)\r\n[ERROR] : TiExceptionHandler: at TextField.value (ti:/events.js:101:19)\r\n[ERROR] : TiExceptionHandler:\r\n[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.getBackgroundDisabledColor(TiViewProxy.java:1190)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:971)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1196)\r\n[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:401)\r\n[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.TextFieldProxy.handleMessage(TextFieldProxy.java:157)\r\n[ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:104)\r\n[ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:166)\r\n[ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:7425)\r\n[INFO] : zygote64: Do partial code cache collection, code=30KB, data=30KB\r\n{code}\r\n\r\n*Test steps:*\r\n\r\n1. Create a new project\r\n2. Paste the sample test code and run on android device\r\n3. After running, start touching on the text field and got the error.\r\n\r\n*Test code:*\r\n{code}\r\nvar win = Ti.UI.createWindow({ \r\nbackgroundColor : 'gray' \r\n}); \r\n\r\n\r\nvar view = Ti.UI.createView({ \r\nheight : Ti.UI.SIZE, \r\nborderColor : \"red\", \r\nwidth : Ti.UI.FILL, \r\nlayout : \"vertical\" \r\n}); \r\n\r\n\r\nvar TF = Ti.UI.createTextField({ \r\nheight : 40, \r\nwidth : Ti.UI.FILL, \r\nbackgroundColor : \"#FAFAFA\", \r\nborderColor : \"black\", \r\ntop : 20 \r\n}); \r\nTF.addEventListener(\"touchstart\", function(e) { \r\n\t\r\nTi.API.debug(JSON.stringify(e)); \r\n}); \r\nwin.add(TF); \r\n\r\nwin.add(view); \r\nwin.open();\r\n{code}\r\n*Test Environment:*\r\n{code}\r\nAppcelerator Command-Line Interface, version 7.0.9\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8589934592\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 7.5.0.GA\r\n SDK Path = /Users/sharifabudarda/Library/Application Support/Titanium/mobilesdk/osx/7.5.0.GA\r\n Target Platform = android\r\n{code}\r\n\r\nDevice:Huawei Y9 2018", "attachment": [], "flagged": false, "summary": "Android: Reading TextField \"backgroundDisabledColor\" will crash if background/border color is assigned", "creator": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1123, "state": "closed", "name": "2019 Sprint 7", "startDate": "2019-03-18T17:27:25.993Z", "endDate": "2019-03-30T17:27:00.000Z", "completeDate": "2019-03-29T18:02:37.441Z", "originBoardId": 114 }, { "id": 1124, "state": "closed", "name": "2019 Sprint 8", "startDate": "2019-03-31T18:03:00.000Z", "endDate": "2019-04-12T18:03:00.000Z", "completeDate": "2019-04-12T19:04:50.175Z", "originBoardId": 114 }, { "id": 1128, "state": "closed", "name": "2019 Sprint 9", "startDate": "2019-04-14T19:05:00.000Z", "endDate": "2019-04-26T19:05:00.000Z", "completeDate": "2019-04-26T22:05:13.933Z", "originBoardId": 114 }, { "id": 1129, "state": "closed", "name": "2019 Sprint 10", "startDate": "2019-04-28T22:06:00.000Z", "endDate": "2019-05-17T22:06:00.000Z", "completeDate": "2019-05-20T16:48:42.522Z", "originBoardId": 114 }, { "id": 1118, "state": "closed", "name": "2019 Sprint 5", "startDate": "2019-02-24T18:36:06.435Z", "endDate": "2019-03-08T18:36:00.000Z", "completeDate": "2019-03-07T22:19:47.057Z", "originBoardId": 114 }, { "id": 1119, "state": "closed", "name": "2019 Sprint 6", "startDate": "2019-03-03T22:20:00.193Z", "endDate": "2019-03-15T22:20:00.000Z", "completeDate": "2019-03-18T17:26:43.120Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "446246", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've confirmed that this is a regression introduced in 7.5.0.\r\n\r\nBut it's not a bug with the TextField's \"touchstart\" event.\r\n\r\nThis crash will only happen when reading the {{TextField}}'s newly added \"backgroundDisabledColor\" property after setting its \"backgroundColor\" and a border property such as \"borderColor\" or \"borderWidth\". The \"backgroundDisabledColor\" property is being read by the attached code's \"JSON.stringify(e)\" since the passed in event references the {{TextField} that was touched.\r\n\r\nYou can work-around this issue by setting the \"backgroundDisabledColor\" property to a value. For example:\r\n{code:javascript}\r\nvar TF = Ti.UI.createTextField({\r\n\theight : 40,\r\n\twidth : Ti.UI.FILL,\r\n\tbackgroundColor : \"#FAFAFA\",\r\n\tbackgroundDisabledColor : \"gray\", // <- Add this.\r\n\tborderColor : \"black\",\r\n\ttop : 20,\r\n});\r\n{code}\r\n\r\nAlternatively, you can work-around this by removing the {{JSON.stringify()}} of the {{TextField}}.\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-02-22T04:47:13.000+0000", "updated": "2019-02-22T04:47:13.000+0000" }, { "id": "446247", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The below code is a simpler test case. It will crash on app startup as of 7.5.0 unless you uncomment then \"backgroundDisabledColor\" line.\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nvar textField = Ti.UI.createTextField({\r\n\twidth: \"80%\",\r\n\tcolor: \"white\",\r\n\tbackgroundColor: \"black\",\r\n\tborderColor: \"white\",\r\n//\tbackgroundDisabledColor: \"gray\",\r\n});\r\nwindow.add(textField);\r\nwindow.open();\r\nTi.API.info(\"### backgroundDisabledColor: \" + textField.backgroundDisabledColor);\r\nTi.API.info(\"### JSON.stringify(textField): \" + JSON.stringify(textField));\r\n{code}\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-02-22T04:58:31.000+0000", "updated": "2019-02-22T05:01:04.000+0000" }, { "id": "446267", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~jquick],\r\nThanks for your explanation. The customer is informed about this. Will be back here after getting any feedback from them.", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-02-24T08:42:41.000+0000", "updated": "2019-02-24T08:42:41.000+0000" }, { "id": "446464", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10744", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-03-02T03:59:46.000+0000", "updated": "2019-03-02T03:59:46.000+0000" }, { "id": "448096", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/10393", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-30T21:54:52.000+0000", "updated": "2019-04-30T21:54:52.000+0000" }, { "id": "448152", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR passed. NO crashing . https://github.com/appcelerator/titanium_mobile/pull/10393 PR merged.", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-05-02T18:22:55.000+0000", "updated": "2019-05-02T18:22:55.000+0000" }, { "id": "448249", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the Fix on sdk 8.1.0.v20190508095544. Works as expected.\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 8.1.0.v20190508095544\r\nDevice =samsung s5 android 6\r\nEmulator =pixel 3xl android 9\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-05-08T23:09:20.000+0000", "updated": "2019-05-08T23:09:20.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }