java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference

Stack Overflow | JackW5808 | 1 week ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    FragmentStatePageAdapter crash when using support lib v4 21.0.3

    Stack Overflow | 2 years ago | Constantin Cerberus
    java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference
  2. 0

    No indication as to where NPE could occur

    Stack Overflow | 1 week ago | JackW5808
    java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference
  3. 0

    NullPointerException without the line of code where the error occured

    Stack Overflow | 1 week ago | JackW5808
    java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Fragment force close while setting adapter

    Stack Overflow | 1 year ago | GuruPrasath S
    java.lang.IllegalStateException: Fragment no longer exists for key f0: index 1
  6. 0

    Issue 79434 - android - Fragment issue - Android Open Source Project - Issue Tracker - Google Project Hosting

    google.com | 1 year ago
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp.mena/com.myapp.mena.ui.HomeActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference

  1. Macapon 8 times, last 10 months ago
3 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference

    at android.support.v4.app.FragmentManagerImpl.getFragment()
  2. Android Support v4
    ViewPager.onRestoreInstanceState
    1. android.support.v4.app.FragmentManagerImpl.getFragment(FragmentManager.java:873)
    2. android.support.v4.app.FragmentStatePagerAdapter.restoreState(FragmentStatePagerAdapter.java:215)
    3. android.support.v4.view.ViewPager.onRestoreInstanceState(ViewPager.java:1481)
    3 frames
  3. Android Platform
    View.restoreHierarchyState
    1. android.view.View.dispatchRestoreInstanceState(View.java:15751)
    2. android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3231)
    3. android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3237)
    4. android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3237)
    5. android.view.View.restoreHierarchyState(View.java:15729)
    5 frames
  4. Android Support v4
    FragmentManagerImpl$1.run
    1. android.support.v4.app.Fragment.restoreViewState(Fragment.java:475)
    2. android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1329)
    3. android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
    4. android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
    5. android.support.v4.app.BackStackRecord.executePopOps(BackStackRecord.java:803)
    6. android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2353)
    7. android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2146)
    8. android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2098)
    9. android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2008)
    10. android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710)
    10 frames
  5. Android Platform
    ActivityThread.main
    1. android.os.Handler.handleCallback(Handler.java:751)
    2. android.os.Handler.dispatchMessage(Handler.java:95)
    3. android.os.Looper.loop(Looper.java:154)
    4. android.app.ActivityThread.main(ActivityThread.java:6119)
    4 frames
  6. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    1 frame
  7. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
    2 frames