Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Potential resource leakage when reading from disk #160

Open
tuancoltech opened this issue Aug 8, 2024 · 0 comments
Open

Potential resource leakage when reading from disk #160

tuancoltech opened this issue Aug 8, 2024 · 0 comments
Assignees

Comments

@tuancoltech
Copy link
Collaborator

Problem

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.
                                                                                                    	at android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:1994)
                                                                                                    	at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:336)
                                                                                                    	at sun.nio.fs.UnixSecureDirectoryStream.finalize(UnixSecureDirectoryStream.java:580)
                                                                                                    	at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:339)
                                                                                                    	at java.lang.Daemons$FinalizerDaemon.processReference(Daemons.java:324)
                                                                                                    	at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:300)
                                                                                                    	at java.lang.Daemons$Daemon.run(Daemons.java:145)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
                                                                                                    Caused by: java.lang.Throwable: Explicit termination method 'close' not called
                                                                                                    	at dalvik.system.CloseGuard.openWithCallSite(CloseGuard.java:288)
                                                                                                    	at dalvik.system.CloseGuard.open(CloseGuard.java:257)
                                                                                                    	at sun.nio.fs.UnixSecureDirectoryStream.<init>(UnixSecureDirectoryStream.java:67)
                                                                                                    	at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:449)
                                                                                                    	at java.nio.file.Files.newDirectoryStream(Files.java:457)
                                                                                                    	at java.nio.file.Files.list(Files.java:3451)
                                                                                                    	at dev.arkbuilders.arklib.data.storage.FolderStorage.readFromDisk(FolderStorage.kt:81)
@tuancoltech tuancoltech self-assigned this Aug 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant