question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crashes with TransactionTooLargeException when onRestoreInstanceState called

See original GitHub issue

Problem

After putting large bitmap to the Parcelable TransactionTooLargeException will be thrown. You are putting bitmap in onRestoreInstanceState method: bitmap = (Bitmap)bundle.getParcelable("SET_BITMAP"); Google doc about TransactionTooLargeException: The Binder transaction buffer has a limited fixed size, currently 1Mb, which is shared by all transactions in progress for the process. Consequently this exception can be thrown when there are many transactions in progress even when most of the individual transactions are of moderate size.

Steps to reproduce

  • Turn on “Don’t keep activities” option in developer options
  • Open Editor Activity with large photo
  • Press home button to minimize application
  • Open it from recents
  • TransactionTooLargeException will be thrown

Possible solution:

  • Never put bitmap to the Parcelable and load it again when the view restores.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ankitbatra11commented, Apr 28, 2017

@ArthurHub Thanks. Verified the fix.

0reactions
ArthurHubcommented, Apr 28, 2017

fixed in 2.4.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

What to do on TransactionTooLargeException - Stack Overflow
I encountered this issue, and I found that when there huge amount of data getting exchanged between a service and an application,(This involves...
Read more >
TransactionTooLargeException on pausing app [37103380]
Trying to override the onSaveInstanceState in the fragment, and do nothing for OS N, doesn't get called before the crash.
Read more >
Demystify TransactionTooLargeException | by Rex Huang
Recently, ShopBack Android app had encountered a stability issue caused by TransactionTooLargeException which led app crash-free rate drop significantly.
Read more >
Avoiding TransactionTooLargeException on Android Nougat ...
Anything over that limit is causing your app to crash with the ... system instead of providing it to the operation system, called...
Read more >
Instrumentation | Android Developers
Perform calling of an activity's Activity#onRestoreInstanceState method. ... for later versions, it will return null if UiAutomation fails to connect.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found