java.lang.NullPointerException: Attempt to read from field 'android.widget.TextView nl.proshore.ekoplaza.adapter.ProductsGridViewAdapter$ViewHolder.productTitle' on a null object reference

tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    GridView with ViewHolder crashes while scrolling

    Stack Overflow | 5 months ago | incr3dible noob
    java.lang.NullPointerException: Attempt to read from field 'android.widget.TextView nl.proshore.ekoplaza.adapter.ProductsGridViewAdapter$ViewHolder.productTitle' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to read from field 'android.widget.TextView nl.proshore.ekoplaza.adapter.ProductsGridViewAdapter$ViewHolder.productTitle' on a null object reference

      at nl.proshore.ekoplaza.adapter.ProductsGridViewAdapter.getView()
    2. nl.proshore.ekoplaza
      SimpleSectionedGridAdapter.getView
      1. nl.proshore.ekoplaza.adapter.ProductsGridViewAdapter.getView(ProductsGridViewAdapter.java:102)
      2. nl.proshore.ekoplaza.utils.SimpleSectionedGridAdapter.getView(SimpleSectionedGridAdapter.java:329)
      2 frames
    3. Android Platform
      ViewGroup.dispatchTouchEvent
      1. android.widget.AbsListView.obtainView(AbsListView.java:2360)
      2. android.widget.GridView.makeAndAddView(GridView.java:1440)
      3. android.widget.GridView.makeRow(GridView.java:366)
      4. android.widget.GridView.fillDown(GridView.java:307)
      5. android.widget.GridView.fillGap(GridView.java:267)
      6. android.widget.AbsListView.trackMotionScroll(AbsListView.java:5191)
      7. android.widget.AbsListView.scrollIfNeeded(AbsListView.java:3573)
      8. android.widget.AbsListView.onTouchMove(AbsListView.java:3982)
      9. android.widget.AbsListView.onTouchEvent(AbsListView.java:3807)
      10. android.view.View.dispatchTouchEvent(View.java:9939)
      11. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2663)
      12. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2344)
      12 frames
    4. dev.dworks.libs
      PinnedSectionGridView.dispatchTouchEvent
      1. dev.dworks.libs.astickyheader.ui.PinnedSectionGridView.dispatchTouchEvent(PinnedSectionGridView.java:487)
      1 frame
    5. Android Platform
      ViewGroup.dispatchTouchEvent
      1. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2669)
      2. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
      3. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2669)
      4. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
      5. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2669)
      6. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
      7. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2669)
      8. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
      9. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2669)
      10. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
      11. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2669)
      12. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
      13. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2669)
      14. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
      14 frames
    6. Android
      PhoneWindow.superDispatchTouchEvent
      1. com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:411)
      2. com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1810)
      2 frames
    7. Android Platform
      Activity.dispatchTouchEvent
      1. android.app.Activity.dispatchTouchEvent(Activity.java:3061)
      1 frame
    8. Android v7
      WindowCallbackWrapper.dispatchTouchEvent
      1. android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
      2. android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
      2 frames
    9. Android
      DecorView.dispatchTouchEvent
      1. com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:373)
      1 frame
    10. Android Platform
      ViewRootImpl.deliverInputEvent
      1. android.view.View.dispatchPointerEvent(View.java:10159)
      2. android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4434)
      3. android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4302)
      4. android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3849)
      5. android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3902)
      6. android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3868)
      7. android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3995)
      8. android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3876)
      9. android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4052)
      10. android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3849)
      11. android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3902)
      12. android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3868)
      13. android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3876)
      14. android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3849)
      15. android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6210)
      15 frames