android.database.sqlite.SQLiteDiskIOException: disk I/O error

629 views
Skip to first unread message

Mariano Kamp

unread,
Jun 13, 2010, 3:56:23 AM6/13/10
to NewsRob User Group
This is a more technical message. I'd like to pick your brain on the impact of a fix for a current issue.

A significant number of users is now facing the error from above.

So far it seems that if you have a large number of articles, say 1,000, and try to open them in the article list, it may blow up with the disk I/O error. I cannot reproduce it on any of my phones with 1,000 articles, but as phones are different that is not all that surprising. When going to 5,000 I can reproduce it every time though. 
It seems that the Android List adapter reads the complete cursor (all 5,000 records) to determine the total count. 

So why, does this happen in this release? I added three new columns (two regarding 'like', one regarding fit-to-width) and I think that broke the camel's back.
In the releases before I also saw this issue, but that was about 10 times in six months, and I never got where this came from.


Ok, now why I write to you,

How to solve this? Quickly and without anything backfiring. 

I think I will now limit the article list to a fixed number, say 250. This should not have any impact on the actual usability for 99.9% of all users. Most people wouldn't scroll a 1,000 articles anyway. 
I will display in the status bar (250+) when I have 250 articles.
The sort button would work as expected, you would either see the 250 newest or oldest articles. 
If you use "hide read articles" and mark an article as read a new unread article will appear in the list and it would still say "250+".

Am I forgetting something? Is there some major drawback?

Cheers,
Mariano

Sample Bug Report:

-- Time: Sat Jun 12 22:41:28 America/Chicago 2010
-- Android Version: sdk=7, release=2.1-update1, inc=29593
-- Memory free: 0.57MB total: 4.01MB max: 24.00MB
-- Custom ROM: Stock Android
-- Device: sholes
-- Model: Droid
-- NewsRob Version: 4.0.3 Pro/403
-- Configured Capacity: 1000
-- Current Article Count: 1000
-- Days installed: 7
-- StorageAdapter: SdCardStorageAdapter
--   MB available: 6971
-- Phone Memory MB available: 29.0
-- Stacktrace:(2131)
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.newsrob/com.newsrob.activities.ArticleListActivity}: android.database.sqlite.SQLiteDiskIOException: disk I/O error
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
at android.app.ActivityThread.access$2200(ActivityThread.java:119)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4363)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.database.sqlite.SQLiteDiskIOException: disk I/O error
at android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:75)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:288)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)
at android.widget.CursorAdapter.getCount(CursorAdapter.java:132)
at android.widget.AdapterView$AdapterDataSetObserver.onChanged(AdapterView.java:778)
at android.database.DataSetObservable.notifyChanged(DataSetObservable.java:31)
at android.widget.BaseAdapter.notifyDataSetChanged(BaseAdapter.java:50)
at android.widget.CursorAdapter.changeCursor(CursorAdapter.java:260)
at com.newsrob.activities.ArticleListActivity.updateCursor(ArticleListActivity.java:112)
at com.newsrob.activities.ArticleListActivity.initialize(ArticleListActivity.java:98)
at com.newsrob.activities.ArticleListActivity.onCreate(ArticleListActivity.java:59)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
... 11 more

Mariano Kamp

unread,
Jun 13, 2010, 6:02:38 AM6/13/10
to NewsRob User Group
Ok, here is the fix as described above: http://newsrob.googlegroups.com/web/newsrob404.apk

I would appreciate some testing and quick feedback. I want to get it out as soon as possible, as the rollout is "just" ~30% complete at the moment and I want to avoid the remaining 70% to also potentially run into this issue.

Mariano Kamp

unread,
Jun 13, 2010, 9:57:38 AM6/13/10
to NewsRob User Group
Ok, got five people who verified the fix. 4.0.5 is in the Market now.

vivek...@xmxsolutions.com

unread,
Mar 19, 2018, 9:06:46 PM3/19/18
to NewsRob User Group
I am an android developer (around 2 years experience)
I'm very stuck on this issue.
Please describe me, how you solve it??
Reply all
Reply to author
Forward
0 new messages