Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

IndexOutOfBoundsException after restoring from Parcel #146

Closed
nathanielwolf opened this issue Oct 28, 2014 · 3 comments
Closed

IndexOutOfBoundsException after restoring from Parcel #146

nathanielwolf opened this issue Oct 28, 2014 · 3 comments

Comments

@nathanielwolf
Copy link

Using StaggeredGridLayoutManager
With "Don't Keep Activities" enabled

10-28 17:40:43.316 1031-1031/com.couchsurfing.mobile.debug E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.couchsurfing.mobile.debug/com.couchsurfing.mobile.ui.MainActivity}: java.lang.ArrayIndexOutOfBoundsException: src.length=11 srcPos=0 dst.length=0 dstPos=0 length=11
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ArrayIndexOutOfBoundsException: src.length=11 srcPos=0 dst.length=0 dstPos=0 length=11
at java.lang.System.arraycopy(Native Method)
at org.lucasr.twowayview.widget.ItemEntries.ensureSize(ItemEntries.java:56)
at org.lucasr.twowayview.widget.ItemEntries.putItemEntry(ItemEntries.java:70)
at org.lucasr.twowayview.widget.BaseLayoutManager$LanedSavedState.(BaseLayoutManager.java:597)
at org.lucasr.twowayview.widget.BaseLayoutManager$LanedSavedState.(BaseLayoutManager.java:566)
at org.lucasr.twowayview.widget.BaseLayoutManager$LanedSavedState$1.createFromParcel(BaseLayoutManager.java:628)
at org.lucasr.twowayview.widget.BaseLayoutManager$LanedSavedState$1.createFromParcel(BaseLayoutManager.java:625)
at android.os.Parcel.readParcelable(Parcel.java:2062)
at android.support.v7.widget.RecyclerView$SavedState.(RecyclerView.java:7415)
at android.support.v7.widget.RecyclerView$SavedState$1.createFromParcel(RecyclerView.java:7439)
at android.support.v7.widget.RecyclerView$SavedState$1.createFromParcel(RecyclerView.java:7436)
at android.os.Parcel.readParcelable(Parcel.java:2062)
at android.os.Parcel.readValue(Parcel.java:1971)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2284)
at android.os.Parcel.readSparseArray(Parcel.java:1693)
at com.couchsurfing.mobile.util.PersistentScreen.(PersistentScreen.java:15)

@lucasr
Copy link
Owner

lucasr commented Oct 28, 2014

Thanks for the report. Same here, any steps to reproduce?

@nathanielwolf
Copy link
Author

Similar to #120 but with a different stack trace

@lucasr lucasr added this to the TwoWayView 1.0 milestone Oct 28, 2014
@nathanielwolf
Copy link
Author

Reproducible by minimizing the app with "Don't Keep Activities" enabled and then restoring. I cannot reproduce in the sample app.

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

No branches or pull requests

2 participants