{ "id": "118644", "key": "TIMOB-15016", "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": "15703", "description": "2013 Sprint 22", "name": "2013 Sprint 22", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "15704", "description": "2013 Sprint 22 API", "name": "2013 Sprint 22 API", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-10-30T18:30:48.000+0000", "created": "2013-08-16T07:37:41.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "headerview", "module_tableview", "qe-testadded", "swipe", "tableview", "triage" ], "versions": [ { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" } ], "issuelinks": [], "assignee": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-04-22T09:10:46.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": "The following code causes a crash when swiping the table up and down.\r\n\r\nTo reproduce, change the number of rows ({{l}}) so that the table has as many rows it can take without needing to scroll.\r\n\r\nIf you remove the {{headerView}} or the {{swipe}} event listener, it no longer crashes.\r\n\r\n{code}\r\nvar w = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar t = Ti.UI.createTableView();\r\n\r\nt.headerView = Ti.UI.createView({\r\n width: Ti.UI.FILL,\r\n height: 50,\r\n backgroundColor: 'red'\r\n});\r\n\r\nvar d = [];\r\nvar l = 12;\r\n\r\nfor (var i = 0; i < l; i++) {\r\n d.push(Ti.UI.createTableViewRow({\r\n title: 'Row ' + i\r\n }));\r\n}\r\n\r\nt.setData(d);\r\n\r\nt.addEventListener('swipe', function () {\r\n Ti.API.info('swipe');\r\n});\r\n\r\nw.add(t);\r\nw.open();\r\n{code}\r\n\r\nThe crash log:\r\n\r\n{code}\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): java.lang.IndexOutOfBoundsException: Invalid index 12, size is 12\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat java.util.ArrayList.get(ArrayList.java:304)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat ti.modules.titanium.ui.widget.tableview.TiTableView.getItemAtPosition(TiTableView.java:411)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat ti.modules.titanium.ui.TableViewProxy.fireEvent(TableViewProxy.java:163)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat org.appcelerator.titanium.view.TiUIView.fireEvent(TiUIView.java:1476)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat org.appcelerator.titanium.view.TiUIView.fireEvent(TiUIView.java:1467)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat org.appcelerator.titanium.view.TiUIView$4.onFling(TiUIView.java:1187)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.GestureDetector.onTouchEvent(GestureDetector.java:1399)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat org.appcelerator.titanium.view.TiUIView$5.onTouch(TiUIView.java:1220)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.View.dispatchTouchEvent(View.java:7345)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2412)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2147)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2139)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1476)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.app.Activity.dispatchTouchEvent(Activity.java:2487)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2087)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.View.dispatchPointerEvent(View.java:7535)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3415)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3347)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4456)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4434)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4538)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.os.MessageQueue.nativePollOnce(Native Method)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.os.MessageQueue.next(MessageQueue.java:125)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.os.Looper.loop(Looper.java:124)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat android.app.ActivityThread.main(ActivityThread.java:4921)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat java.lang.reflect.Method.invoke(Method.java:511)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)\r\n08-16 09:31:41.133: E/MessageQueue-JNI(8879): \tat dalvik.system.NativeStart.main(Native Method)\r\n08-16 09:31:41.133: W/dalvikvm(8879): threadid=1: thread exiting with uncaught exception (group=0x412d22a0)\r\n08-16 09:31:41.138: E/TiApplication(8879): (main) [2677,10633] Sending event: exception on thread: main msg:java.lang.IndexOutOfBoundsException: Invalid index 12, size is 12; Titanium 3.1.2,2013/08/14 12:46,5ceaff8\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: TableView.headerView + swipe listener + no scrolling = crash", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 3.1.2.GA\r\nAndroid 4.1.2 on Samsung GT-I9100 (Galaxy S2)", "comment": { "comments": [ { "id": "269075", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reproduced on Android 4.1.2 x86 emulator with Ti SDK 3.1.2 GA.\n\nNote that it doesn't crash on Samsung Galaxy S2 Android 2.3.6.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-30T18:26:55.000+0000", "updated": "2013-08-30T18:26:55.000+0000" }, { "id": "269896", "author": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "body": "PR:-\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4654", "updateAuthor": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-09-06T06:20:17.000+0000", "updated": "2013-09-06T06:20:17.000+0000" }, { "id": "271212", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Same issue exists for footerView and for TableViews that *are* long enough to require scroll.\r\n\r\nThis is not a nice issue :(", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-09-16T08:51:54.000+0000", "updated": "2013-09-16T08:51:54.000+0000" }, { "id": "272566", "author": { "name": "rvwoens", "key": "rvwoens", "displayName": "Ronald van Woensel", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reproduced here on Nexus 4, galaxy S4 and in emulator. If you have eventhandlers (example: scroll) on a tableview AND a tableviewheader, scrolling to the end of the tableview crashes the app: \r\n\r\n[ERROR][TiApplication(11595)] (main) [191768,223392] Sending event: exception on thread: main msg:java.lang.IndexOutOfBoundsException: Invalid index 18, size is 18; Titanium 3.1.3,2013/09/18 12:01,222f4d1\r\n[ERROR][TiApplication(11595)] java.lang.IndexOutOfBoundsException: Invalid index 18, size is 18\r\n[ERROR][TiApplication(11595)] \tat java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)\r\n[ERROR][TiApplication(11595)] \tat java.util.ArrayList.get(ArrayList.java:304)\r\n[ERROR][TiApplication(11595)] \tat ti.modules.titanium.ui.widget.tableview.TiTableView.getItemAtPosition(TiTableView.java:411)\r\n[ERROR][TiApplication(11595)] \tat ti.modules.titanium.ui.TableViewProxy.fireEvent(TableViewProxy.java:163)\r\n[ERROR][TiApplication(11595)] \tat org.appcelerator.titanium.view.TiUIView.fireEvent(TiUIView.java:1476)\r\n[ERROR][TiApplication(11595)] \tat org.appcelerator.titanium.view.TiUIView.fireEvent(TiUIView.java:1467)\r\n[ERROR][TiApplication(11595)] \tat org.appcelerator.titanium.view.TiUIView$5.onTouch(TiUIView.java:1246)\r\n[ERROR][TiApplication(11595)] \tat android.view.View.dispatchTouchEvent(View.java:5536)", "updateAuthor": { "name": "rvwoens", "key": "rvwoens", "displayName": "Ronald van Woensel", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-23T22:56:47.000+0000", "updated": "2013-09-23T23:09:11.000+0000" }, { "id": "272570", "author": { "name": "rvwoens", "key": "rvwoens", "displayName": "Ronald van Woensel", "active": true, "timeZone": "America/Los_Angeles" }, "body": "same problem as TIMOB-12114\r\n", "updateAuthor": { "name": "rvwoens", "key": "rvwoens", "displayName": "Ronald van Woensel", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-23T23:18:00.000+0000", "updated": "2013-09-23T23:18:00.000+0000" }, { "id": "277314", "author": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "body": "NEW PR :\nhttps://github.com/appcelerator/titanium_mobile/pull/4884", "updateAuthor": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-10-30T05:13:02.000+0000", "updated": "2013-10-30T05:13:02.000+0000" }, { "id": "277748", "author": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified and fixed on:\nMac OSX 10.9 Mavericks\nTitanium Studio, build: 3.2.0.201310312257\nTitanium SDK, build: 3.2.0.v20131101115643\nCLI: 3.2.2\nAlloy: 1.2.2\n\nAndroid Emulators: 2.3.3, 4.1.2 and 4.4\nAndroid Devices: Samsung Galaxy Nexus 4.2.2\n\nSwiping the table does not result in a crash.\nClosing.", "updateAuthor": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-01T20:54:57.000+0000", "updated": "2013-11-01T20:54:57.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }