Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalStateException #63

Closed
LinkOut opened this issue Jul 28, 2015 · 5 comments
Closed

java.lang.IllegalStateException #63

LinkOut opened this issue Jul 28, 2015 · 5 comments

Comments

@LinkOut
Copy link

LinkOut commented Jul 28, 2015

Caused by: java.lang.IllegalStateException: Couldn't read row 0, col 1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.

So, since i got an OOM problem with the low memory devices when try to retrieve objects i have saved to Hawk, i'm now using Sqlite option like this:

  1. in my class that extends Application : Hawk.init(this)
    .setStorage(HawkBuilder.newSqliteStorage(this))
    .setLogLevel(LogLevel.FULL)
    .build();
  2. Save the objects to Hawk : Hawk.put("a", listOfFoo);
  3. Hawk.get("a"); <- This cause that problem...

Why this? Thanks!

@orhanobut orhanobut added the bug label Jul 28, 2015
@LinkOut
Copy link
Author

LinkOut commented Jul 28, 2015

I think the problem in to save the String encoded to the SQLite, this String is 3131376 as count, maybe there is a limit of Sqlite? but i dont think so... Maybe i just need to find other way to save this heavy data ...

Or maybe i can try save them "in pieces" and not all together

Any suggestions?

@orhanobut
Copy link
Owner

Hmm, how do you save them?

@LinkOut
Copy link
Author

LinkOut commented Jul 28, 2015

Like this: Hawk.put("a", mObj);

Where mObj is a HashMap<String,Object>

The problem is at line 153 of SqliteStorage.class

What i saw debugging was that you save on the SQLITE the string base64 encoded that represents the object i want to save on Hawk.

@orhanobut
Copy link
Owner

need to check sqlite thoroughly, could be a limit issue indeed

@orhanobut
Copy link
Owner

Since Sqlite is not supported with the new version, I'm closing this one.

@orhanobut orhanobut removed the bug label Apr 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants