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

have problem #48

Closed
hortonfreedom opened this issue Mar 18, 2013 · 1 comment
Closed

have problem #48

hortonfreedom opened this issue Mar 18, 2013 · 1 comment

Comments

@hortonfreedom
Copy link

public void onUpgrade(SQLiteDatabase db,
int oldVersion, int newVersion) {

db.endTransaction();
//updgading the db
//which cannot be done in a transaction
db.beginTransaction();
}

This was working on my test system but now I get permanent error traces from my life system. Seems on most systems it is working, but on not one some.

java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:278)
at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.IllegalStateException: no transaction pending
at net.sqlcipher.database.SQLiteDatabase.endTransaction(SourceFile:640)
at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SourceFile:128)
at com.myApp.j.q(SourceFile:339) ...

what is wrong here? thanks tata

edit: this is where the crash occurs. SQLiteOpenHelper.getWritableDatabase(SourceFile:128)

int version = db.getVersion();
if (version != mNewVersion) {
db.beginTransaction();
try {
if (version == 0) {
onCreate(db);
} else {
onUpgrade(db, version, mNewVersion);
}
db.setVersion(mNewVersion);
db.setTransactionSuccessful();
} finally {
db.endTransaction(); //L. 128 crash
}
}

@developernotes
Copy link
Member

Hi hortonfreedom,

What version of SQLCipher for Android are you using?

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

2 participants