Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Logs For Passed File Sizes #13151

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Jun 19, 2024

  • Tests written, or not not needed

What is the Problem?

App sometimes throws TransactionTooLargeException. Back trace not helping too much.

e.g. Backtrace

Exception java.lang.RuntimeException:
  at android.app.servertransaction.PendingTransactionActions$StopInfo.run (PendingTransactionActions.java:146)
  at android.os.Handler.handleCallback (Handler.java:958)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:230)
  at android.os.Looper.loop (Looper.java:319)
  at android.app.ActivityThread.main (ActivityThread.java:8893)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:608)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)
Caused by android.os.TransactionTooLargeException: data parcel size 594696 bytes
  at android.os.BinderProxy.transactNative
  at android.os.BinderProxy.transact (BinderProxy.java:662)
  at android.app.IActivityClientController$Stub$Proxy.activityStopped (IActivityClientController.java:1507)
  at android.app.ActivityClient.activityStopped (ActivityClient.java:100)
  at android.app.servertransaction.PendingTransactionActions$StopInfo.run (PendingTransactionActions.java:135)

The TransactionTooLargeException can be thrown due to the following reasons:

  1. Including large objects in Bundles or Intents.
  2. Using onSaveInstanceState to save the UI state with large data.

What this PR does?

Add logs to print file size so that we can check passed file sizes.

Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/13151.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

Copy link

Codacy

Lint

TypemasterPR
Warnings6868
Errors33

SpotBugs

CategoryBaseNew
Bad practice6464
Correctness6868
Dodgy code333333
Experimental11
Internationalization77
Multithreaded correctness66
Performance5755
Security1818
Total554552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant