[
https://issues.apache.org/jira/browse/OPENNLP-1545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bernard Bou reopened OPENNLP-1545:
----------------------------------
The following (version {*}2.5.3{*}) indicates the issue has been only
*partially* fixed because the ZipInputStream is not closed while the
InputStream it feeds on is correctly handled with a try-resource.
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. (Ask Gemini)
at
android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:1994)
at
dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:336)
at java.util.zip.Inflater.finalize(Inflater.java:407)
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
'end' not called
at
dalvik.system.CloseGuard.openWithCallSite(CloseGuard.java:288)
at dalvik.system.CloseGuard.open(CloseGuard.java:257)
at java.util.zip.Inflater.<init>(Inflater.java:122)
at
java.util.zip.ZipInputStream.<init>(ZipInputStream.java:102)
at
java.util.zip.ZipInputStream.<init>(ZipInputStream.java:84)
at
opennlp.tools.util.model.BaseModel.loadModel(BaseModel.java:241)
at
opennlp.tools.util.model.BaseModel.<init>(BaseModel.java:173)
at
opennlp.tools.sentdetect.SentenceModel.<init>(SentenceModel.java:69)
at
org.grammarscope.SentenceDetectorFactory.build(SentenceDetectorFactory.kt:24)
...
> ZipStream is not closed
> -----------------------
>
> Key: OPENNLP-1545
> URL: https://issues.apache.org/jira/browse/OPENNLP-1545
> Project: OpenNLP
> Issue Type: Bug
> Components: Sentence Detector
> Affects Versions: 2.3.2
> Reporter: Bernard Bou
> Assignee: Martin Wiesner
> Priority: Minor
> Fix For: 2.3.3
>
> Attachments: opennlp_bug.txt
>
>
> ZipStream is not closed (see stack trace attached) as detected by StrictMode
> as a policy violation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)