android CursorWindowAllocationException没有明显的泄漏?

时间:2013-02-04 11:15:44

标签: android sqlite ormlite

我有时会看到一个带有android.database.CursorWindowAllocationException的崩溃报告,它会提示泄漏,就像在其他SO问题Out of Memory when allocating cursors中一样,但是我的异常有'#Open Cursors = 1(#cursors打开了这个proc = 1)'看起来好像我没有留下很多游标。

我正在使用ORMLite,我想知道我能做些什么来追踪到底出了什么问题?

异常的堆栈跟踪如下所示:

android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=1 (# cursors opened by this proc=1)
at android.database.CursorWindow.<init>(CursorWindow.java:104)
at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:162)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:156)
at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:161)
at android.database.AbstractCursor.moveToFirst(AbstractCursor.java:201)
at com.j256.ormlite.android.AndroidDatabaseResults.first(AndroidDatabaseResults.java:73)
at com.j256.ormlite.android.AndroidDatabaseConnection.queryForOne(AndroidDatabaseConnection.java:176)
at com.j256.ormlite.stmt.mapped.MappedQueryForId.execute(MappedQueryForId.java:38)
at com.j256.ormlite.field.FieldType.assignField(FieldType.java:533)
at com.j256.ormlite.stmt.mapped.BaseMappedQuery.mapRow(BaseMappedQuery.java:71)
at com.j256.ormlite.stmt.StatementExecutor.queryForFirst(StatementExecutor.java:97)
at com.j256.ormlite.dao.BaseDaoImpl.queryForFirst(BaseDaoImpl.java:231)
at com.our.company.service.DownloadService.getLatestVoucherUpdate(DownloadService.java:354)
at com.our.company.service.DownloadService.downloadVouchers(DownloadService.java:831)
at com.our.company.service.DownloadService.onHandleIntent(DownloadService.java:1483)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)

0 个答案:

没有答案