relaycorp / relaynet-courier-android

Awala Courier for Android
https://play.google.com/store/apps/details?id=tech.relaycorp.courier
GNU General Public License v3.0
9 stars 3 forks source link

Strict mode doesn't work anymore #596

Closed gnarea closed 10 months ago

gnarea commented 10 months ago

As soon as I launch the app on Android 11 (Pixel 2), it crashes with:

2024-01-11 15:36:27.368 30387-30403 StrictMode              tech.relaycorp.courier               D  StrictMode policy violation: android.os.strictmode.LeakedClosableViolation: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. Callsite: close
                                                                                                        at android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:1929)
                                                                                                        at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:305)
                                                                                                        at sun.nio.fs.UnixSecureDirectoryStream.finalize(UnixSecureDirectoryStream.java:580)
                                                                                                        at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291)
                                                                                                        at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278)
                                                                                                        at java.lang.Daemons$Daemon.run(Daemons.java:139)
                                                                                                        at java.lang.Thread.run(Thread.java:923)
2024-01-11 15:36:27.369 30387-30403 System.err              tech.relaycorp.courier               W  StrictMode VmPolicy violation with POLICY_DEATH; shutting down.
2024-01-11 15:36:27.369 30387-30403 Process                 tech.relaycorp.courier               I  Sending signal. PID: 30387 SIG: 9
sdsantos commented 10 months ago

Can't reproduce the issue on the emulator. Does it work on other devices or does it crash as well?

gnarea commented 10 months ago

It works fine on Android 14 (Pixel 5).

sdsantos commented 10 months ago

Then we might need a custom implementation for strict mode in this project as well, or rule it out entirely to avoid these issues 😢

gnarea commented 10 months ago

I cleared the cache in Android Studio and tried again, and the app isn't crashing anymore. 🤷🏾‍♂️

I'll close this issue for now but if I'll keep an eye on it in case it happens again.