AnsweredAssumed Answered

Android: Getting 'IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: path/securidDB'

Question asked by Sergio Dias Employee on Jan 3, 2019
Latest reply on Jan 7, 2019 by Amith Ramachandran

Customer has updated the RSA SecurID SDK to 2.6.0 for Android. After that, his application started crashing randomly when the 'getOtp' method is called from his code. These crashes happen sporadically from different devices such as Samsung and Huawei devices running on Android 7.x and 8.x versions. He does not have a way to reproduce these two crashes.

He was not having these two crashes running an older RSA SDK version ( He believes version 1.x ).

 

Caused by java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase:
/data/user/0/com.company/databases/securidDB
at
android.database.sqlite.SQLiteClosable.acquireReference(SQLiteClosable.java:55)
at
android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1234)
at
android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1110)
at
android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1278)
at com.rsa.securidlib.android.x.jj.n.h(Unknown Source)
at com.rsa.securidlib.android.x.jj.e.g(Unknown Source)
at com.rsa.securidlib.android.g.e.m(Unknown Source)
at com.rsa.securidlib.android.g.e.zz(Unknown Source)
at com.rsa.securidlib.android.g.e.m(Unknown Source)
at com.rsa.securidlib.android.AndroidSecurIDLib.m(Unknown Source)
at com.rsa.securidlib.android.AndroidSecurIDLib.getOtp(Unknown
Source)
at
com.company.authentication.f.h(RsaTokenHelper.java:72)
at
com.company.authentication.f.e(RsaTokenHelper.java:91)
at
com.company.login.a.v(BaseLoginFragment.java:549)
at com.company.login.u.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:761)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Method.java)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

 


Caused by java.lang.IllegalStateException: Cannot perform this operation because the connection pool has been closed.
at
android.database.sqlite.SQLiteConnectionPool.throwIfClosedLocked(SQLiteConnectionPool.java:1290)
at
android.database.sqlite.SQLiteConnectionPool.waitForConnection(SQLiteConnectionPool.java:882)
at
android.database.sqlite.SQLiteConnectionPool.acquireConnection(SQLiteConnectionPool.java:575)
at
android.database.sqlite.SQLiteSession.acquireConnection(SQLiteSession.java:904)
at
android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:834)
at
android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
at
android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:152)
at
android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:141)
at com.rsa.securidlib.android.g.t.r(Unknown Source:106)
at com.rsa.securidlib.n.g(Unknown Source:8)
at com.rsa.securidlib.n.m(Unknown Source:14)
at com.rsa.securidlib.android.AndroidSecurIDLib.m(Unknown Source:101)
at com.rsa.securidlib.android.AndroidSecurIDLib.getOtp(Unknown
Source:1)
at
com.company.authentication.f.h(RsaTokenHelper.java:72)
at
com.company.authentication.f.e(RsaTokenHelper.java:91)
at
com.company.login.a.v(BaseLoginFragment.java:549)
at com.company.login.u.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7002)
at java.lang.reflect.Method.invoke(Method.java)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

Outcomes