xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "simon steiner (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (XGC-120) java.util.ConcurrentModificationException in ImageImplregistry iterator
Date Tue, 28 May 2019 07:51:00 GMT

    [ https://issues.apache.org/jira/browse/XGC-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16849441#comment-16849441
] 

simon steiner commented on XGC-120:
-----------------------------------

You need to have 1 fopfactory per thread by design

> java.util.ConcurrentModificationException in ImageImplregistry iterator
> -----------------------------------------------------------------------
>
>                 Key: XGC-120
>                 URL: https://issues.apache.org/jira/browse/XGC-120
>             Project: XMLGraphicsCommons
>          Issue Type: Bug
>    Affects Versions: 2.3
>         Environment: Ubuntu
>            Reporter: Allan Andersen
>            Priority: Major
>
> I get this ConcurrentModificationException when running a multithreaded testcase. 
> The problem is related to the preloaders (ArrayList) in ImageImplRegistry which isn't
threadsafe. Using CopyOnWriteArrayList is a quick solution to the issue.
> The other lists/maps are using the same non-threadsafe implementations. CopyOnWriteArrayList
and ConcurrentHashMap works better.
> {code:java}
> Stacktrace:
> Caused by: java.util.ConcurrentModificationException
> at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909)
> at java.util.ArrayList$Itr.next(ArrayList.java:859)
> at org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry$MyIterator.next(ImageImplRegistry.java:267)
> at org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:175)
> at org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:127)
> at org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:123)
> at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:81)
> at org.apache.fop.fo.FObj.processNode(FObj.java:126)
> at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:291)
> at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
> at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
> at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
> at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Mime
View raw message