After looking more closely, I'm starting to think it's not a good idea
to handle this exception. Right after this error occurs, PID 493 goes
into a fatal memory allocation loop. The threading in my application
is fairly complex so I don't think I can package up an example for a
bug report. The fact that SQLite is using a HashMap in code that is
supposed to be thread-safe seems like enough of a bug right there.

On Nov 9, 8:20 am, Bret Foreman <[email protected]> wrote:
> This problem has raised its head again, even with the testing monkey
> throttled back. It just becomes more infrequent at lower transaction
> rates, which is what one would expect from a concurrency issue. I can
> catch the exception, of course, but the real questions are 1) What DB
> operation is causing it to happen and 2) What to do when the exception
> occurs. It's hard to tell from the stack trace whether the DB was
> reading, in which case I can swallow the exception and return some
> default value, or writing, in which case I need to retry. Here's the
> exception. Anyone have any ideas?
>
> 11-08 23:41:20.821: ERROR/JavaBinder(493):
> java.util.ConcurrentModificationException
> 11-08 23:41:20.821: ERROR/JavaBinder(493):     at java.util.HashMap
> $HashIterator.nextEntry(HashMap.java:795)
> 11-08 23:41:20.821: ERROR/JavaBinder(493):     at java.util.HashMap
> $KeyIterator.next(HashMap.java:822)
> 11-08 23:41:20.821: ERROR/JavaBinder(493):     at
> android.database.sqlite.SQLiteDatabase.getDbStats(SQLiteDatabase.java:
> 2133)
> 11-08 23:41:20.821: ERROR/JavaBinder(493):     at
> android.database.sqlite.SQLiteDebug.getDatabaseInfo(SQLiteDebug.java:
> 150)
> 11-08 23:41:20.821: ERROR/JavaBinder(493):     at
> android.app.ActivityThread$ApplicationThread.dump(ActivityThread.java:
> 1793)
> 11-08 23:41:20.821: ERROR/JavaBinder(493):     at
> android.os.Binder.dump(Binder.java:222)
> 11-08 23:41:20.821: ERROR/JavaBinder(493):     at
> android.os.Binder.onTransact(Binder.java:201)
> 11-08 23:41:20.821: ERROR/JavaBinder(493):     at
> android.app.ApplicationThreadNative.onTransact(ApplicationThreadNative.java:
> 407)
> 11-08 23:41:20.821: ERROR/JavaBinder(493):     at
> android.os.Binder.execTransact(Binder.java:288)
> 11-08 23:41:20.821: ERROR/JavaBinder(493):     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