Skip to content

close() was never explicitly called on database '/data/data/package/databases/db' #111

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

Closed
itsmechlark opened this issue Nov 22, 2013 · 0 comments

Comments

@itsmechlark
Copy link

I receive this following error for calling getWritableDatabase("password"). I their any solution cause I'm combining greenDAO and this project for multi-threading access of databse. By declaring:
Application


public static DaoDatabaseHandler mDaoDB;
public static SQLiteDatabase mWritableDatabase;

In my helper code:


public static synchronized DaoDatabaseHandler getInstance(Context context) {
        if (helper == null) {
            helper = new DaoDatabaseHandler(context, DATABASE_NAME, null);
        }
        return helper;
    }

Log


11-22 09:55:21.650: E/Database(1609): close() was never explicitly called on database '/data/data/package/databases/db' 
11-22 09:55:21.650: E/Database(1609): net.sqlcipher.database.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
11-22 09:55:21.650: E/Database(1609):   at net.sqlcipher.database.SQLiteDatabase.(SQLiteDatabase.java:1919)
11-22 09:55:21.650: E/Database(1609):   at net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:871)
11-22 09:55:21.650: E/Database(1609):   at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:899)
11-22 09:55:21.650: E/Database(1609):   at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:127)
11-22 09:55:21.650: E/Database(1609):   at com.cdasia.cdasiaonline.CDAsiaOnline.onCreate(CDAsiaOnline.java:52)
11-22 09:55:21.650: E/Database(1609):   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014)
11-22 09:55:21.650: E/Database(1609):   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4225)
11-22 09:55:21.650: E/Database(1609):   at android.app.ActivityThread.access$1300(ActivityThread.java:140)
11-22 09:55:21.650: E/Database(1609):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1288)
11-22 09:55:21.650: E/Database(1609):   at android.os.Handler.dispatchMessage(Handler.java:99)
11-22 09:55:21.650: E/Database(1609):   at android.os.Looper.loop(Looper.java:137)
11-22 09:55:21.650: E/Database(1609):   at android.app.ActivityThread.main(ActivityThread.java:4895)
11-22 09:55:21.650: E/Database(1609):   at java.lang.reflect.Method.invokeNative(Native Method)
11-22 09:55:21.650: E/Database(1609):   at java.lang.reflect.Method.invoke(Method.java:511)
11-22 09:55:21.650: E/Database(1609):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
11-22 09:55:21.650: E/Database(1609):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
11-22 09:55:21.650: E/Database(1609):   at dalvik.system.NativeStart.main(Native Method)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant