{ "id": "176307", "key": "TIMOB-28553", "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:12:54.000+0000", "created": "2021-10-12T19:25:03.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "ListItem", "ListView", "android", "move" ], "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:12:54.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 {{ListView}} item via edit mode and drag-and-drop will cause a crash if the {{ListItem}} is moved into an empty {{ListSection}}.\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 listView = Ti.UI.createListView({\r\n\tsections: [\r\n\t\tTi.UI.createListSection({\r\n\t\t\theaderTitle: \"Section 1\",\r\n\t\t}),\r\n\t\tTi.UI.createListSection({\r\n\t\t\theaderTitle: \"Section 2\",\r\n\t\t\titems: [{\r\n\t\t\t\tproperties: {\r\n\t\t\t\t\ttitle: `Row 1`,\r\n\t\t\t\t\tcanEdit: false,\r\n\t\t\t\t\tcanMove: true,\r\n\t\t\t\t},\r\n\t\t\t}],\r\n\t\t}),\r\n\t],\r\n\tallowsSelectionDuringEditing: false,\r\n\tallowsMultipleSelectionDuringEditing: false,\r\n\tediting: true,\r\n});\r\nlistView.addEventListener(\"move\", (e) => {\r\n\tconsole.log(`@@@ \"move\" event: ${JSON.stringify(e)}`);\r\n});\r\nwindow.add(listView);\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) [4739,4854] ti.modules.titanium.ui.widget.listview.ListViewProxy cannot be cast to ti.modules.titanium.ui.widget.listview.ListSectionProxy\r\n[ERROR] TiExceptionHandler:\r\n[ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.listview.ListViewProxy.moveItem(ListViewProxy.java:186)\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 ListView item into an empty section causes a crash", "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": "459090", "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:48:33.000+0000", "updated": "2021-10-14T01:48:33.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }