{ "id": "127095", "key": "TIMOB-16549", "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": "16096", "description": "2014 Sprint 09", "name": "2014 Sprint 09", "archived": true, "released": true, "releaseDate": "2014-05-08" }, { "id": "16097", "description": "2014 Sprint 09 SDK", "name": "2014 Sprint 09 SDK", "archived": true, "released": true, "releaseDate": "2014-05-08" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-05-01T17:28:24.000+0000", "created": "2014-03-04T16:13:11.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "automated", "module_textfield", "qe-closed-3.3.0", "qe-testadded", "supportTeam" ], "versions": [ { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-12-07T23:15:28.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": "h5. Problem Description\r\n\r\nApps will crash when we set hint text to a numeric value in textbox after opening window.\r\n\r\n\r\nLooks like error is from:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIText.java#L233\r\n\r\nh5. Test Environment\r\n\r\nTi SDK 3.2.1.GA\r\nTi CLI 3.2.1\r\nAndroid 4.4.2 \r\n\r\nh5. Test Code\r\nindex.xml\r\n{code}\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nindex.js\r\n\r\n{code}\r\nfunction doError(e) {\r\n $.txtField.hintText=456;\r\n}\r\nfunction doNoError(e) {\r\n $.txtField.hintText='789';\r\n}\r\n\r\n$.index.open();\r\n{code}\r\n\r\n\r\n\r\nh5. Steps to reproduce:\r\n\r\n\r\n# Create new allow project 3.2.1.GA\r\n# Update test code to index.js and index.xml file \r\n# Launch in android; press label 'throw error'\r\n\r\n\r\n\r\nh3. Error Logs\r\n\r\n{code}\r\n[WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa4c3d648)\r\n[ERROR] : TiApplication: (main) [15493,15493] Sending event: exception on thread: main msg:java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String; Titanium 3.2.1,2014/02/06 17:03,991027b\r\n[ERROR] : TiApplication: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String\r\n[ERROR] : TiApplication: at ti.modules.titanium.ui.widget.TiUIText.propertyChanged(TiUIText.java:233)\r\n[ERROR] : TiApplication: at org.appcelerator.kroll.KrollPropertyChange.fireEvent(KrollPropertyChange.java:21)\r\n[ERROR] : TiApplication: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1059)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:327)\r\n[ERROR] : TiApplication: at ti.modules.titanium.ui.TextFieldProxy.handleMessage(TextFieldProxy.java:111)\r\n[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95)\r\n[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:137)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5103)\r\n[ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)\r\n[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:525)\r\n[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)\r\n[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)\r\n[ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)\r\n{code}\r\n\r\nh3. Explanation of Error:\r\nhttp://stackoverflow.com/questions/8973381/why-cannot-cast-integer-to-string-in-java\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Crash when hintText value is numeric ", "creator": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "environment": "Ti SDK 3.2.1.GA\r\nTi CLI 3.2.1\r\nAndroid 4.4.2 \r\n", "closedSprints": [ { "id": 50, "state": "closed", "name": "2014 Sprint 09 Tooling", "startDate": "2014-04-28T15:43:24.381Z", "endDate": "2014-05-10T03:44:00.000Z", "completeDate": "2014-05-12T13:36:16.254Z", "originBoardId": 113 } ], "comment": { "comments": [ { "id": "303122", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test code:\r\n{code}\r\nvar text = Ti.UI.createTextField({hintText: 123});\r\nvar win = Ti.UI.createWindow();\r\nvar crash = Ti.UI.createButton({top: 0, title: 'click me!'});\r\n\r\ncrash.addEventListener('click', function(e) {\r\n\ttext.hintText = 456;\r\n});\r\nwin.add(crash);\r\nwin.add(text);\r\nwin.open();\r\n{code}\r\n1. Click on button, app should not crash", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-30T22:17:30.000+0000", "updated": "2014-04-30T22:17:30.000+0000" }, { "id": "303185", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/5653 merged", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-05-01T17:28:24.000+0000", "updated": "2014-05-01T17:28:24.000+0000" }, { "id": "303449", "author": { "name": "dpandey", "key": "dpandey", "displayName": "Deepti Pandey", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified Fixed using :\r\nMac :10.9.2\r\nAppcelerator Studio, build: 3.3.0.201405011408\r\nSDK - 3.3.0.v20140502133323\r\nacs-1.0.14\r\nalloy-1.4.0-dev\r\nnpm-1.3.2\r\ntitanium-3.3.0-dev\r\ntitanium-code-processor-1.1.1\r\nXcode :5.1.1\r\n\r\nUsing given code , no error has been found when hintText value is set to numeric value. Hence closing.", "updateAuthor": { "name": "dpandey", "key": "dpandey", "displayName": "Deepti Pandey", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-05-05T06:22:48.000+0000", "updated": "2014-05-05T06:22:48.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }