andremion / CounterFab

A FloatingActionButton subclass that shows a counter badge on right top corner

Home Page:https://play.google.com/store/apps/details?id=com.andremion.counterfab.sample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BadParcelableException in 1.1.0

alexeyvasilyev opened this issue · comments

CounterFab produces BadParcelableException.

Caused by: android.os.BadParcelableException: 
  at android.os.Parcel.readParcelableCreator (Parcel.java:2154)
  at android.os.Parcel.readParcelable (Parcel.java:2104)
  at android.view.AbsSavedState.<init> (AbsSavedState.java:57)
  at android.view.View$BaseSavedState.<init> (View.java:19694)
  at com.andremion.counterfab.CounterFab$SavedState.<init> (SourceFile:270)
  at com.andremion.counterfab.CounterFab$SavedState.<init> (SourceFile:255)
  at com.andremion.counterfab.CounterFab$SavedState$1.a (SourceFile:290)
  at com.andremion.counterfab.CounterFab$SavedState$1.createFromParcel (SourceFile:288)
commented

Same issue here. Happened when updating to API 28.
There is also a strange bug, that makes the image of the FAB (in general EVERY Fab, even the default ones) disappear when changing it. Then its not possible to show any image/icon in the FAB anymore. Also only on API 28.

I have targetSdkVersion=27, compileSdkVersion=28
Support library 28.0.0
The issue happens on both 1.1.0 and 1.0.3.

commented

Which support library version do you use? 28.0.0 or 27.1.3?
Try to change the icon of the FAB with setImageResource (or similar methods), does it work?

When do you reproduce this? Rotating the screen?
In which device? Are able to reproduce this in the emulator?

I just experienced this exception from a user that had the app in the background and after a while returned to it and got the crash with v1.1.0

Caused by android.os.BadParcelableException
ClassNotFoundException when unmarshalling: android.support.design.stateful.ExtendableSavedState

  android.os.Parcel.readParcelableCreator (Parcel.java:2863)
  android.os.Parcel.readParcelable (Parcel.java:2789)
  android.view.AbsSavedState. (AbsSavedState.java:67)
  android.view.View$BaseSavedState. (View.java:26447)
  android.view.View$BaseSavedState. (View.java:26436)
  com.andremion.counterfab.CounterFab$SavedState. (CounterFab.java:270)
  com.andremion.counterfab.CounterFab$SavedState. (CounterFab.java:255)
  com.andremion.counterfab.CounterFab$SavedState$1.createFromParcel (CounterFab.java:290)
  com.andremion.counterfab.CounterFab$SavedState$1.createFromParcel (CounterFab.java:288)

Thank you guys for the info.
I just publish a new version 1.1.1 with a hotfix.
Please check it out.
😉

We experienced the crash again in production using library version 1.2.0

Fatal Exception: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.google.android.material.stateful.ExtendableSavedState
       at android.os.Parcel.readParcelableCreator(Parcel.java:2432)
       at android.os.Parcel.readParcelable(Parcel.java:2358)
       at android.view.AbsSavedState.<init>(AbsSavedState.java:57)
       at android.view.View$BaseSavedState.<init>(View.java:21468)
       at com.andremion.counterfab.CounterFab$SavedState.<init>(CounterFab.java:306)
       at com.andremion.counterfab.CounterFab$SavedState.<init>(CounterFab.java:291)
       at com.andremion.counterfab.CounterFab$SavedState$1.createFromParcel(CounterFab.java:343)
       at com.andremion.counterfab.CounterFab$SavedState$1.createFromParcel(CounterFab.java:336)
       at android.os.Parcel.readParcelable(Parcel.java:2365)
       at android.os.Parcel.readValue(Parcel.java:2264)
       at android.os.Parcel.readSparseArrayInternal(Parcel.java:2675)
       at android.os.Parcel.readSparseArray(Parcel.java:1967)
       at android.os.Parcel.readValue(Parcel.java:2321)
       at android.os.Parcel.readArrayMapInternal(Parcel.java:2614)
       at android.os.BaseBundle.unparcel(BaseBundle.java:221)
       at android.os.Bundle.getSparseParcelableArray(Bundle.java:856)
       at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1361)
       at androidx.fragment.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2646)
       at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2416)
       at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2372)
       at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2273)
       at androidx.fragment.app.FragmentManagerImpl$1.run(FragmentManager.java:733)
       at android.os.Handler.handleCallback(Handler.java:743)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:171)
       at android.app.ActivityThread.main(ActivityThread.java:5417)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Can this bug be repoened or do I need to create a new one?

I think you can mention that in #28
Are you able to reproduce it?