V3.5.6 @Android CursorWindow java.lang.IllegalStateException

Hi,
The v3.5.6 is crashing when memory usage goes up:

CursorWindow java.lang.IllegalStateException: get field slot from row 0 col 0 failed
StackTrace net.sqlcipher.CursorWindow.getString_native(Native Method)
StackTrace net.sqlcipher.CursorWindow.getString(CursorWindow.java:385)
StackTrace net.sqlcipher.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51)

I guess this commit fixes it: https://github.com/sqlcipher/android-database-sqlcipher/commit/e33556d6f7665e50919788bfcf8d44b1453fa4cf

We need this fix asap, when are you going to make a new release?

Hello @Caner

We are doing some additional beta testing before the release. Please reach out to us at support@zetetic.net if you are interested in a beta build. Thanks!

Thanks a lot for the quick response! I sent an email.

Hello I’m facing the similar issue as mentioned by Caner.

The app gets crashed as soon as app opens and this following logs are reported in crash reports. The version of the sqlcipher is “net.zetetic:android-database-sqlcipher:3.5.7@aar”. Thanks in Advance!

The logs are as follows:
Fatal Exception: java.lang.IllegalStateException: get field slot from row 0 col -1 failed
at net.sqlcipher.CursorWindow.getString_native(CursorWindow.java)
at net.sqlcipher.CursorWindow.getString(CursorWindow.java)
at net.sqlcipher.AbstractWindowedCursor.getString(AbstractWindowedCursor.java)
at android.database.CursorWrapper.getString + 137(CursorWrapper.java:137)

Hello @sandeep415

SQLCipher for Android 3.5.7 is rather old. Would you try updating to the latest to see if the issue is resolved? The latest is currently 4.2.0.

Hello @developernotes,

Thanks for your quick response.

I will try by updating the version to the newest one.

But can you provide me some info on why this issue occurs? As I was not able to reproduce the crash at my end with the older version, but was getting to the other users. I want to be sure if I need to make any more changes to avoid the crash issue.

Regards,

Sandeep Shinde.

Hello @sandeep415

It is difficult to say the root cause given the information presented. It was likely expecting data to be present, previously mapped via the cursor into a block of memory which was not found. We look forward to hearing your results to the latest version of SQLCipher for Android. You may wish to review the guidance for upgrading to SQLCipher 4 here:

Hello @developernotes the issue of crashing persists with updation of SQL Cipher version to latest one

Hi @sandeep415

Are you able to recreate the crashing behavior using the SQLCipher for Android test suite? We’d be happy to look into it further.

Hello @developernotes, I ran the test suite in my device, was not able to reproduce the crash issue, but I can’t share this to the end-user as we have some security constraints.

Regards,
Sandeep Shinde.

In addition to previous information, the crash has occurred on the open of the freshly installed app.

Hello @sandeep415 - Are you able to create a minimal sample application or a test case in the test suite that reproduces the crash? It’s very difficult to speculate on what might be happening without concrete steps to reproduce. It seems like this might be related specifically to your application, especially if the error does not occur within the Test Suite application (which includes broad coverage for most SQLCipher features and functions).