{ "id": "124704", "key": "AC-2168", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2014-01-23T06:43:49.000+0000", "created": "2014-01-12T14:13:15.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:41: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": [], "description": "This is app.js\r\n{noformat}\r\n(function() {\r\n var window = Ti.UI.createWindow({exitOnClose:true});\r\n var textField = Ti.UI.createTextField({top: 80, left: 10, right: 10, height: 200});\r\n window.add(textField);\r\n window.open();\r\n})();\r\n{noformat}\r\nJust put some text in the textField and long press on it.\r\nThis is the stack dump:\r\n{noformat}\r\n[ERROR] TiApplication: (main) [95140,126429] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.2.1,2014/01/12 10:24,84d47ff\r\n[ERROR] TiApplication: java.lang.NullPointerException\r\n[ERROR] TiApplication: \tat android.widget.Editor$NewActionPopupWindow.show(Editor.java:4145)\r\n[ERROR] TiApplication: \tat android.widget.Editor$HandleView.showNewActionPopupWindow(Editor.java:4550)\r\n[ERROR] TiApplication: \tat android.widget.Editor$SelectionModifierCursorController.initHandles(Editor.java:5503)\r\n[ERROR] TiApplication: \tat android.widget.Editor$SelectionModifierCursorController.show(Editor.java:5437)\r\n[ERROR] TiApplication: \tat android.widget.Editor.startSelectionActionMode(Editor.java:1916)\r\n[ERROR] TiApplication: \tat android.widget.Editor.performLongClick(Editor.java:1125)\r\n[ERROR] TiApplication: \tat android.widget.TextView.performLongClick(TextView.java:8983)\r\n[ERROR] TiApplication: \tat android.view.View$CheckForLongPress.run(View.java:18329)\r\n[ERROR] TiApplication: \tat android.os.Handler.handleCallback(Handler.java:730)\r\n[ERROR] TiApplication: \tat android.os.Handler.dispatchMessage(Handler.java:92)\r\n[ERROR] TiApplication: \tat android.os.Looper.loop(Looper.java:137)\r\n[ERROR] TiApplication: \tat android.app.ActivityThread.main(ActivityThread.java:5368)\r\n[ERROR] TiApplication: \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n[ERROR] TiApplication: \tat java.lang.reflect.Method.invoke(Method.java:525)\r\n[ERROR] TiApplication: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1041)\r\n[ERROR] TiApplication: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)\r\n[ERROR] TiApplication: \tat dalvik.system.NativeStart.main(Native Method)\r\n{noformat}", "attachment": [], "flagged": false, "summary": "longpress on textfield crashes in android", "creator": { "name": "buddyguards", "key": "buddyguards", "displayName": "grebulon", "active": true, "timeZone": "Asia/Jerusalem" }, "subtasks": [], "reporter": { "name": "buddyguards", "key": "buddyguards", "displayName": "grebulon", "active": true, "timeZone": "Asia/Jerusalem" }, "environment": "CLI version 3.2.0\r\nTitanium SDK version 3.2.1\r\nAndroid 4.3 (stock) on Samsung S4 I9505\r\nOS X mavericks", "comment": { "comments": [ { "id": "288068", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tried this test case on Samsung Galaxy Nexus device and I am unable to reproduce it. Call stack indicates that it is a native Android exception so it may be specific to a particular device. Would you be able to test it on a different device?", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-14T05:04:50.000+0000", "updated": "2014-01-14T05:04:50.000+0000" }, { "id": "289001", "author": { "name": "buddyguards", "key": "buddyguards", "displayName": "grebulon", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Couldn't reproduce with Samsung Note (1) running CM9.", "updateAuthor": { "name": "buddyguards", "key": "buddyguards", "displayName": "grebulon", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2014-01-21T09:59:34.000+0000", "updated": "2014-01-21T09:59:34.000+0000" }, { "id": "328231", "author": { "name": "andresCel", "key": "andrescel", "displayName": "Andres", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I reproduce the bug on a Nexus 7 2nd Gen, and I got this message on the dbms:\r\n\r\n10-15 12:05:14.453: E/RichInputConnection(783): Unable to connect to the editor to retrieve text.\r\n\r\nThe solution I found is to override the 'longclick' listener for the TextField:\r\n\r\ntextFieldName.addEventListener('longclick', function(e){\r\n\tTi.API.info('Anything you want to control');\r\n});\r\n\r\nAnd the listener prevents the crash on Android textFields, the issue can't be reproduced on iOS.", "updateAuthor": { "name": "andresCel", "key": "andrescel", "displayName": "Andres", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-15T19:42:46.000+0000", "updated": "2014-10-15T19:42:46.000+0000" }, { "id": "328629", "author": { "name": "andresCel", "key": "andrescel", "displayName": "Andres", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Another workaround is to define the android windowActionBar to false, with this, when we perform a longpress event on the text field will display the action bar and that prevent the bug.", "updateAuthor": { "name": "andresCel", "key": "andrescel", "displayName": "Andres", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-20T17:51:04.000+0000", "updated": "2014-10-20T17:51:04.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }