It's not a SQLite problem per se, it's a problem with the
android.database stuff, or the way you're using it.  (Has nothing to
do with database access.)

A HashMap referenced by
android.database.sqlite.SQLiteDatabase.getDbStats is getting modified
by another thread simultaneously.  HashTable is threadsafe, but not
HashMap.  Presumably there's a restriction on
android.database.sqlite.SQLiteDatabase.getDbStats and its kin with
regard to access from multiple threads.  (If not, there should be, or
a HashTable should be used instead of the HashMap.)

(Actually, looking at the SQLiteDatabase writeup I don't see any
restrictions on multithread access so long as you haven't done
setLockingEnabled(false), so this may well be an Android bug.)

On Oct 19, 6:51 pm, Bret Foreman <[email protected]> wrote:
> I'm doing some stress testing of my SQLite database using the testing
> monkey and I got the following exception, which appears to be from
> inside SQLite. My app has many threads accessing the database but all
> of them do so in locking mode so I don't think this exception is my
> fault. Any opinions on whether I should worry about this exception or
> if it's just an artifact of the extremely fast monkey keyboard access?
>
> 10-19 16:38:38.443: ERROR/JavaBinder(2035): *** Uncaught remote
> exception!  (Exceptions are not yet supported across processes.)
> 10-19 16:38:38.443: ERROR/JavaBinder(2035):
> java.util.ConcurrentModificationException
> 10-19 16:38:38.443: ERROR/JavaBinder(2035):     at java.util.HashMap
> $HashIterator.nextEntry(HashMap.java:795)
> 10-19 16:38:38.443: ERROR/JavaBinder(2035):     at java.util.HashMap
> $KeyIterator.next(HashMap.java:822)
> 10-19 16:38:38.443: ERROR/JavaBinder(2035):     at
> android.database.sqlite.SQLiteDatabase.getDbStats(SQLiteDatabase.java:
> 2133)
> 10-19 16:38:38.443: ERROR/JavaBinder(2035):     at
> android.database.sqlite.SQLiteDebug.getDatabaseInfo(SQLiteDebug.java:
> 150)
> 10-19 16:38:38.443: ERROR/JavaBinder(2035):     at
> android.app.ActivityThread$ApplicationThread.dump(ActivityThread.java:
> 1793)
> 10-19 16:38:38.443: ERROR/JavaBinder(2035):     at
> android.os.Binder.dump(Binder.java:222)
> 10-19 16:38:38.443: ERROR/JavaBinder(2035):     at
> android.os.Binder.onTransact(Binder.java:201)
> 10-19 16:38:38.443: ERROR/JavaBinder(2035):     at
> android.app.ApplicationThreadNative.onTransact(ApplicationThreadNative.java:
> 407)
> 10-19 16:38:38.443: ERROR/JavaBinder(2035):     at
> android.os.Binder.execTransact(Binder.java:288)
> 10-19 16:38:38.443: ERROR/JavaBinder(2035):     at
> dalvik.system.NativeStart.run(Native Method)

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