Piwigo / Piwigo-Android

Piwigo Native Android App
GNU General Public License v3.0
141 stars 43 forks source link

RuntimeException Parcel: unable to marshal value #168

Closed ramack closed 4 years ago

ramack commented 4 years ago

Describe the bug and how to reproduce Reported by mail and Google play console

APP_VERSION_CODE=100
ANDROID_VERSION=9
STACK_TRACE=java.lang.RuntimeException: Parcel: unable to marshal value org.piwigo.io.model.ImageInfo@f27e9ca
    at android.os.Parcel.writeValue(Parcel.java:1664)
    at android.os.Parcel.writeList(Parcel.java:963)
    at android.os.Parcel.writeValue(Parcel.java:1611)
    at android.os.Parcel.writeArrayMapInternal(Parcel.java:875)
    at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
    at android.os.Bundle.writeToParcel(Bundle.java:1233)
    at android.os.Parcel.writeBundle(Parcel.java:915)
    at androidx.fragment.app.FragmentState.writeToParcel(FragmentState.java:167)
    at android.os.Parcel.writeTypedObject(Parcel.java:1516)
    at android.os.Parcel.writeTypedList(Parcel.java:1395)
    at android.os.Parcel.writeTypedList(Parcel.java:1380)
    at androidx.fragment.app.FragmentManagerState.writeToParcel(FragmentManagerState.java:51)
    at android.os.Parcel.writeParcelable(Parcel.java:1683)
    at android.os.Parcel.writeValue(Parcel.java:1589)
    at android.os.Parcel.writeArrayMapInternal(Parcel.java:875)
    at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
    at android.os.Bundle.writeToParcel(Bundle.java:1233)
    at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:3950)
    at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:144)
    at android.os.Handler.handleCallback(Handler.java:874)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:198)
    at android.app.ActivityThread.main(ActivityThread.java:6729)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

maybe we have to implement interface Serializable in org.piwigo.io.model.ImageInfo??

ramack commented 4 years ago

This seems to be a quite common issue...

ramack commented 4 years ago

I fear we have to reopen this one:

java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = org.piwigo.io.model.ImageInfo)
at android.os.Parcel.writeSerializable(Parcel.java:1714)
at android.os.Parcel.writeValue(Parcel.java:1662)
at android.os.Parcel.writeList(Parcel.java:963)
at android.os.Parcel.writeValue(Parcel.java:1611)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:875)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1583)
at android.os.Bundle.writeToParcel(Bundle.java:1233)
at android.os.Parcel.writeBundle(Parcel.java:915)
at androidx.fragment.app.FragmentState.writeToParcel(FragmentState.java:167)
at android.os.Parcel.writeTypedObject(Parcel.java:1516)
at android.os.Parcel.writeTypedList(Parcel.java:1395)
at android.os.Parcel.writeTypedList(Parcel.java:1380)
at androidx.fragment.app.FragmentManagerState.writeToParcel(FragmentManagerState.java:51)
at android.os.Parcel.writeParcelable(Parcel.java:1683)
at android.os.Parcel.writeValue(Parcel.java:1589)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:875)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1583)
at android.os.Bundle.writeToParcel(Bundle.java:1233)
at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:3986)
at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:144)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Caused by: java.io.NotSerializableException: org.piwigo.io.model.Derivatives
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1240)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1604)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1565)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1488)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1234)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:354)
at android.os.Parcel.writeSerializable(Parcel.java:1709)
ramack commented 4 years ago

Still not yet...

STACK_TRACE=java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = org.piwigo.io.model.ImageInfo)
    at android.os.Parcel.writeSerializable(Parcel.java:1730)
    at android.os.Parcel.writeValue(Parcel.java:1678)
    at android.os.Parcel.writeList(Parcel.java:979)
    at android.os.Parcel.writeValue(Parcel.java:1627)
    at android.os.Parcel.writeArrayMapInternal(Parcel.java:891)
    at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
    at android.os.Bundle.writeToParcel(Bundle.java:1233)
    at android.os.Parcel.writeBundle(Parcel.java:931)
    at androidx.fragment.app.FragmentState.writeToParcel(FragmentState.java:167)
    at android.os.Parcel.writeTypedObject(Parcel.java:1532)
    at android.os.Parcel.writeTypedList(Parcel.java:1411)
    at android.os.Parcel.writeTypedList(Parcel.java:1396)
    at androidx.fragment.app.FragmentManagerState.writeToParcel(FragmentManagerState.java:51)
    at android.os.Parcel.writeParcelable(Parcel.java:1699)
    at android.os.Parcel.writeValue(Parcel.java:1605)
    at android.os.Parcel.writeArrayMapInternal(Parcel.java:891)
    at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
    at android.os.Bundle.writeToParcel(Bundle.java:1233)
    at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:3855)
    at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:144)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7156)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
Caused by: java.io.NotSerializableException: org.piwigo.io.model.Derivatives
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1240)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1604)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1565)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1488)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1234)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:354)
    at android.os.Parcel.writeSerializable(Parcel.java:1725)
    ... 26 more

and thanks to a user report we now know how to trigger it: Press Home or "Overview" button (maybe also some smart button) in full screen mode.

Edit: mh, I am confused... while trying to investigate here further I cannot reproduce it anymore after 5d1ce647795532b08fa2f2d868bb6823aead3dfd so I guess that I was by accident on an old branch while testing. So for me this looks close in current HEAD of master.

@voriondev can you give it a quick try with the described procedure to reproduce?