google / android-fhir

The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first healthcare applications using the HL7® FHIR® standard on Android.
https://google.github.io/android-fhir/
Apache License 2.0
497 stars 296 forks source link

java.lang.Throwable: Explicit termination method 'close' not called #2182

Open vorburger opened 1 year ago

vorburger commented 1 year ago

Running ./gradlew check prints the close() resource leak warnings for SQLLite below.

./gradlew check does actually pass, the build is green - but this smells like it's a genuine resource leak? (Full disclosure: I'm a noob on Android development, if this "doesn't really matter", feel free to close... although in that case it would be better & less confusing if it didn't print these?)

Instead of fixing this "one off" (just this occurrence), it could be cool to see if it's possible to set-up (something like?) https://errorprone.info for this project, to automatically detect the problem below, and future re-occurrences of it?

(...)
> Task :workflow:lintReportDebug
Wrote HTML report to file:///home/vorburger/git/github.com/google/android-fhir/workflow/build/reports/lint-results-debug.html

> Task :workflow:testReleaseUnitTest
System.logW: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
        at dalvik.system.CloseGuard.$$robo$$dalvik_system_CloseGuard$open(CloseGuard.java:180)
        at jdk.internal.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.robolectric.shadows.ShadowCloseGuard$CloseGuardReflector$$Reflector33.open(Unknown Source)
        at org.robolectric.shadows.ShadowCloseGuard.open(ShadowCloseGuard.java:38)
        at dalvik.system.CloseGuard.open(CloseGuard.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openInner(SQLiteDatabase.java:809)
        at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$open(SQLiteDatabase.java:793)
        at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:696)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:671)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$create(SQLiteDatabase.java:830)
        at android.database.sqlite.SQLiteDatabase.create(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getDatabaseLocked(SQLiteOpenHelper.java:215)
        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getWritableDatabase(SQLiteOpenHelper.java:163)
        at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:151)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:112)
        at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:706)
        at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:483)
        at androidx.room.RoomDatabase.query(RoomDatabase.java:526)
        at androidx.room.util.DBUtil.query(DBUtil.java:86)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:544)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:541)
        at androidx.room.CoroutinesRoom$Companion$execute$4$job$1.invokeSuspend(CoroutinesRoom.kt:88)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

System.logW: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
        at dalvik.system.CloseGuard.$$robo$$dalvik_system_CloseGuard$open(CloseGuard.java:180)
        at jdk.internal.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.robolectric.shadows.ShadowCloseGuard$CloseGuardReflector$$Reflector33.open(Unknown Source)
        at org.robolectric.shadows.ShadowCloseGuard.open(ShadowCloseGuard.java:38)
        at dalvik.system.CloseGuard.open(CloseGuard.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openInner(SQLiteDatabase.java:809)
        at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$open(SQLiteDatabase.java:793)
        at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:696)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:671)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$create(SQLiteDatabase.java:830)
        at android.database.sqlite.SQLiteDatabase.create(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getDatabaseLocked(SQLiteOpenHelper.java:215)
        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getWritableDatabase(SQLiteOpenHelper.java:163)
        at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:151)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:112)
        at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:706)
        at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:483)
        at androidx.room.RoomDatabase.query(RoomDatabase.java:526)
        at androidx.room.util.DBUtil.query(DBUtil.java:86)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:544)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:541)
        at androidx.room.CoroutinesRoom$Companion$execute$4$job$1.invokeSuspend(CoroutinesRoom.kt:88)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

System.logW: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
        at dalvik.system.CloseGuard.$$robo$$dalvik_system_CloseGuard$open(CloseGuard.java:180)
        at jdk.internal.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.robolectric.shadows.ShadowCloseGuard$CloseGuardReflector$$Reflector33.open(Unknown Source)
        at org.robolectric.shadows.ShadowCloseGuard.open(ShadowCloseGuard.java:38)
        at dalvik.system.CloseGuard.open(CloseGuard.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openInner(SQLiteDatabase.java:809)
        at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$open(SQLiteDatabase.java:793)
        at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:696)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:671)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$create(SQLiteDatabase.java:830)
        at android.database.sqlite.SQLiteDatabase.create(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getDatabaseLocked(SQLiteOpenHelper.java:215)
        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getWritableDatabase(SQLiteOpenHelper.java:163)
        at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:151)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:112)
        at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:706)
        at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:483)
        at androidx.room.RoomDatabase.query(RoomDatabase.java:526)
        at androidx.room.util.DBUtil.query(DBUtil.java:86)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:544)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:541)
        at androidx.room.CoroutinesRoom$Companion$execute$4$job$1.invokeSuspend(CoroutinesRoom.kt:88)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

