Leakcanary: [2.0-alpha-1] SQLiteBlobTooBigException Row too big to fit into CursorWindow requiredPos=0, totalRows=1

Created on 23 Apr 2019  路  10Comments  路  Source: square/leakcanary

Using 2.0-alpha-1, when clicking on a leak notification :

android.database.sqlite.SQLiteBlobTooBigException: Row too big to fit into CursorWindow requiredPos=0, totalRows=1
at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(Native Method)
at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:895)
at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836)
at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:149)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:137)
at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:220)
at android.database.AbstractCursor.moveToNext(AbstractCursor.java:269)
at leakcanary.internal.activity.db.HeapAnalysisTable.retrieve(HeapAnalysisTable.kt:75)
at leakcanary.internal.activity.screen.HeapAnalysisSuccessScreen.createView(HeapAnalysisSuccessScreen.kt:33)
at leakcanary.internal.navigation.NavigatingActivity.installNavigation(NavigatingActivity.kt:53)
at leakcanary.internal.activity.LeakActivity.onCreate(LeakActivity.kt:27)
at android.app.Activity.performCreate(Activity.java:7144)

Do yo need more informations ?

ps: the app crashed and I was able to open leak canary from the app drawer with some leaks reported.

Most helpful comment

Congratulations on filing the first LeakCanary 2 bug 馃槈馃檹

This is a bit unexpected, I wonder what could possibly be too big. If would be super helpful if you could share the hprof file of the leak analysis so that I can reproduce. Depending on whether you have granted sdcard permission before the leak or not, it will in a leakcanary directory either be in your app directory or in /sdcard/Downloads

All 10 comments

Congratulations on filing the first LeakCanary 2 bug 馃槈馃檹

This is a bit unexpected, I wonder what could possibly be too big. If would be super helpful if you could share the hprof file of the leak analysis so that I can reproduce. Depending on whether you have granted sdcard permission before the leak or not, it will in a leakcanary directory either be in your app directory or in /sdcard/Downloads

Reproduced using #1305 to import the hprof, thanks!

In the provided hprof, the sized of the serialized HeapAnalysisSuccess is 3559076 bytes (3.4Mib). Clearing the LeakTraceElement.references field brings it down to 18396 bytes.

Based on https://github.com/aosp-mirror/platform_frameworks_base/blob/master/core/res/res/values/config.xml#L1937 it looks like the window page size is 2048Kib ie 2Mib. So if a row is larger than that, the window will be too small.

Worth noting the max size hasn't changed since 2010 (here https://github.com/aosp-mirror/platform_frameworks_base/commit/34ad57f0e844cd97f59d4ab22087d60d58650ba4). Since Android P, we can create windows with a custom max size. Doesn't seem reasonable to try to go above the 2Mib limit though, and I wanted to get rid of references anyway.

Thx !

I'm getting this same error, this works fine on oreo and below but when I run the app on pie it crashes
, what might be the issue please help.....

@jocelin09 are you using alpha 1 or alpha 2? This should have been fixed in alpha 2, let me know if not. Can you provide a hprof file that reproduces this?

I'm getting this same error, this works fine on oreo and below but when I run the app on pie it crashes
, what might be the issue please help.....

same here. works fine on oreo. But crashes on pie.

@jagapathi111 See my reply right above: https://github.com/square/leakcanary/issues/1293#issuecomment-496017795

are you using alpha 1 or alpha 2? This should have been fixed in alpha 2, let me know if not. Can you provide a hprof file that reproduces this?

Was this page helpful?
0 / 5 - 0 ratings