Anthonyy232 / Paperize

Paperize is a dynamic wallpaper changer application built for Android using Kotlin, Jetpack Compose, and Material 3
https://anthonyy232.github.io/Paperize/
GNU General Public License v3.0
299 stars 13 forks source link

Crash on selecting the whole internal storage #54

Closed shuvashish76 closed 1 month ago

shuvashish76 commented 1 month ago

Steps to reproduce:

  1. Create a new album > Add folder > select the whole internal storage
  2. It shows path 0, 1950 wallpapers
  3. Click on it to view the wallpapers App crashes

Logs:

PrivateBin link, logs are recorded with LogFox

Device details:

Android : 9 Model : Lenovo Tab4 8 plus (TB-8704X) App version : 1.6.3 (28)

Anthonyy232 commented 1 month ago

If it's not too much trouble to ask, are you able to record this? I'm not sure where the problem is. I'm not able to get much out of the log and also I was not able to reproduce the issue on an SDK 28 virtual tablet emulator. I suspect it may be due to some weird extension files are being picked up from the various subfolders. It could also be a vendor-specific problem.

This behavior is actually blocked on the later Android versions so that's why I'm not able to test it on my actual devices.

If there are potential privacy issues and you don't want to post it here, you can email me at anthonyyla.dev@gmail.com

For self purposes: Check possibility of navigating on empty string, empty list

shuvashish76 commented 1 month ago

If it's not too much trouble to ask, are you able to record this?

Screen recording?

Here

https://github.com/user-attachments/assets/e7000d62-9f18-4905-a8ab-1d7e95ea9456

Anthonyy232 commented 1 month ago

Can I ask you to try this APK and see if the same crash occurs? Same deal -- signed APK in the zip file. Thanks!

app-release.zip

shuvashish76 commented 1 month ago

Thanks no such crashes & I can view all the images. But it crashed few times (exactly not sure how to reproduce this) while testing

Crash Logs:

FATAL EXCEPTION: main
Process: com.anthonyla.paperize, PID: 9766
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1826272 bytes
    at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:160)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6718)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: android.os.TransactionTooLargeException: data parcel size 1826272 bytes
    at android.os.BinderProxy.transactNative(Native Method)
    at android.os.BinderProxy.transact(Binder.java:1129)
    at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:4029)
    at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:144)
    ... 7 more
Anthonyy232 commented 1 month ago

Have you encountered this previously or just with the APK that I sent?

To fix the previous issue, I reverted the one of the screen navigations back to GSON converting the list rather than type-safe navigating on a list. This is because the type-safe navigation still seems to have a bug if there is a large amount of items in a list which causes some instability. The GSON approach works better, albeit much slower. I imagine this crash is because there is just too much data being sent through the string (all 1950 wallpapers URIs). Realistically, I don't think many people would have 1950 wallpapers so it's mostly a non-issue if I'm correct, but I'll see if I can fix this somehow, maybe breaking the string being sent up into smaller pieces may help, not sure.

shuvashish76 commented 1 month ago

Have you encountered this previously or just with the APK that I sent?

I'm not sure about it as it's an intermittent crash. Never experienced in official release maybe I've not tested it properly IDK. 🤷🏽

Realistically, I don't think many people would have 1950 wallpapers so it's mostly a non-issue if I'm correct

For me those are mostly from

Yeah, they're mostly unimportant images.

Anthonyy232 commented 1 month ago

I believe the issue is fixed in commit https://github.com/Anthonyy232/Paperize/commit/c15bea8b3777d70a6bcd24e84b047365080ec869

Would you care to test it? app-release.zip

Thanks!

shuvashish76 commented 1 month ago

Thanks no crashes so far. I'll reopen if I experience in official stable releases.