System.logW: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
        at dalvik.system.CloseGuard.$$robo$$dalvik_system_CloseGuard$open(CloseGuard.java:180)
        at jdk.internal.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.robolectric.shadows.ShadowCloseGuard$CloseGuardReflector$$Reflector33.open(Unknown Source)
        at org.robolectric.shadows.ShadowCloseGuard.open(ShadowCloseGuard.java:38)
        at dalvik.system.CloseGuard.open(CloseGuard.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openInner(SQLiteDatabase.java:809)
        at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$open(SQLiteDatabase.java:793)
        at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:696)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:671)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$create(SQLiteDatabase.java:830)
        at android.database.sqlite.SQLiteDatabase.create(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getDatabaseLocked(SQLiteOpenHelper.java:215)
        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getWritableDatabase(SQLiteOpenHelper.java:163)
        at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:151)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:112)
        at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:706)
        at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:483)
        at androidx.room.RoomDatabase.query(RoomDatabase.java:526)
        at androidx.room.util.DBUtil.query(DBUtil.java:86)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:544)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:541)
        at androidx.room.CoroutinesRoom$Companion$execute$4$job$1.invokeSuspend(CoroutinesRoom.kt:88)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

System.logW: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
        at dalvik.system.CloseGuard.$$robo$$dalvik_system_CloseGuard$open(CloseGuard.java:180)
        at jdk.internal.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.robolectric.shadows.ShadowCloseGuard$CloseGuardReflector$$Reflector33.open(Unknown Source)
        at org.robolectric.shadows.ShadowCloseGuard.open(ShadowCloseGuard.java:38)
        at dalvik.system.CloseGuard.open(CloseGuard.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openInner(SQLiteDatabase.java:809)
        at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$open(SQLiteDatabase.java:793)
        at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:696)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:671)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$create(SQLiteDatabase.java:830)
        at android.database.sqlite.SQLiteDatabase.create(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getDatabaseLocked(SQLiteOpenHelper.java:215)
        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getWritableDatabase(SQLiteOpenHelper.java:163)
        at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:151)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:112)
        at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:706)
        at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:483)
        at androidx.room.RoomDatabase.query(RoomDatabase.java:526)
        at androidx.room.util.DBUtil.query(DBUtil.java:86)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:544)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:541)
        at androidx.room.CoroutinesRoom$Companion$execute$4$job$1.invokeSuspend(CoroutinesRoom.kt:88)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

System.logW: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
        at dalvik.system.CloseGuard.$$robo$$dalvik_system_CloseGuard$open(CloseGuard.java:180)
        at jdk.internal.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.robolectric.shadows.ShadowCloseGuard$CloseGuardReflector$$Reflector33.open(Unknown Source)
        at org.robolectric.shadows.ShadowCloseGuard.open(ShadowCloseGuard.java:38)
        at dalvik.system.CloseGuard.open(CloseGuard.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openInner(SQLiteDatabase.java:809)
        at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$open(SQLiteDatabase.java:793)
        at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:696)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:671)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$create(SQLiteDatabase.java:830)
        at android.database.sqlite.SQLiteDatabase.create(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getDatabaseLocked(SQLiteOpenHelper.java:215)
        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getWritableDatabase(SQLiteOpenHelper.java:163)
        at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:151)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:112)
        at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:706)
        at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:483)
        at androidx.room.RoomDatabase.query(RoomDatabase.java:526)
        at androidx.room.util.DBUtil.query(DBUtil.java:86)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:544)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:541)
        at androidx.room.CoroutinesRoom$Companion$execute$4$job$1.invokeSuspend(CoroutinesRoom.kt:88)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

System.logW: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
        at dalvik.system.CloseGuard.$$robo$$dalvik_system_CloseGuard$open(CloseGuard.java:180)
        at jdk.internal.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.robolectric.shadows.ShadowCloseGuard$CloseGuardReflector$$Reflector33.open(Unknown Source)
        at org.robolectric.shadows.ShadowCloseGuard.open(ShadowCloseGuard.java:38)
        at dalvik.system.CloseGuard.open(CloseGuard.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openInner(SQLiteDatabase.java:809)
        at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$open(SQLiteDatabase.java:793)
        at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:696)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$openDatabase(SQLiteDatabase.java:671)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteDatabase.$$robo$$android_database_sqlite_SQLiteDatabase$create(SQLiteDatabase.java:830)
        at android.database.sqlite.SQLiteDatabase.create(SQLiteDatabase.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getDatabaseLocked(SQLiteOpenHelper.java:215)
        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java)
        at android.database.sqlite.SQLiteOpenHelper.$$robo$$android_database_sqlite_SQLiteOpenHelper$getWritableDatabase(SQLiteOpenHelper.java:163)
        at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:151)
        at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:112)
        at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:706)
        at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:483)
        at androidx.room.RoomDatabase.query(RoomDatabase.java:526)
        at androidx.room.util.DBUtil.query(DBUtil.java:86)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:544)
        at com.google.android.fhir.knowledge.db.impl.dao.KnowledgeDao_Impl$15.call(KnowledgeDao_Impl.java:541)
        at androidx.room.CoroutinesRoom$Companion$execute$4$job$1.invokeSuspend(CoroutinesRoom.kt:88)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

> Task :contrib:barcode:licenseeRelease
WARNING: Dependency ignore for junit:junit is unused
(...)

Would you like to work on the issue?

Sure, I could give this a try.

vorburger commented 1 year ago

see if it's possible to set-up (something like?) https://errorprone.info/ for this project

Based on https://github.com/google/error-prone/issues/623, maybe not really... but instead perhaps:

vorburger commented 1 year ago