Hi,
I've got a program that runs fine when run from the debugger in
Eclipse, but when you execute it outwith the debugger the program
throws a ConcurrentModificationException. It doesn't seem to be a
simple case of http://mindprod.com/jgloss/runerrormessages.html#CONCURRENTMOD
since, the iterator's underlying collection is not being altered at
all.
The bug (presumably in our program) has been uncovered by moving from
Java 1.4.2 to Java 6 (I know, that seems like asking for trouble but
I'm only following orders). Has anyone experienced similar problems
with an upgrade like this?
Cheers,
Andy
Daniel Dyer - 14 May 2007 10:51 GMT
> Hi,
>
[quoted text clipped - 5 lines]
> since, the iterator's underlying collection is not being altered at
> all.
Sounds like a threading problem. The fact that it works in the debugger
is probably because it slows things down sufficiently that two threads
don't try to access the collection at the same time. I'd review
everywhere the collection is accessed and ensure that it is properly
synchronised.
Dan.

Signature
Daniel Dyer
http://www.uncommons.org