# V3.5.6 @Android CursorWindow	java.lang.IllegalStateException

**URL:** <https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078>\
**Category:** Issues\
**Created:** [April 5, 2017, 3:36pm UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078 "2017-04-05T15:36:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Caner](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/caner/32/542_2.png) [@Caner](https://discuss.zetetic.net/u/Caner)\
**Post date:** [April 5, 2017, 3:36pm UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078/1 "2017-04-05T15:36:17Z")

</div>

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](https://github.com/sqlcipher/android-database-sqlcipher/commit/e33556d6f7665e50919788bfcf8d44b1453fa4cf)

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

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [April 5, 2017, 4:04pm UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078/2 "2017-04-05T16:04:38Z")

</div>

Hello @Caner

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

---

<div class="post-metadata">

**Author:** ![Caner](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/caner/32/542_2.png) [@Caner](https://discuss.zetetic.net/u/Caner)\
**Post date:** [April 5, 2017, 5:54pm UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078/3 "2017-04-05T17:54:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sandeep415](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@sandeep415](https://discuss.zetetic.net/u/sandeep415)\
**Post date:** [July 23, 2019, 9:17am UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078/4 "2019-07-23T09:17:22Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [July 23, 2019, 1:39pm UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078/5 "2019-07-23T13:39:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sandeep415](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@sandeep415](https://discuss.zetetic.net/u/sandeep415)\
**Post date:** [July 23, 2019, 1:57pm UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078/6 "2019-07-23T13:57:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [July 23, 2019, 2:16pm UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078/7 "2019-07-23T14:16:58Z")

</div>

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:

> [@Upgrading to SQLCipher 4](https://discuss.zetetic.net/t/upgrading-to-sqlcipher-4/3283):
>
> The recent release of [SQLCipher 4](https://www.zetetic.net/blog/2018/11/30/sqlcipher-400-release/) introduces many new performance and security enhancements for applications that use SQLCipher for secure local data storage. However, the introduction of new default algorithms, increased KDF iterations and a larger page size means that SQLCipher 4 will not open older databases by default. This document provides guidance on the upgrade options available to applications that have previously integrated SQLCipher versions 1 through 3. Option 1: Database File Migr…

---

<div class="post-metadata">

**Author:** ![sandeep415](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@sandeep415](https://discuss.zetetic.net/u/sandeep415)\
**Post date:** [July 25, 2019, 6:50am UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078/8 "2019-07-25T06:50:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [July 25, 2019, 1:42pm UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078/9 "2019-07-25T13:42:46Z")

</div>

Hi @sandeep415

Are you able to recreate the crashing behavior using the SQLCipher for Android [test suite](https://github.com/sqlcipher/sqlcipher-android-tests)? We’d be happy to look into it further.

---

<div class="post-metadata">

**Author:** ![sandeep415](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@sandeep415](https://discuss.zetetic.net/u/sandeep415)\
**Post date:** [August 1, 2019, 2:58pm UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078/10 "2019-08-01T14:58:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sandeep415](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@sandeep415](https://discuss.zetetic.net/u/sandeep415)\
**Post date:** [August 5, 2019, 10:12am UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078/11 "2019-08-05T10:12:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sjlombardo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/sjlombardo/32/3_2.png) [@sjlombardo](https://discuss.zetetic.net/u/sjlombardo)\
**Post date:** [August 5, 2019, 1:03pm UTC](https://discuss.zetetic.net/t/v3-5-6-android-cursorwindow-java-lang-illegalstateexception/2078/12 "2019-08-05T13:03:52Z")

</div>

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).
