After using Fenix a bit Fenix crashes when switching to the Android home screen. I don't have exact STR but it crashes very reliable after browsing on a few tabs, clicking links and pressing the Android home screen button.
2019-05-11 19:56:51.998 9837-9837/org.mozilla.fenix.debug E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.mozilla.fenix.debug, PID: 9837
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 14203748 bytes
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:4255)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:180)
at android.app.ActivityThread.main(ActivityThread.java:6950)
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:835)
Caused by: android.os.TransactionTooLargeException: data parcel size 14203748 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:756)
at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:4660)
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:4247)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:180)
at android.app.ActivityThread.main(ActivityThread.java:6950)
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:835)
@colintheshots It's a regression of your PR #2426.
Yes, the PR adds the current state of tabs and sessions to the savedInstanceState. If you too many tabs or sessions to store, this can exceed the system limit of 1 MB for this kind of storage. Maybe we should store less state here and only restore tabs and sessions from the SessionManager to avoid this situation.
Yes, please do not save/restore any of the state that is handled by AC.
If you too many tabs or sessions to store
I wouldn't say "many tabs". It already crashes with only one tab. ;-)
I can hardly reproduce this on the 5/11 build so I can't actually verify the fix without reliably reproducing it. I'll leave this open and see if we still encounter any similar crashes.
If you need a verification: For me it was easy to trigger the crash and it no longer happens.
Didn't see any crashes in the last 2 days similar to this. Can consider this as fixed. Thanks @cadeyrn !