1

I have a prefilled database. When app is started for the first time, it ships files from Assets to database. System perfectly works on some Android devices. However, in some devices, app ships the db files, and then when it tries to get a query, it fails and closes the app.

My app's platform version is 1.5 so the problem is not platform vers.

03-11 01:11:34.111 I/Database( 4516): sqlite returned: error code =
11, msg = database corruption at line 46886 of [42537b6056] 

03-11 01:11:34.111 I/Database( 4516): sqlite returned: error code =
11, msg = database disk image is malformed 

03-11 01:11:34.111 D/AndroidRuntime( 4516): Shutting down VM 

03-11 01:11:34.111 W/dalvikvm( 4516): threadid=1: thread exiting with
uncaught exception (group=0x40018560) 

03-11 01:11:34.111
E/AndroidRuntime( 4516): FATAL EXCEPTION: main 

03-11 01:11:34.111 E/AndroidRuntime( 4516):
android.database.sqlite.SQLiteDatabaseCorruptException: database disk
image is malformed: , while compiling: SELECT Names FROM MyTable WHERE
PageaNo = 1

There is no problem about SQL query code. Then what is the problem??

There are UTF-8 characters in my database. can it cause that error? what should I do? help!

1 Answer 1

1

I just solved a similar issue to yours. The problem was in the sqlite database, I think it was a bug in sqlite3 old versions, perhaps, prior to 3.6. Now, I recreated the database with sqlite3 v3.7.11 [http://www.sqlite.org/download.html] and it works like a charm - And, dont forget to create android_metadata table [http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/]

I hope this will also sort your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.