Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource leak detected enabling Strict Mode on Android platform #1729

Closed
mstarita opened this issue Aug 1, 2017 · 1 comment
Closed

Resource leak detected enabling Strict Mode on Android platform #1729

mstarita opened this issue Aug 1, 2017 · 1 comment

Comments

@mstarita
Copy link
Contributor

@mstarita mstarita commented Aug 1, 2017

What version of Flyway are you using?

3.2.1, 4.2.0

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)

Java API in Android platform

What database are you using (type & version)?

Embedded SQLite

What operating system are you using?

Android v4.1.1

What did you do?

Execute a migration via API call with Android Strict Mode enabled.

What did you expect to see?

No resource leak

What did you see instead?

This stack trace from v3.2.1:
E/StrictMode( 1000): java.lang.Throwable: Explicit termination method 'close' not called
E/StrictMode( 1000): at dalvik.system.CloseGuard.open(CloseGuard.java:184)
E/StrictMode( 1000): at dalvik.system.DexFile.(DexFile.java:80)
E/StrictMode( 1000): at org.flywaydb.core.internal.util.scanner.android.AndroidScanner.scanForClasses(AndroidScanner.java:73)
E/StrictMode( 1000): at org.flywaydb.core.internal.util.scanner.Scanner.scanForClasses(Scanner.java:72)
E/StrictMode( 1000): at org.flywaydb.core.internal.resolver.jdbc.JdbcMigrationResolver.resolveMigrations(JdbcMigrationResolver.java:73)
E/StrictMode( 1000): at org.flywaydb.core.internal.resolver.jdbc.JdbcMigrationResolver.resolveMigrations(JdbcMigrationResolver.java:43)
E/StrictMode( 1000): at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.collectMigrations(CompositeMigrationResolver.java:126)
E/StrictMode( 1000): at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.doFindAvailableMigrations(CompositeMigrationResolver.java:108)
E/StrictMode( 1000): at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.resolveMigrations(CompositeMigrationResolver.java:94)
E/StrictMode( 1000): at org.flywaydb.core.internal.resolver.CompositeMigrationResolver.resolveMigrations(CompositeMigrationResolver.java:42)
E/StrictMode( 1000): at org.flywaydb.core.internal.info.MigrationInfoServiceImpl.refresh(MigrationInfoServiceImpl.java:96)
E/StrictMode( 1000): at org.flywaydb.core.internal.command.DbValidate$2.doInTransaction(DbValidate.java:136)
E/StrictMode( 1000): at org.flywaydb.core.internal.command.DbValidate$2.doInTransaction(DbValidate.java:131)
E/StrictMode( 1000): at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
E/StrictMode( 1000): at org.flywaydb.core.internal.command.DbValidate.validate(DbValidate.java:131)
E/StrictMode( 1000): at org.flywaydb.core.Flyway.doValidate(Flyway.java:1102)
E/StrictMode( 1000): at org.flywaydb.core.Flyway.access$300(Flyway.java:62)
E/StrictMode( 1000): at org.flywaydb.core.Flyway$1.execute(Flyway.java:1012)
E/StrictMode( 1000): at org.flywaydb.core.Flyway$1.execute(Flyway.java:1006)
E/StrictMode( 1000): at org.flywaydb.core.Flyway.execute(Flyway.java:1418)
E/StrictMode( 1000): at org.flywaydb.core.Flyway.migrate(Flyway.java:1006)

@axelfontaine axelfontaine added this to the Flyway 5.0.0 milestone Aug 1, 2017
axelfontaine added a commit that referenced this issue Nov 26, 2017
Fix for issue #1729: Resource leak using Strict Mode on Android platform
axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Nov 26, 2017
axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Nov 26, 2017
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Nov 26, 2017

Thanks for investigating, reporting and fixing! Merged.

dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
Fix for issue flyway#1729: Resource leak using Strict Mode on Android platform
dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.