j256 / ormlite-android

ORMLite Android functionality used in conjunction with ormlite-core
http://ormlite.com/
ISC License
1.59k stars 367 forks source link

Stacktrace error #95

Open h0jeZvgoxFepBQ2C opened 6 years ago

h0jeZvgoxFepBQ2C commented 6 years ago

Hi,

we are getting quite frequently following error, which is only displayed in verbose log level:

05-24 13:24:35.627 V/SQLiteCursor: Cursor open object=52072473
    java.lang.Throwable: stacktrace
        at android.database.sqlite.SQLiteCursor.<init>(SQLiteCursor.java:117)
        at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:50)
        at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1346)
        at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1285)
        at com.j256.ormlite.android.compat.JellyBeanApiCompatibility.rawQuery(JellyBeanApiCompatibility.java:21)
        at com.j256.ormlite.android.AndroidCompiledStatement.getCursor(AndroidCompiledStatement.java:193)
        at com.j256.ormlite.android.AndroidCompiledStatement.runQuery(AndroidCompiledStatement.java:72)
        at com.j256.ormlite.stmt.StatementExecutor.queryForFirst(StatementExecutor.java:106)
        at com.j256.ormlite.dao.BaseDaoImpl.queryForFirst(BaseDaoImpl.java:240)

Do you have any hints? There are no cursor leaks afaik, so I'm really not sure why I see this message so often. This also happens when I start my app completely clean and don't do much sql writing/reading work...?

I don't see any other exceptions happening...

I also posted the issue to ormlite-core, since I was not sure which component is responsible for this stacktrace: https://github.com/j256/ormlite-core/issues/142

h0jeZvgoxFepBQ2C commented 6 years ago

I still receive these errors.. :(

pranavpari commented 6 years ago

Any solution?

h0jeZvgoxFepBQ2C commented 6 years ago

No, I really think it's a device/vendor specific thing. Newer devices with a newer android version from the same manufacturer are not having this issue, so 🤷‍♂️

Since there is no easy solution and it's probably vendor specific (Famoco), I will close this issue.

pranavpari commented 6 years ago

I used 2 diff devices, Lenovo and Samsung with 4.2.2 and both having the same issue. So Please let us know if anything in your mind.

h0jeZvgoxFepBQ2C commented 6 years ago

Oh really? Then I think it's good to let it open.. Thanks for telling me this!

h0jeZvgoxFepBQ2C commented 5 years ago

I have another stacktrace now, not sure if it helps:

10-23 16:02:49.093 D/SQLiteDatabase: Open database
    java.lang.Throwable: stacktrace
        at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:815)
        at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:714)
        at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:576)
        at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:269)
        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223)
        at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
        at com.j256.ormlite.android.AndroidConnectionSource.getReadWriteConnection(AndroidConnectionSource.java:68)
        at com.j256.ormlite.android.AndroidConnectionSource.getReadOnlyConnection(AndroidConnectionSource.java:55)
        at com.j256.ormlite.dao.BaseDaoImpl.queryForFirst(BaseDaoImpl.java:238)
noordawod commented 5 years ago

Would it be possible to have a minimal viable app where you can replicate this behaviour? The stack trace gives away nothing that can help trace this bug.