Android: TransactionTooLargeException but bundle size is just 368

237 Views Asked by At

Finally, I was able to replicate TransactionTooLargeException in my app

I use FragmentStatePagerAdapter to show few fragments, Each fragment hosts a RecycleView and on click of each Item another fragment is being added.

On pressing Home button in while recyclerView screen is on foreground app crashes

This is how saveState looks like in FragmentStatePagerAdapter

 @Override
            public Parcelable saveState() {
                return null;
            }

If I try to log bundle size it appears around 300 Kb but logcat shows 966576 Kb

Just to make sure this is only bundle that makes app crash If I make it null before super app won't crash

Wondering where my fragments are trying to save to OS Process

0

There are 0 best solutions below