{ "id": "129692", "key": "TIMOB-16911", "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": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-05-29T02:18:06.000+0000", "created": "2014-04-25T18:36:52.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T22:48:30.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": "I'm getting this crash report on Google Play for a Galaxy Axiom\r\n{code}\r\njava.lang.ClassCastException: java.lang.String cannot be cast to android.text.Spannable\r\nat android.widget.TextView.setEnabled(TextView.java:1432)\r\nat org.appcelerator.titanium.view.TiUIView.registerForTouch(TiUIView.java:1457)\r\nat org.appcelerator.titanium.view.TiUIView.registerForTouch(TiUIView.java:1271)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:472)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:487)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:471)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:449)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:566)\r\nat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:218)\r\nat org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:100)\r\nat ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:443)\r\nat android.os.Handler.dispatchMessage(Handler.java:95)\r\nat android.os.Looper.loop(Looper.java:137)\r\nat android.app.ActivityThread.main(ActivityThread.java:4962)\r\nat java.lang.reflect.Method.invokeNative(Native Method)\r\nat java.lang.reflect.Method.invoke(Method.java:511)\r\nat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)\r\nat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)\r\nat dalvik.system.NativeStart.main(Native Method)\r\n{code}\r\n\r\nMy preliminary research indicates this can happen when calling \"setEnabled\" on a TextView that doesn't yet have a value.\r\n\r\nYou can find our app @ \r\n\r\nhttps://play.google.com/store/apps/details?id=com.findingrover.findingrover\r\n\r\nIf you happen to have a Samsung Axiom laying around running Android 4.1", "attachment": [], "flagged": false, "summary": "Android: Setting touchEnabled on labels (TextView) crashes intermittently on Axiom device", "creator": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "3.2.2", "closedSprints": [ { "id": 407, "state": "closed", "name": "2015 Sprint 11 SDK", "startDate": "2015-05-23T00:00:08.253Z", "endDate": "2015-06-06T00:00:00.000Z", "completeDate": "2015-06-08T16:18:16.381Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "302661", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We cannot diagnose such issues at the app level. Please provide a simple runnable test case to reproduce this error.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-28T05:12:42.000+0000", "updated": "2014-04-28T05:12:42.000+0000" }, { "id": "303087", "author": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm not quite sure how. We tested this app on 20+ android devices and it only fails in the line mentioned above on one device. \r\n\r\nI'm really just alerting you to the fact that in \r\n\r\nTiUIView.java @ line 1457 the code:\r\n{code}\r\ntouchable.setEnabled(false);\r\n{code}\r\nCan cause a crash when set on a TextView (TiUILabel) that doesn't have a value.\r\n\r\nThis was a change made to TiUIView.java sometime between 3.1.3 and 3.2.3.\r\n\r\nThe only fix i could come up with is\r\n{code}\r\ntry {\r\ntouchable.setEnabled(false); \r\n} catch (Exception e) {\r\nLog.d(TAG, \"Could not set enabled on touchable\");\r\n}\r\n{code}", "updateAuthor": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-30T19:58:09.000+0000", "updated": "2014-04-30T20:01:27.000+0000" }, { "id": "303417", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering to evaluate the call stack and proposed fix. I was not able to reproduce this issue as I don't have this specific device.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-04T05:57:46.000+0000", "updated": "2014-05-04T05:57:46.000+0000" }, { "id": "310884", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I just started seeing this on SDK 3.2.4.v20140519174127.\r\n\r\nThese are the devices I see affected in Crittercism:\r\n\r\nSamsung Stratosphere, android 4.1.2\r\nSGH-I547C, android 4.1.2\r\n\r\nI can provide the stack traces or other details, if desired. I know at least one of the crashes is happening without the \"setEnabled\" cause because the user can't login and there are no \"setEnabled\" calls on public screens. I have yet to narrow down where they're getting the crash, but if I do I'll add more detail here.", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-25T14:23:15.000+0000", "updated": "2014-06-25T14:23:15.000+0000" }, { "id": "315022", "author": { "name": "mfogg", "key": "mfogg", "displayName": "Mike Fogg", "active": true, "timeZone": "America/New_York" }, "body": "@Alejandro, I'm curious if you're using touchEnabled at all (not necessarily 'setEnabled') on the pages you're seeing crashes on? \r\n\r\nI'm seeing this issue *a lot* on multiple devices, all running *Android 4.1.2* and am trying to create a sample app that breaks so that we can get it fixued up but cannot seem to recreate it... very frustrating.\r\n\r\nJust trying to see if I can get any more hints that might help me figure out how to break it :)", "updateAuthor": { "name": "mfogg", "key": "mfogg", "displayName": "Mike Fogg", "active": true, "timeZone": "America/New_York" }, "created": "2014-07-21T15:28:26.000+0000", "updated": "2014-07-21T15:28:26.000+0000" }, { "id": "315185", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hey @mfogg, are you asking if I have touchEnabled set on any of the object I'm using at creation time, or if I modify the touchEnabled property on any objects after creation? Let me know and I'll look.\r\n\r\nI was thinking of changing all setEnabled calls to touchEnabled because setEnabled is deprecated in SDK 3.3 I believe. I don't know if that will have any affect on this, FYI. Do you?", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-22T00:44:34.000+0000", "updated": "2014-07-22T05:34:42.000+0000" }, { "id": "315263", "author": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This crash is happening when setting touchEnabled. If you look at the underlying Java code in TiUIView.java, you can see that the view (e.g. Android TextView) is set to enabled or not, only when this property is present:\r\n\r\n{code}\r\nprotected void registerForTouch(final View touchable)\r\n{\r\nif (touchable == null) {\r\nreturn;\r\n}\r\n\r\nif (proxy.hasProperty(TiC.PROPERTY_TOUCH_ENABLED)) {\r\nboolean enabled = TiConvert.toBoolean(proxy.getProperty(TiC.PROPERTY_TOUCH_ENABLED), true);\r\nif (!enabled) {\r\ntouchable.setEnabled(false); //This is where is fails\r\n}\r\n}\r\nregisterTouchEvents(touchable);\r\ndoSetClickable(touchable);\r\n\r\n}\r\n{code}\r\n\r\nRight now, the only solution is to use 3.2.2 or a custom build of 3.3.0 with this fixed (which is what we're opting for).\r\n\r\n", "updateAuthor": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-22T16:03:20.000+0000", "updated": "2014-07-22T16:03:54.000+0000" }, { "id": "316642", "author": { "name": "kt", "key": "kt", "displayName": "KT", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm me-tooing this just to let you know it's not an isolated incident. The same crash and stack trace, and only (so far) on Samsung Galaxy Stratosphere 2 (which someone mentioned previously for this bug) running 4.1.", "updateAuthor": { "name": "kt", "key": "kt", "displayName": "KT", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-01T14:10:16.000+0000", "updated": "2014-08-01T14:10:16.000+0000" }, { "id": "343633", "author": { "name": "shockoe", "key": "shockoe", "displayName": "SHOCKOE TEAM", "active": true, "timeZone": "America/New_York" }, "body": "This issue is becoming urgent as more Android devices are having the same issue.\r\nUsers with other Samsung devices like the Galaxy Rugby are having this issue. This specific device is running Android 4.1.2", "updateAuthor": { "name": "shockoe", "key": "shockoe", "displayName": "SHOCKOE TEAM", "active": true, "timeZone": "America/New_York" }, "created": "2015-02-17T22:30:09.000+0000", "updated": "2015-02-17T22:30:09.000+0000" }, { "id": "344508", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~rtlechuga] Do you have a device that reproduces this issue?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-02-27T00:32:55.000+0000", "updated": "2015-02-27T00:32:55.000+0000" }, { "id": "344510", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~ingo] not sure, let me check and I'll update the ticket\r\n", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-02-27T00:43:29.000+0000", "updated": "2015-02-27T00:43:29.000+0000" }, { "id": "349045", "author": { "name": "jpriebe", "key": "jpriebe", "displayName": "Jason Priebe", "active": true, "timeZone": "America/New_York" }, "body": "This is a complete show-stopper for us. If we add a label to a TableViewRow, and we don't set the label's touchEnabled property to false, then tapping the label will have no visual effect -- the backgroundSelectedColor will not be activated. If we *do* set touchEnabled to false, the app works, but it will crash on many devices:\r\n\r\n- Galaxy Axiom (infiniteusc)\r\n- Samsung Galaxy Stratosphere2 (aegis2vzw)\r\n- Galaxy Victory (goghvmu)\r\n- Galaxy Victory (goghspr)\r\n\r\nPlease give this priority! And you probably should start by fixing the issue where touch events that bubble to the TableViewRow through its children still activate the backgroundSelectedColor. Then I would have never set touchEnabled to false in the first place!", "updateAuthor": { "name": "jpriebe", "key": "jpriebe", "displayName": "Jason Priebe", "active": true, "timeZone": "America/New_York" }, "created": "2015-04-09T15:47:46.000+0000", "updated": "2015-04-09T15:47:46.000+0000" }, { "id": "349048", "author": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "body": "If anyone wants a patched version that fixes this, send me an email andrew@gstreetmedia.com", "updateAuthor": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-09T15:57:29.000+0000", "updated": "2015-04-09T15:57:29.000+0000" }, { "id": "349079", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~jpriebe] you mind sharing your test case with us? We can not replicate this issue, that's why it has no traction.\r\nThanks", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-04-09T18:31:29.000+0000", "updated": "2015-04-09T18:31:29.000+0000" }, { "id": "349082", "author": { "name": "jpriebe", "key": "jpriebe", "displayName": "Jason Priebe", "active": true, "timeZone": "America/New_York" }, "body": "I don't have one of the devices to test with, so I haven't been able to build a test case. I'm just working off our APM reports.\r\n\r\nI may purchase one of these terrible phones just so I can do some more testing.\r\n\r\nBut my second point is that the backgroundSelectedColor should get activated on a TableViewRow whether the user is tapping empty space in the row or tapping a label in the row. That is highly repeatable; I think you could probably even find an example in the KitchenSink. I realize that is a separate bug, but if it were fixed, there would almost never be a need to set touchEnabled=false on a label.\r\n\r\nFor the life of me, I cannot think of another way around the backgroundSelectedColor problem. I tried putting an invisible overlay on top of the TableViewRow (over top of all its children), and setting toucheEnabled=false on that view. But the touch events bubbled through in exactly the same way as without the overlay, and the backgroundSelectedColor did not activate.\r\n\r\nIf you have any ideas on that, I would be very interested in hearing them.", "updateAuthor": { "name": "jpriebe", "key": "jpriebe", "displayName": "Jason Priebe", "active": true, "timeZone": "America/New_York" }, "created": "2015-04-09T18:43:28.000+0000", "updated": "2015-04-09T18:43:28.000+0000" }, { "id": "353595", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "CR, Functionally tested. PR approved.\r\nhttps://github.com/appcelerator/titanium_mobile/pull/6872", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-05-27T02:42:39.000+0000", "updated": "2015-05-27T02:42:39.000+0000" }, { "id": "415167", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T22:48:30.000+0000", "updated": "2017-03-22T22:48:30.000+0000" } ], "maxResults": 30, "total": 30, "startAt": 0 } } }