[
https://issues.apache.org/jira/browse/BATIK-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13704279#comment-13704279
]
angrysnail commented on BATIK-1049:
-----------------------------------
another case:
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819)
at java.util.ArrayList$Itr.next(ArrayList.java:791)
at
org.apache.batik.dom.AbstractDocument.getChildElementById(AbstractDocument.java:482)
at
org.apache.batik.dom.AbstractDocument.getElementById(AbstractDocument.java:451)
at org.apache.batik.bridge.URIResolver.getNode(URIResolver.java:116)
at
org.apache.batik.bridge.BridgeContext.getReferencedNode(BridgeContext.java:752)
at
org.apache.batik.bridge.BridgeContext.getReferencedElement(BridgeContext.java:796)
at
org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(SVGUseElementBridge.java:124)
at
org.apache.batik.bridge.SVGUseElementBridge.handleAnimatedAttributeChanged(SVGUseElementBridge.java:461)
at
org.apache.batik.bridge.BridgeContext$AnimatedAttrListener.animatedAttributeChanged(BridgeContext.java:1763)
at
org.apache.batik.dom.svg.SVGOMDocument$AnimAttrListener.animatedAttributeChanged(SVGOMDocument.java:706)
at
org.apache.batik.dom.svg.AbstractSVGAnimatedValue.fireAnimatedAttributeListeners(AbstractSVGAnimatedValue.java:132)
at
org.apache.batik.dom.svg.SVGOMAnimatedString.attrModified(SVGOMAnimatedString.java:115)
at
org.apache.batik.dom.svg.AbstractElement.attrModified(AbstractElement.java:238)
at
org.apache.batik.dom.AbstractElement.fireDOMAttrModifiedEvent(AbstractElement.java:627)
at
org.apache.batik.dom.svg.AbstractElement.fireDOMAttrModifiedEvent(AbstractElement.java:117)
at org.apache.batik.dom.AbstractAttr.setNodeValue(AbstractAttr.java:156)
at org.apache.batik.dom.AbstractAttr.setValue(AbstractAttr.java:199)
at
org.apache.batik.dom.AbstractElement.setAttributeNS(AbstractElement.java:265)
at
com.gd.appa.gui.monitor.svg.PrimarySVGService.updateSVGDocument(PrimarySVGService.java:111)
at
com.gd.appa.gui.monitor.svg.SVGUpdateListener$1.run(SVGUpdateListener.java:48)
at org.apache.batik.util.RunnableQueue.run(RunnableQueue.java:237)
at java.lang.Thread.run(Thread.java:722)
the same situation, when change the xlink:href, I got the exception, still it
is not routine
> when modifying the dom in updatemanger queue, I got
> java.util.ConcurrentModificationException
> ----------------------------------------------------------------------------------------------
>
> Key: BATIK-1049
> URL: https://issues.apache.org/jira/browse/BATIK-1049
> Project: Batik
> Issue Type: Bug
> Components: SVG DOM
> Affects Versions: 1.7
> Environment: jdk1.7.10 ubuntu 12.04 batik 1.7
> Reporter: angrysnail
>
> I got the exception when modifying the dom in updatemanger queue.
> But notice that : the exception is not always throwed, it really hard to
> catch that. we met twice, in about six monthes.
> code:
> WarnLevel wl = content.getLevel();
> Element textNode = doc.getElementById(elementId + "_bubble1_text");
> Element imgNode = doc.getElementById(elementId + "_bubble1_image");
> //this is the place where the error occur
> imgNode.setAttributeNS(SVGUtils.XLinkNameSpace, "xlink:href", "#" + wl.name()
> + "_gridnt_bubble");
> NodeList list = textNode.getChildNodes();
> int total = 0;
> for (String msg : msgs) {
> int temp = Integer.parseInt(msg);
> total += temp;
> }
> ((org.apache.batik.dom.GenericText)
> list.item(0)).setData(Integer.toString(total));
> exception:
> java.util.ConcurrentModificationException
> at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819)
> at java.util.ArrayList$Itr.next(ArrayList.java:791)
> at
> org.apache.batik.dom.AbstractDocument.getChildElementById(AbstractDocument.java:482)
>
> at
> org.apache.batik.dom.AbstractDocument.getElementById(AbstractDocument.java:451)
>
> at org.apache.batik.bridge.URIResolver.getNode(URIResolver.java:116)
> at
> org.apache.batik.bridge.BridgeContext.getReferencedNode(BridgeContext.java:752)
>
> at
> org.apache.batik.bridge.BridgeContext.getReferencedElement(BridgeContext.java:796)
>
> at
> org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(SVGUseElementBridge.java:124)
>
> at
> org.apache.batik.bridge.SVGUseElementBridge.handleAnimatedAttributeChanged(SVGUseElementBridge.java:461)
>
> at
> org.apache.batik.bridge.BridgeContext$AnimatedAttrListener.animatedAttributeChanged(BridgeContext.java:1763)
>
> at
> org.apache.batik.dom.svg.SVGOMDocument$AnimAttrListener.animatedAttributeChanged(SVGOMDocument.java:706)
>
> at
> org.apache.batik.dom.svg.AbstractSVGAnimatedValue.fireAnimatedAttributeListeners(AbstractSVGAnimatedValue.java:132)
>
> at
> org.apache.batik.dom.svg.SVGOMAnimatedString.attrAdded(SVGOMAnimatedString.java:105)
>
> at
> org.apache.batik.dom.svg.AbstractElement.attrAdded(AbstractElement.java:228)
> at
> org.apache.batik.dom.AbstractElement.fireDOMAttrModifiedEvent(AbstractElement.java:621)
>
> at
> org.apache.batik.dom.svg.AbstractElement.fireDOMAttrModifiedEvent(AbstractElement.java:117)
>
> at
> org.apache.batik.dom.AbstractElement$NamedNodeHashMap.setNamedItem(AbstractElement.java:903)
>
> at
> org.apache.batik.dom.AbstractElement$NamedNodeHashMap.setNamedItemNS(AbstractElement.java:844)
>
> at
> org.apache.batik.dom.AbstractElement.setAttributeNS(AbstractElement.java:263)
> at com.gd.gui.svgjung.svg.util.SVGUtils.processWarn(SVGUtils.java:352)
> at com.gd.gui.svgjung.WarnRepaintDaemon$1.run(WarnRepaintDaemon.java:106)
> at org.apache.batik.util.RunnableQueue.run(RunnableQueue.java:237)
> at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]