Hi Quian,

"Qian Li" <[EMAIL PROTECTED]> wrote on 09/24/2007 06:21:47 AM:

> I'm trying to move two svg elements at the same time. The
> ConcurrentModification fails and throws me a lot of excpetions. i.e.

   All changes to the DOM _MUST_ be made in the UpdateManager's 
RunnableQueue. The only way the stack trace below can occur is if 
someone modifies the Document while the Canvas is attempting to 
repaint, since the repaint is clearly happening in the 
RunnableQueue's thread your modification must not be...

> Exception in thread "RunnableQueue-0" java.util.
> ConcurrentModificationException
>         at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>         at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>         at org.apache.batik.gvt.UpdateTracker.getDirtyAreas(Unknown 
Source)
>         at org.apache.batik.bridge.UpdateManager.repaint(Unknown Source)
>         at org.apache.batik.bridge.
> UpdateManager$UpdateManagerRunHander.runnableInvoked(Unknown
> Source)
>         at org.apache.batik.util.RunnableQueue.runnableInvoked(Unknown 
Source)
>         at org.apache.batik.util.RunnableQueue.run(Unknown Source)
>         at java.lang.Thread.run(Thread.java:619)
> 
> Is this a known bug? Is there a way to get around that? Thanks a lot.

   It is a bug in your code that modifies the document.  The way to fix it
is to ensure that all of your modifications occur in the UpdateManager's
RunnableQueue.

Reply via email to