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

Potential resource leakage when reading from disk #160

Description

@tuancoltech

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)

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions