System Server crash with SQLiteDiskIOException

53 views
Skip to first unread message

anonwu

unread,
Aug 14, 2011, 7:02:48 AM8/14/11
to android-platform
Hi all:

When my device in low storage condition, the system server will crash.
From the log, it was caused by SettingsProvider.

"
E/AndroidRuntime( 178): at
android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SourceFile:
228)

E/AndroidRuntime( 178): at
com.android.providers.settings.SettingsProvider.query(SettingsProvider.java:
435)
"

But the default Settings provider not handle "SQLiteDiskIOException",
system will crash in some extremely condition.
I don't know why the "getReadableDatabase" method not force developer
to handle such exception? ex: "SQLiteDatabase getReadableDatabase()
throws SQLiteException". Any bad code can be checked in build time.

Or this thought may cause another problem?

Cheers

Dianne Hackborn

unread,
Aug 14, 2011, 7:28:56 PM8/14/11
to android-...@googlegroups.com
When storage is extremely low, content providers will be opened read-only.  This is a bad state to be in, that is why the notification is put up to have the user free up storage.  However ever release of Android goes through tests to ensure that you can boot and run a device in such a state enough to be able to go to settings and free storage.  If this is not working for you, my first assumption is that there is something different in your build from the base platform causing a problem.


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.




--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

Reply all
Reply to author
Forward
0 new messages