You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And my app started crashing immediately with following log:
A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:180)
at android.database.CursorWindow.(CursorWindow.java:111)
at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:138)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:132)
at com.birbit.android.jobqueue.persistentQueue.sqlite.SqliteJobQueue.loadTags(SqliteJobQueue.java:439)
at com.birbit.android.jobqueue.persistentQueue.sqlite.SqliteJobQueue.createJobHolderFromCursor(SqliteJobQueue.java:416)
at com.birbit.android.jobqueue.persistentQueue.sqlite.SqliteJobQueue.nextJobAndIncRunCount(SqliteJobQueue.java:294)
at com.birbit.android.jobqueue.cachedQueue.CachedJobQueue.nextJobAndIncRunCount(CachedJobQueue.java:79)
at com.birbit.android.jobqueue.JobManagerThread.getNextJob(JobManagerThread.java:652)
at com.birbit.android.jobqueue.JobManagerThread.getNextJob(JobManagerThread.java:629)
at com.birbit.android.jobqueue.ConsumerManager.handleIdle(ConsumerManager.java:190)
at com.birbit.android.jobqueue.JobManagerThread$1.handleMessage(JobManagerThread.java:228)
at com.birbit.android.jobqueue.messaging.PriorityMessageQueue.consume(PriorityMessageQueue.java:39)
at com.birbit.android.jobqueue.JobManagerThread.run(JobManagerThread.java:220)
at java.lang.Thread.run(Thread.java:761)
The crash is happening here SqliteJobQueue.loadTags(SqliteJobQueue.java:439) which makes sense because even if cursor.getCount() == 0 is true, cursor is still there and it must be explicitly closed.
IMHO you should add StrictMode snippet to your code too to detect such leaks.
BTW thanks for this awesome library.
The text was updated successfully, but these errors were encountered:
I started getting out of memory exceptions in my app:
Following this advice I added following snippet in my Application class:
And my app started crashing immediately with following log:
The crash is happening here
SqliteJobQueue.loadTags(SqliteJobQueue.java:439)
which makes sense because even ifcursor.getCount() == 0
is true,cursor
is still there and it must be explicitly closed.IMHO you should add
StrictMode
snippet to your code too to detect such leaks.BTW thanks for this awesome library.
The text was updated successfully, but these errors were encountered: