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

Crash when loading a huge Post #517

Open
maxme opened this issue Jul 17, 2017 · 0 comments
Open

Crash when loading a huge Post #517

maxme opened this issue Jul 17, 2017 · 0 comments

Comments

@maxme
Copy link
Contributor

maxme commented Jul 17, 2017

This is probably a sqlite limit, but we should do something (truncate?), this happens when I refresh the Post list on a site with a big post (3.5Mb text post)

--------- beginning of crash
07-17 03:05:52.455 4226-4695/org.wordpress.android.beta E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
  Process: org.wordpress.android.beta, PID: 4226
  java.lang.RuntimeException: An error occured while executing doInBackground()
      at android.os.AsyncTask$3.done(AsyncTask.java:300)
      at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
      at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
      at java.util.concurrent.FutureTask.run(FutureTask.java:242)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
      at java.lang.Thread.run(Thread.java:818)
   Caused by: java.lang.IllegalStateException: Couldn't read row 0, col 0 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
      at android.database.CursorWindow.nativeGetLong(Native Method)
      at android.database.CursorWindow.getLong(CursorWindow.java:511)
      at android.database.AbstractWindowedCursor.getLong(AbstractWindowedCursor.java:75)
      at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:220)
      at android.database.AbstractCursor.moveToNext(AbstractCursor.java:245)
      at com.yarolegovich.wellsql.SelectQuery.getAsModel(SelectQuery.java:154)
      at com.yarolegovich.wellsql.SelectQuery.getAsModel(SelectQuery.java:147)
      at org.wordpress.android.fluxc.persistence.PostSqlUtils.getPostsForSite(PostSqlUtils.java:79)
      at org.wordpress.android.fluxc.store.PostStore.getPostsForSite(PostStore.java:260)
      at org.wordpress.android.ui.posts.adapters.PostsListAdapter$LoadPostsTask.doInBackground(PostsListAdapter.java:707)
      at org.wordpress.android.ui.posts.adapters.PostsListAdapter$LoadPostsTask.doInBackground(PostsListAdapter.java:681)
      at android.os.AsyncTask$2.call(AsyncTask.java:288)
      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
      at java.lang.Thread.run(Thread.java:818) 
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

1 participant