I am working on a App in Kotlin/rxJava and I have been struggling with an error for a while now.
Every time I exit the application I get a popup where it says: “Unfortunately, AppName has stopped.”.
I get this error in the console:
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 896824 bytes**enter code here**
When I use a phone with API 23 or lower the error does not occur, but with 24 and 25 I get the error and the app “crashes” AFTER I have exited the app. And it is getting really annoying, both for me as a developer and of course for the users.
The error happens whenever I try to exit the app in any fashion. If I click on a link that takes me to the browser, add/send a contact person from my App to the contact list on the phone or share via Gmail, Google+, bluetooth, etc. the error occurs. So what happens is that on all of these issues I have to exit the app(press the homebutton) or open another application from the app (contacts, gmail, etc.) and the app crashes.
I can also mention that when I add a person from my app to the phones contact list all the information gets sent, and I am able to add the person.
Does anyone have any clue why this happonds? Feel free to ask me for more details if that is necessary, I have had this bug for a while now and it is very irritating.
Entire error:
04-12 08:46:18.128 23287-23287/com.****.***** E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.******.*******, PID: 23287
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 896824 bytes
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3781)
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:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: android.os.TransactionTooLargeException: data parcel size 896824 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:615)
at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:3636)
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3773)
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:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)