Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-28330

Android: Application crashes when scrolling a listview with zero items in the first section:

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 9.3.1, Release 10.0.0
    • Fix Version/s: Release 9.3.2, Release 10.0.0
    • Component/s: Android
    • Labels:
    • Environment:

      MacOS Big Sur: 11.1 Beta 2
      Xcode: 12.3
      Java Version: 1.8.0_242
      Android NDK: 21.3.6528147
      Node.js: 12.18.1
      ""NPM":"5.0.0","CLI":"8.1.1""
      Nexus 5X API 29

    • Story Points:
      5
    • Sprint:
      2021 Sprint 3

      Description

      Application crashes when scrolling a listview with zero items in the first section.

      Test Steps:

      1. Create a New titanium application
      2. Copy the test case below in to the application
      3. Run the application
      4. 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
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmathews Gary Mathews
                Reporter:
                smohammed Samir Mohammed
                Reviewer:
                Joshua Quick
                Tester:
                Satyam Sekhri
              • Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration