moagrius / TileView

TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.
MIT License
1.46k stars 335 forks source link

`android.os.BadParcelableException` regarding `com.moagrius.widget.ScrollView$SavedState.<init>` #537

Open danramteke opened 4 years ago

danramteke commented 4 years ago

Hello my app is getting this crash, on different kinds of Android devices. I don't see any of my code in the stack trace, so I'm not sure how to fix it. Any ideas?

I think it's trying to restore the position of the TileView. I don't mind if it ends up at a different default position, as long as the app doesn't crash.

Thanks

PS if you would like to try the app on your own device, you can download it here: https://play.google.com/store/apps/details?id=nyc.underway.underway

java.lang.RuntimeException: 
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2822)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2897)
  at android.app.ActivityThread.-wrap11 (Unknown Source)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1598)
  at android.os.Handler.dispatchMessage (Handler.java:105)
  at android.os.Looper.loop (Looper.java:251)
  at android.app.ActivityThread.main (ActivityThread.java:6572)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:767)
Caused by: android.os.BadParcelableException: 
  at android.os.Parcel.readParcelableCreator (Parcel.java:2888)
  at android.os.Parcel.readParcelable (Parcel.java:2814)
  at android.view.AbsSavedState.<init> (AbsSavedState.java:67)
  at android.view.View$BaseSavedState.<init> (View.java:25047)
  at android.view.View$BaseSavedState.<init> (View.java:25036)
  at com.moagrius.widget.ScrollView$SavedState.<init> (ScrollView.java:991)
  at com.moagrius.widget.ScalingScrollView$ScrollScaleState.<init> (ScalingScrollView.java:330)
  at com.moagrius.widget.ScalingScrollView$ScrollScaleState$1.createFromParcel (ScalingScrollView.java:347)
  at com.moagrius.widget.ScalingScrollView$ScrollScaleState$1.createFromParcel (ScalingScrollView.java:345)
  at android.os.Parcel.readParcelable (Parcel.java:2823)
  at android.os.Parcel.readValue (Parcel.java:2717)
  at android.os.Parcel.readSparseArrayInternal (Parcel.java:3165)
  at android.os.Parcel.readSparseArray (Parcel.java:2379)
  at android.os.Parcel.readValue (Parcel.java:2774)
  at android.os.Parcel.readArrayMapInternal (Parcel.java:3084)
  at android.os.BaseBundle.unparcel (BaseBundle.java:257)
  at android.os.Bundle.getSparseParcelableArray (Bundle.java:958)
  at com.android.internal.policy.PhoneWindow.restoreHierarchyState (PhoneWindow.java:2128)
  at android.app.Activity.onRestoreInstanceState (Activity.java:1101)
  at android.app.Activity.performRestoreInstanceState (Activity.java:1056)
  at android.app.Instrumentation.callActivityOnRestoreInstanceState (Instrumentation.java:1260)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2795)
moagrius commented 4 years ago

Thanks for pointing this out. I'll take a look when I have some time.