thunderbird / thunderbird/thunderbird-android
StrictMode Closable not closed related to ImapStore
Open
Nobody has claimed this yet.
type: enhancement
- Dominant language
- Kotlin
- Stars
- 14k
- Forks
- 2.8k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 57
Description
I'm seeing this Exception a lot in my logcat on CM12.1 with some connectivity Issues.
Seeing that #211 was handled, maybe it is of interest.
Thanks for maintaining k9!
10-23 16:25:02.246 23082 23104 E StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
10-23 16:25:02.246 23082 23104 E StrictMode: java.lang.Throwable: Explicit termination method 'end' not called
10-23 16:25:02.246 23082 23104 E StrictMode: at dalvik.system.CloseGuard.open(CloseGuard.java:184)
10-23 16:25:02.246 23082 23104 E StrictMode: at java.util.zip.Inflater.<init>(Inflater.java:82)
10-23 16:25:02.246 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapConnection.open(ImapStore.java:2573)
10-23 16:25:02.246 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapConnection.sendCommand(ImapStore.java:2872)
10-23 16:25:02.246 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapConnection.executeSimpleCommand(ImapStore.java:2921)
10-23 16:25:02.246 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapConnection.executeSimpleCommand(ImapStore.java:2902)
10-23 16:25:02.246 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapFolder.executeSimpleCommand(ImapStore.java:858)
10-23 16:25:02.246 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapFolder.internalOpen(ImapStore.java:904)
10-23 16:25:02.246 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapFolder.open(ImapStore.java:867)
10-23 16:25:02.246 23082 23104 E StrictMode: at com.fsck.k9.controller.MessagingController.synchronizeMailboxSynchronous(MessagingController.java:1041)
10-23 16:25:02.246 23082 23104 E StrictMode: at com.fsck.k9.controller.MessagingController.access$400(MessagingController.java:111)
10-23 16:25:02.246 23082 23104 E StrictMode: at com.fsck.k9.controller.MessagingController$35.run(MessagingController.java:4506)
10-23 16:25:02.246 23082 23104 E StrictMode: at com.fsck.k9.controller.MessagingController.run(MessagingController.java:435)
10-23 16:25:02.246 23082 23104 E StrictMode: at java.lang.Thread.run(Thread.java:818)
10-23 16:25:02.249 23082 23104 E StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
10-23 16:25:02.249 23082 23104 E StrictMode: java.lang.Throwable: Explicit termination method 'end' not called
10-23 16:25:02.249 23082 23104 E StrictMode: at dalvik.system.CloseGuard.open(CloseGuard.java:184)
10-23 16:25:02.249 23082 23104 E StrictMode: at java.util.zip.Inflater.<init>(Inflater.java:82)
10-23 16:25:02.249 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapConnection.open(ImapStore.java:2573)
10-23 16:25:02.249 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapFolder.getPrefixedName(ImapStore.java:842)
10-23 16:25:02.249 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapFolderPusher.getPrefixedName(ImapStore.java:2989)
10-23 16:25:02.249 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapFolder.internalOpen(ImapStore.java:902)
10-23 16:25:02.249 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapFolderPusher.internalOpen(ImapStore.java:2989)
10-23 16:25:02.249 23082 23104 E StrictMode: at com.fsck.k9.mail.store.ImapStore$ImapFolderPusher$1.run(ImapStore.java:3068)
10-23 16:25:02.249 23082 23104 E StrictMode: at java.lang.Thread.run(Thread.java:818)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing ImapStore.java at ImapConnection.open(), sendCommand(), and ImapFolder.internalOpen(), using the reported StrictMode stack traces as the reproduction path. Investigate the connectivity-failure paths and verify that the Inflater-related resource is released so the reported StrictMode leak no longer appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100