jocmp / capyreader

A smallish Android RSS reader
http://capyreader.com/
MIT License
136 stars 4 forks source link

App keeps crashing in background #179

Closed HarriBuh closed 3 months ago

HarriBuh commented 3 months ago
[Device Brand]: google
[Device Model]: Pixel 7
[Android Version]: 14
[Android API Level]: 34
[Process ID]: 2012
[CPU ABI]: arm64-v8a
[Package Name]: com.capyreader.app
[Version Name]: 2024.07.1009
[Version Code]: 1009
[Target SDK]: 34
[Min SDK]: 30
[Error Type]: JVM
[Crash Time]: 2024-07-16T16:26:43.915
[Stack Trace]:
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 2248124 bytes
Bundle stats:
  androidx.lifecycle.BundlableSavedStateRegistry.key [size=2247256]
    m:-1 [size=2246652]
      -2pkxns [size=2245340]
      lpeo4b [size=1256]
PersistableBundle stats:
  [null]
    at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:146)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8592)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
Caused by: android.os.TransactionTooLargeException: data parcel size 2248124 bytes
    at android.os.BinderProxy.transactNative(Native Method)
    at android.os.BinderProxy.transact(BinderProxy.java:586)
    at android.app.IActivityClientController$Stub$Proxy.activityStopped(IActivityClientController.java:1527)
    at android.app.ActivityClient.activityStopped(ActivityClient.java:101)
    at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:135)
    ... 8 more
jocmp commented 3 months ago

Just to get some more details, have you used the "mark as read" or background refresh features?

This may also be related to feed size. How many feeds do you think you have? An OPML file would be helpful but not necessary.

HarriBuh commented 3 months ago

Just to get some more details, have you used the "mark as read" or background refresh features?

This may also be related to feed size. How many feeds do you think you have? An OPML file would be helpful but not necessary.

I've used the "mark below as read" option.

And I think one reason for the crash could indeed be the amount of synched feeds at once. It were about 300+ feeds, as far as I remember. This leads me to another question/ request: Could you implement an option to limit synched feeds by time (e.g. days)? I think your app synched as much feeds as it was able to get in the first start, which definitely is way too much.

I'll try to upload the opml file now. feed-subscriptions-2024-07-16-15-58-04.zip

jocmp commented 3 months ago

Thanks for this. I've spent the past few hours digging into the the TransactionTooLargeException. I was able to reproduce by

  1. Loading an article with full content
  2. Clicking a link which sends you to either an in-app browser or your web browser
  3. Hitting "back"

When you press back, the TransactionTooLargeException happens. The fix is to rework some of the article data. I have a potential fix (https://github.com/jocmp/capyreader/pull/183) that I'll test again tomorrow (local time).

jocmp commented 3 months ago

I have a fix out for this in the latest release, 1010. Please reopen this ticket if you continue to see issues.

Per your other question, I've opened another ticket to investigate ways to cut down on feed refreshes with https://github.com/jocmp/capyreader/issues/185. Thanks again for the thorough bug report!