This exception generally occurs, if you are iterating through it and changing it simultaneously.
*Note that this implementation is not synchronized.* If multiple threads access this map concurrently, and at least one of the threads modifies the map structurally, it *must* be synchronized externally. (A structural modification is any operation that adds or deletes one or more mappings; merely changing the value associated with a key that an instance already contains is not a structural modification.) This is typically accomplished by synchronizing on some object that naturally encapsulates the map. If no such object exists, the map should be "wrapped" using the Collections.synchronizedMap method. This is best done at creation time, to prevent accidental unsynchronized access to the map: Map m = Collections.synchronizedMap(new HashMap(...)); http://download.oracle.com/javase/1.4.2/docs/api/java/util/HashMap.html Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Mon, Jan 17, 2011 at 2:09 PM, AC <alistair.cunning...@gmail.com> wrote: > Perhaps I'm sending the message from the service to the activity > incorrectly, and syncMarkers() ends up getting called from the > service's thread? If so, would anyone have any advice on the correct > way to send the message? > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en