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

Database lock in getOldestUnsentPayload #61

Closed
bishopmatthew opened this issue Oct 31, 2013 · 1 comment
Closed

Database lock in getOldestUnsentPayload #61

bishopmatthew opened this issue Oct 31, 2013 · 1 comment

Comments

@bishopmatthew
Copy link
Contributor

I'm seeing this crash in the logs for my app (so far there are about 60 crashes per week from this).

Is there a reason you don't catch the exception here?

https://github.com/apptentive/apptentive-android/blob/master/apptentive-android-sdk/src/com/apptentive/android/sdk/storage/ApptentiveDatabase.java#L206

Because I feel that a library like this shouldn't really be letting internal exceptions be thrown that crash the app.

Crashed Thread
android.database.sqlite.SQLiteException: not an error (code 0): Could not open the database in read/write mode.
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:318)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:229)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:515)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:207)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:178)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:875)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:843)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:696)
at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:1145)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:236)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:224)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
at com.apptentive.android.sdk.storage.ApptentiveDatabase.getOldestUnsentPayload(ApptentiveDatabase.java:207)
at com.apptentive.android.sdk.storage.PayloadSendWorker$PayloadRunner.run(PayloadSendWorker.java:57)
@skykelsey
Copy link
Contributor

Hey Matt,

I've pushed out release 1.2.3.

Among other things, this release traps exceptions emanating from our code, and reports them back to our server so we can proactively fix their causes. I'm not whether a solution to the root cause of this issue is possible, but at least it won't crash your app anymore. Thanks!

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