Clicking the hamburger icon at the top causes the app to crash
This happens on Nexus 5X with Android 7.1. Please tell me how can I help if I have to debug something!
Here is the crash
EDIT: Wow, you guys pass the whole book as a serializable to the next screen everywhere, why not just work with the filePath and read it everywhere you need it? I will surely check this out.
01-26 23:06:10.507 26802-26802/info.chitanka.android E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 1856584)
01-26 23:06:10.507 26802-26802/info.chitanka.android D/AndroidRuntime: Shutting down VM
01-26 23:06:10.511 26802-26802/info.chitanka.android E/AndroidRuntime: FATAL EXCEPTION: main
Process: info.chitanka.android, PID: 26802
java.lang.RuntimeException: Failure from system
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1525)
at android.app.Activity.startActivityForResult(Activity.java:4225)
at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:50)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:79)
at android.app.Activity.startActivityForResult(Activity.java:4183)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:859)
at com.folioreader.activity.FolioActivity$2.onClick(FolioActivity.java:150)
at android.view.View.performClick(View.java:5637)
at android.view.View$PerformClick.run(View.java:22429)
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 1856584 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:615)
at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:3100)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1518)
at android.app.Activity.startActivityForResult(Activity.java:4225)
at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:50)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:79)
at android.app.Activity.startActivityForResult(Activity.java:4183)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:859)
at com.folioreader.activity.FolioActivity$2.onClick(FolioActivity.java:150)
at android.view.View.performClick(View.java:5637)
at android.view.View$PerformClick.run(View.java:22429)
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)
Same here. Did you find a solution? Here, it came up with a "TransactionTooLargeException: data parcel size 939344 bytes", which is a pretty low usage. There's something nasty going on here.
I will review the lib and make PR probably. It has a good look and feel and some good options so it is worth trying. The problem is that they pass the whole Book object to every screen as a serializable which is huge. Also the lib crashes when rotating the phone ...
https://github.com/n0m0r3pa1n/FolioReader-Android
- The problem was that when calling another activity the previous one wanted to save it's state where the Book serialized variable was so the state was too large - over 3 mb with maximum allowed 1.
- I have fixed the TransactionTooLargeException by replacing all usages of the Book serializable with the needed fields like book title & path to it. So every fragment that needs to read a book does it by reading it from the file path.
- I also fixed an exception when trying to open a chapter. There was a comparison by the title of the chapter which was null. I made it to use the id.
I will not make a PR because the rotation is still blowing. Still checking that up.
Thanks.. Yes, book size is getting too large.. Currently we are using EpubReader().readEpub() which reads all the resources. But I think, if we use readEpubLazy() which will only have href. This way we can avoid problem of TransactionTooLarge.. I'm working on it, but since i also have to manage other work, I'm bit slow.. But, it will be fixed soon..
https://github.com/FolioReader/FolioReader-Android/pull/63 PR is waiting
hello, any update on this? 0.2.5 still have this issue
Same error in 0.5.4 version