Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28330] Android: Application crashes when scrolling a listview with zero items in the first section:

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2021-02-02T15:59:02.000+0000
Affected Version/sRelease 9.3.1, Release 10.0.0
Fix Version/sRelease 9.3.2, Release 10.0.0
ComponentsAndroid
Labelsregression
ReporterSamir Mohammed
AssigneeGary Mathews
Created2021-01-27T15:34:42.000+0000
Updated2021-02-12T14:50:45.000+0000

Description

Application crashes when scrolling a listview with zero items in the first section. *+Test Steps:+*

Create a New titanium application

Copy the test case below in to the application

Run the application

Scroll list view

*+Test Case:+*
const window = Ti.UI.createWindow();
const emptySection = Ti.UI.createListSection({ headerTitle: "I'm an empty Section" });
const listItems = [];
for (let index = 0; index < 100; index++) {
 listItems[index] = {
 properties: {
 title: "Row " + (index + 1).toString()
 }
 };
}
const listSection = Ti.UI.createListSection({ headerTitle: "List Section" });
listSection.items = listItems;
const listView = Ti.UI.createListView({
 canScroll: true,
});
listView.sections = [emptySection, listSection];
window.add(listView);
window.open();
*+Error+*
[ERROR]  InputEventReceiver: Exception dispatching input event.
[INFO]   APSAnalyticsStore: crash.report
[ERROR]  TiExceptionHandler: (main) [3,9994] ti.modules.titanium.ui.widget.listview.ListViewProxy cannot be cast to ti.modules.titanium.ui.widget.listview.ListSectionProxy
[ERROR]  TiExceptionHandler:
[ERROR]  TiExceptionHandler: ti.modules.titanium.ui.widget.listview.TiListView.generateScrollPayload(TiListView.java:263)
[ERROR]  TiExceptionHandler: ti.modules.titanium.ui.widget.listview.TiListView$1.onScrolled(TiListView.java:98)
[ERROR]  TiExceptionHandler: androidx.recyclerview.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:5173)
[ERROR]  TiExceptionHandler: androidx.recyclerview.widget.RecyclerView.scrollByInternal(RecyclerView.java:1971)
[ERROR]  TiExceptionHandler: androidx.recyclerview.widget.RecyclerView.onTouchEvent(RecyclerView.java:3391)
[ERROR]  TiExceptionHandler: android.view.View.dispatchTouchEvent(View.java:13415)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3054)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2741)
[ERROR]  TiExceptionHandler: ti.modules.titanium.ui.widget.listview.TiNestedRecyclerView.dispatchTouchEvent(TiNestedRecyclerView.java:109)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3060)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2755)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3060)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2755)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3060)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2755)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3060)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2755)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3060)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2755)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3060)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2755)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3060)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2755)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3060)
[ERROR]  TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2755)
[ERROR]  TiExceptionHandler: com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:465)
[ERROR]  TiExceptionHandler: com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1849)
[ERROR]  TiExceptionHandler: android.app.Activity.dispatchTouchEvent(Activity.java:3993)
[ERROR]  TiExceptionHandler: androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
[ERROR]  TiExceptionHandler: com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:423)
[ERROR]  TiExceptionHandler: android.view.View.dispatchPointerEvent(View.java:13674)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5482)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5285)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4788)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4841)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4807)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4947)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4815)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5004)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4788)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4841)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4807)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4815)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4788)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7505)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7474)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7435)
[ERROR]  TiExceptionHandler: android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7630)
[ERROR]  TiExceptionHandler: android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:188)
[ERROR]  TiExceptionHandler: android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
[ERROR]  TiExceptionHandler: android.view.I

Comments

  1. Gary Mathews 2021-01-29

    master: https://github.com/appcelerator/titanium_mobile/pull/12424
  2. Michael Gangolf 2021-01-30

  3. Muhammad Ahmed Fahad 2021-02-01

    Can there be a 9.3.X release for this? Please backport to 9.3.X
  4. Satyam Sekhri 2021-02-02

    FR Passed. Waiting for Jenkins build
  5. Christopher Williams 2021-02-02

    merged to master for 10.0.0 target. Backport PR for 9_3_X merged (for potential 9.3.2 release).
  6. Ahmed Mohamed 2021-02-12

JSON Source