Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException: Attempt to get length of null array #381

Open
abiemann opened this issue Mar 28, 2018 · 0 comments
Open

NullPointerException: Attempt to get length of null array #381

abiemann opened this issue Mar 28, 2018 · 0 comments

Comments

@abiemann
Copy link

abiemann commented Mar 28, 2018

I don't know what the user did, but this showed up in our crash reports.
It seems like savedInstanceState had some data in it that betterpickers picked up on, but then crashed.

EDIT...
REPRO STEPS :

  1. open date picker,
  2. type in some numbers,
  3. don't press OK.
  4. Switch to another app.
  5. Switch back. Crash!

Caused by java.lang.NullPointerException: Attempt to get length of null array
android.os.Parcel.readIntArray (Parcel.java:984)
com.codetroopers.betterpickers.datepicker.DatePicker$SavedState. (DatePicker.java:899)
com.codetroopers.betterpickers.datepicker.DatePicker$SavedState. (DatePicker.java:883)
com.codetroopers.betterpickers.datepicker.DatePicker$SavedState$1.createFromParcel (DatePicker.java:917)
com.codetroopers.betterpickers.datepicker.DatePicker$SavedState$1.createFromParcel (DatePicker.java:915)
android.os.Parcel.readParcelable (Parcel.java:2491)
android.os.Parcel.readValue (Parcel.java:2385)
android.os.Parcel.readSparseArrayInternal (Parcel.java:2833)
android.os.Parcel.readSparseArray (Parcel.java:2088)
android.os.Parcel.readValue (Parcel.java:2442)
android.os.Parcel.readArrayMapInternal (Parcel.java:2752)
android.os.BaseBundle.unparcel (BaseBundle.java:269)
android.os.Bundle.getSparseParcelableArray (Bundle.java:934)
android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1327)
android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState (FragmentManager.java:1752)
android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1821)
android.support.v4.app.FragmentManagerImpl.dispatchStateChange (FragmentManager.java:3251)
android.support.v4.app.FragmentManagerImpl.dispatchCreate (FragmentManager.java:3200)
android.support.v4.app.FragmentController.dispatchCreate (FragmentController.java:184)
android.support.v4.app.FragmentActivity.onCreate (FragmentActivity.java:355)
android.support.v7.app.AppCompatActivity.onCreate (AppCompatActivity.java:84)
com.jennylife.jennylife.activities.BaseActivity.onCreate (BaseActivity.java:35)
com.jennylife.jennylife.activities.DriversLicenseManualEntryActivity.onCreate (DriversLicenseManualEntryActivity.java:103)
android.app.Activity.performCreate (Activity.java:6977)
android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1126)
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2946)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3064)
android.app.ActivityThread.-wrap14 (ActivityThread.java)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1659)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:154)
android.app.ActivityThread.main (ActivityThread.java:6823)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1563)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1451)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant