{ "id": "176310", "key": "TIMOB-28555", "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": "21249", "name": "Release 10.2.0", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-10-20T03:13:12.000+0000", "created": "2021-10-14T01:20:47.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "TableView", "android", "editing", "move", "parity" ], "versions": [ { "id": "21052", "description": "", "name": "Release 9.3.0", "archived": false, "released": true, "releaseDate": "2020-12-14" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-10-20T03:13:12.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": "*Summary:*\r\nMoving a {{TableView}} row via edit mode into an empty section or a header/footer title will cause a crash.\r\n\r\n*Steps to reproduce:*\r\n# Build and run the below on Android.\r\n# Tap and hold \"Row 1\".\r\n# Drag it into \"Section 1\".\r\n# Notice the app crashes.\r\n\r\n{code:javascript}\r\nconst window = Ti.UI.createWindow();\r\nconst tableView = Ti.UI.createTableView({\r\n\tdata: [\r\n\t\tTi.UI.createTableViewSection({ headerTitle: \"Section 1\" }),\r\n\t\tTi.UI.createTableViewSection({ headerTitle: \"Section 2\" }),\r\n\t],\r\n\tallowsSelectionDuringEditing: false,\r\n\tallowsMultipleSelectionDuringEditing: false,\r\n\tediting: true,\r\n\theaderTitle: \"Header Title\",\r\n\tfooterTitle: \"Footer Title\",\r\n});\r\ntableView.sections[1].add(Ti.UI.createTableViewRow({ title: \"Row 1\", editable: false, moveable: true }));\r\ntableView.addEventListener(\"move\", (e) => {\r\n\tconst data = {\r\n\t\tsectionTitle: e.section.headerTitle,\r\n\t\trowTitle: e.row.title,\r\n\t\tindex: e.index,\r\n\t};\r\n\tconsole.log(`@@@ \"move\" event: ${JSON.stringify(data)}`);\r\n});\r\nwindow.add(tableView);\r\nwindow.open();\r\n{code}\r\n\r\n*Result:*\r\nApp immediately crashes with the following exception when dragged into an empty section. You don't have to release your finger (ie: drop) for the crash to occur.\r\n{code}\r\n[ERROR] InputEventReceiver: Exception dispatching input event.\r\n[ERROR] TiExceptionHandler: (main) [517745,517850] Index: -1, Size: 0\r\n[ERROR] TiExceptionHandler:\r\n[ERROR] TiExceptionHandler: java.util.ArrayList.add(ArrayList.java:483)\r\n[ERROR] TiExceptionHandler: ti.modules.titanium.ui.TableViewSectionProxy.add(TableViewSectionProxy.java:59)\r\n[ERROR] TiExceptionHandler: ti.modules.titanium.ui.TableViewProxy.moveItem(TableViewProxy.java:264)\r\n[ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.listview.ItemTouchHandler.onMove(ItemTouchHandler.java:281)\r\n[ERROR] TiExceptionHandler: androidx.recyclerview.widget.ItemTouchHelper.moveIfNecessary(ItemTouchHelper.java:885)\r\n[ERROR] TiExceptionHandler: androidx.recyclerview.widget.ItemTouchHelper$2.onTouchEvent(ItemTouchHelper.java:389)\r\n[ERROR] TiExceptionHandler: androidx.recyclerview.widget.RecyclerView.dispatchToOnItemTouchListeners(RecyclerView.java:3259)\r\n[ERROR] TiExceptionHandler: androidx.recyclerview.widget.RecyclerView.onTouchEvent(RecyclerView.java:3421)\r\n[ERROR] TiExceptionHandler: android.view.View.dispatchTouchEvent(View.java:14309)\r\n[ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3112)\r\n[ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2785)\r\n[ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.listview.TiNestedRecyclerView.dispatchTouchEvent(TiNestedRecyclerView.java:109)\r\n[ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Moving a TableView row into an empty section or header/footer causes a crashes", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "459092", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/13120", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-10-14T01:49:45.000+0000", "updated": "2021-10-14T01:49:45.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }