Hi,
We develop since severals monthes a professional application that
allows us to graphicaly design and generate an android application to
collect data.
This application allows to synchronize data between the android
application and a remote server. The data are stored localy on a
SQLite database. We used the SQLite android API to manipulate it.

We experience a problem which is not reproducible on demand, sometime
we got an SQLiteDatabaseCorruptException, and so android destroys this
database and creates a new one which of course is empty. This error
appears randomly in the code when we are dealing with the database. As
sample the last one was :

SQLiteStatement stat = db.compileStatement(....); <- No error
                long date = 0;
                try {
                        date = stat.simpleQueryForLong();
                } catch (Exception e) {
                        date = 0;
                }
stat.close();
Cursor c = db.query(......); <-  No error
if(c.getCount()>0){             <-  SQLiteDatabaseCorruptException
thrown on the getCount()
....
}

_____________________________________________________________________________________________________
02-25 03:45:25.091 D/OpenSSLSessionImpl(22200): Freeing OpenSSL
session
02-25 03:45:25.991 E/Database(22200): Removing corrupt database: /data/
data/fr.medes.medoo.android/databases/medoo
02-25 03:45:26.031 E/
fr.medes.medoo.android.synchronization.OptimizedSynchronizationService(22200):
error during synchronization
02-25 03:45:26.031 E/
fr.medes.medoo.android.synchronization.OptimizedSynchronizationService(22200):
android.database.sqlite.SQLiteDatabaseCorruptException: database disk
image is malformed
02-25 03:45:26.031 E/
fr.medes.medoo.android.synchronization.OptimizedSynchronizationService(22200):
        at android.database.sqlite.SQLiteQuery.native_fill_window(Native
Method)
02-25 03:45:26.031 E/
fr.medes.medoo.android.synchronization.OptimizedSynchronizationService(22200):
        at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:
75)
02-25 03:45:26.031 E/
fr.medes.medoo.android.synchronization.OptimizedSynchronizationService(22200):
        at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:
288)
02-25 03:45:26.031 E/
fr.medes.medoo.android.synchronization.OptimizedSynchronizationService(22200):
        at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:
269)
02-25 03:45:26.031 E/
fr.medes.medoo.android.synchronization.OptimizedSynchronizationService(22200):
        at
fr.medes.medoo.android.synchronization.OptimizedSynchronizationService.getDataToSynchronize(OptimizedSynchronizationService.java:
474)
02-25 03:45:26.031 E/
fr.medes.medoo.android.synchronization.OptimizedSynchronizationService(22200):
        at
fr.medes.medoo.android.synchronization.OptimizedSynchronizationService.run(OptimizedSynchronizationService.java:
244)
02-25 03:45:26.031 E/
fr.medes.medoo.android.synchronization.OptimizedSynchronizationService(22200):
        at java.lang.Thread.run(Thread.java:1060)
______________________________________________________________________________________________________

This code is part of the synchronization service and it has been
executed correctly hundreds time before in the same process without
problem.
This code is embedded in a service and there is only one thread
accessing the database at this time.

Did somebody experience this kind of error ? Any help would be
appreciate.

Thanks,

-- 
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

Reply via email to