zcash-android-wallet-sdk icon indicating copy to clipboard operation
zcash-android-wallet-sdk copied to clipboard

Strict mode violation: LeakedClosableViolation UnixSecureDirectoryStream

Open HonzaR opened this issue 1 year ago • 0 comments

Describe the issue

The SDK suffers from the Android leaked closeable filed here. Not sure what is the actual trigger on our side. It probably could be any of our stream-based operations with the File API.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Build and run the demo-app
  2. Select any available seed phrase
  3. Wait a few seconds while syncing blocks in progress
  4. StrictMode violation: LeakedClosableViolation will occur

Expected behaviour

No strict mode violation.

Actual behavior + errors

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:1991)
                                                    	at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:338)
                                                    	at sun.nio.fs.UnixSecureDirectoryStream.finalize(UnixSecureDirectoryStream.java:580)
                                                    	at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:319)
                                                    	at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:306)
                                                    	at java.lang.Daemons$Daemon.run(Daemons.java:140)
                                                    	at java.lang.Thread.run(Thread.java:1012)

HonzaR avatar May 15 '23 12:05 HonzaR