mkulesh / microMathematics

microMathematics Plus - Extended visual calculator
GNU General Public License v3.0
561 stars 68 forks source link

App crashes when a document with huge embedded image is open and app settings are selected from app menu #136

Closed mkulesh closed 4 months ago

mkulesh commented 5 months ago

How to reproduce:

Analysis: https://developer.android.com/guide/components/activities/parcelables-and-bundles In Android 7.0 (API level 24) and higher, the system throws a TransactionTooLargeException as a runtime exception. In lower versions of Android, the system only shows a warning in logcat. Recommended state size: 50k or less.

After https://github.com/mkulesh/microMathematics/issues/68, the only one case where the instant state is collected is the transition to the app settings. However, the collected state is not used by the back transition to the main screen.

Proposed solution: do not collect the state if it is greater that 50KB.

mkulesh commented 4 months ago

Released in version 2.23.2.

mkulesh commented 4 months ago

Released in version 1.24.