Hello,
I have a crash that happens on several devices:
Now, I'm quite certain to know why that happens. I have a list contaning about 25.000 items (list of types), and that's probably what causes the crash.
This list is built from an SQLite database, and is quite slow to generate this list.
The insight in Crashlytics tells me that the object is bigger than 1Mb and that causes the crash:
I imagine, from the insight, that the list (which is a process_global list) cannot be saved when the app goes on pause?
Do I understand the problem correctly? What would be the best way to dump and restore this list as fast as possible when the activity goes resume?
Thank you for your support.
Jmon
Edit: I don't think that the error comes from SQLite, because I retrieve the results with a limit of 1000 items at a time, with a timer.
Edit: Solved in post #7
I have a crash that happens on several devices:
Fatal Exception: java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 604668 bytes
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3776)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6123)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
Now, I'm quite certain to know why that happens. I have a list contaning about 25.000 items (list of types), and that's probably what causes the crash.
This list is built from an SQLite database, and is quite slow to generate this list.
The insight in Crashlytics tells me that the object is bigger than 1Mb and that causes the crash:
This exception occurs when too much data is transferred via Parcels concurrently. The underlying 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. For example, `intent.putExtra(key, new LargeParcelableObject())` where the size of the `LargeParcelableObject` exceeds 1Mb will return in this exception. This is often seen when transferring bitmaps between Activities, or when saving a large amount of state between Activity configuration changes. For more information, check out the resources below.
I imagine, from the insight, that the list (which is a process_global list) cannot be saved when the app goes on pause?
Do I understand the problem correctly? What would be the best way to dump and restore this list as fast as possible when the activity goes resume?
Thank you for your support.
Jmon
Edit: I don't think that the error comes from SQLite, because I retrieve the results with a limit of 1000 items at a time, with a timer.
Edit: Solved in post #7
Last edited: