Hi,
I am having issues with database corruption on the nexus one (running
2.1 update 1). I have multiple internal dbs and occasionally get
database corruption when running on the nexus one. I had been assuming
it was something I was doing wrong, however I've just had a crash just
using the webview that appears to show the same issue while it is
trying to access its own database. I've never written any custom code
to access this db.
Has anyone else come across this, could there be a SQLite bug on the
platform?
The only code I have accessing the webview is (I've edited the string
slightly for clarity):
String myHtml = "<html><body>My HTML</body></html>";
Webview webView = (WebView)findViewById(R.id.my_webview);
Webview webView.loadData(myHtml, "text/html", "UTF-8");
And the exception that this produced was:
03-15 09:24:47.676 W/ExpatReader( 496): DTD handlers aren't supported.
03-15 09:24:47.876 E/Database( 496): Removing corrupt database: /data/
data/com.anon.mobile.android/databases/webviewCache.db
03-15 09:24:47.886 W/dalvikvm( 496): threadid=29: thread exiting with
uncaught exception (group=0x4001b180)
03-15 09:24:47.886 E/AndroidRuntime( 496): Uncaught handler: thread
WebViewCoreThread exiting due to uncaught exception
03-15 09:24:47.896 E/AndroidRuntime( 496):
android.database.sqlite.SQLiteDatabaseCorruptException: database disk
image is malformed
03-15 09:24:47.896 E/AndroidRuntime( 496): at
android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
03-15 09:24:47.896 E/AndroidRuntime( 496): at
android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:75)
03-15 09:24:47.896 E/AndroidRuntime( 496): at
android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:288)
03-15 09:24:47.896 E/AndroidRuntime( 496): at
android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)
03-15 09:24:47.896 E/AndroidRuntime( 496): at
android.database.AbstractCursor.moveToPosition(AbstractCursor.java:
171)
03-15 09:24:47.896 E/AndroidRuntime( 496): at
android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)
03-15 09:24:47.896 E/AndroidRuntime( 496): at
android.webkit.WebViewDatabase.getCacheTotalSize(WebViewDatabase.java:
662)
03-15 09:24:47.896 E/AndroidRuntime( 496): at
android.webkit.CacheManager.trimCacheIfNeeded(CacheManager.java:500)
03-15 09:24:47.896 E/AndroidRuntime( 496): at
android.webkit.BrowserFrame.handleMessage(BrowserFrame.java:366)
03-15 09:24:47.896 E/AndroidRuntime( 496): at
android.os.Handler.dispatchMessage(Handler.java:99)
03-15 09:24:47.896 E/AndroidRuntime( 496): at
android.os.Looper.loop(Looper.java:123)
03-15 09:24:47.896 E/AndroidRuntime( 496): at
android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:611)
03-15 09:24:47.896 E/AndroidRuntime( 496): at
java.lang.Thread.run(Thread.java:1096)
03-15 09:24:47.916 I/Process ( 78): Sending signal. PID: 496 SIG: 3
03-15 09:24:47.916 I/dalvikvm( 496): threadid=7: reacting to signal 3
03-15 09:24:48.006 I/dalvikvm( 496): Wrote stack trace to '/data/anr/
traces.txt'
Note this doesn't happen every time, and I can't reproduce it
faithfully. However some combination of actions can cause database
corruption to occur. I'll let you know if I can find any more useful
information, or a way to reproduce it but if anyone knows a possible
cause for this, or has seen it themselves, I'd appreciate any
guidance. Thanks!
Cliff
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en