You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Scrounger the app crashes when it goes to background by pressing home button.
seems to be an issue due to serialization
Here is the log:
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.scrounger.countrycurrencypicker.sample, PID: 9449 java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.scrounger.countrycurrencypicker.library.Buttons.CountryCurrencyButton) at android.os.Parcel.writeSerializable(Parcel.java:1761) at android.os.Parcel.writeValue(Parcel.java:1709) at android.os.Parcel.writeArrayMapInternal(Parcel.java:777) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1506) at android.os.Bundle.writeToParcel(Bundle.java:1181) at android.os.Parcel.writeBundle(Parcel.java:817) at android.support.v4.app.FragmentState.writeToParcel(Fragment.java:148) at android.os.Parcel.writeTypedArray(Parcel.java:1401) at android.support.v4.app.FragmentManagerState.writeToParcel(FragmentManager.java:571) at android.os.Parcel.writeParcelable(Parcel.java:1730) at android.os.Parcel.writeValue(Parcel.java:1636) at android.os.Parcel.writeArrayMapInternal(Parcel.java:777) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1506) at android.os.Bundle.writeToParcel(Bundle.java:1181) at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:4617) at android.app.ActivityThread$StopInfo.run(ActivityThread.java:4012) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:172) at android.app.ActivityThread.main(ActivityThread.java:6637) 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: java.io.NotSerializableException: com.scrounger.countrycurrencypicker.library.Country at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1233) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1597) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1558) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1481) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1227) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) at android.os.Parcel.writeSerializable(Parcel.java:1756) at android.os.Parcel.writeValue(Parcel.java:1709) at android.os.Parcel.writeArrayMapInternal(Parcel.java:777) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1506) at android.os.Bundle.writeToParcel(Bundle.java:1181) at android.os.Parcel.writeBundle(Parcel.java:817) at android.support.v4.app.FragmentState.writeToParcel(Fragment.java:148) at android.os.Parcel.writeTypedArray(Parcel.java:1401) at android.support.v4.app.FragmentManagerState.writeToParcel(FragmentManager.java:571) at android.os.Parcel.writeParcelable(Parcel.java:1730) at android.os.Parcel.writeValue(Parcel.java:1636) at android.os.Parcel.writeArrayMapInternal(Parcel.java:777) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1506) at android.os.Bundle.writeToParcel(Bundle.java:1181) at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:4617) at android.app.ActivityThread$StopInfo.run(ActivityThread.java:4012) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:172) at android.app.ActivityThread.main(ActivityThread.java:6637) 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)
The text was updated successfully, but these errors were encountered:
For those who face this issue, the cause is serializing listener. so when state loss occurs serialization recreates the listener object ( using the values in the object not the reference ) so the new listener is just a copy of the listener object. the solution is to remove the serialization from listener and create the listeners directly and calling them through the picker object.
@Scrounger the app crashes when it goes to background by pressing home button.
seems to be an issue due to serialization
Here is the log:
The text was updated successfully, but these errors were encountered: