I'm using a keystore in my app and am getting the following error consistently after some minutes of operation.
"An error has occurred in sub:keyvaluestore_getsimple. android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=848 (#cursors opened by this proc=848)"
The GetSimple sub code is
So could this error be caused by repeated calls and return when c.Rowcount = 0 and the cursor isn't closed? In which case I should c.Close before the Return "".
"An error has occurred in sub:keyvaluestore_getsimple. android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=848 (#cursors opened by this proc=848)"
The GetSimple sub code is
B4X:
Public Sub GetSimple(Key As String) As String
Dim c As Cursor = getCursor(Key)
If c.RowCount = 0 Then Return ""
c.Position = 0
Dim res As String = c.GetString2(0)
c.Close
Return res
End Sub
So could this error be caused by repeated calls and return when c.Rowcount = 0 and the cursor isn't closed? In which case I should c.Close before the Return "".