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

John Hewson edited comment on PDFBOX-3375 at 8/23/16 7:42 PM:
--------------------------------------------------------------

Commons Imaging can parse the tags (the easy bit) but that's it. They don't 
parse any of the color data (the hard bit) or implement any of the color 
transforms (the really hard bit). We've looked into using commons-imaging in 
the past but none of there code is complete enough for PDFBox and the project 
has only a handful of minimally active maintainers.


was (Author: jahewson):
Commons Imaging can parse the tags (they easy bit) but that's it. They don't 
parse any of the color data (the hard bit) or implement any of the color 
transforms (the really hard bit). We've looked into using commons-imaging in 
the past but none of there code is complete enough for PDFBox and the project 
has only a handful of minimally active maintainers.

> Use a static lock for a singleton
> ---------------------------------
>
>                 Key: PDFBOX-3375
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3375
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.2, 2.1.0
>            Reporter: Andreas Lehmkühler
>            Assignee: Andreas Lehmkühler
>             Fix For: 2.1.0
>
>         Attachments: pdfbox3375.patch
>
>
> Our build is failing from time to time throwing the following exception
> {code}
> java.awt.color.CMMException: Invalid profile data
>       at sun.java2d.cmm.kcms.CMM.checkStatus(CMM.java:180)
>       at sun.java2d.cmm.kcms.CMM.createTransform(CMM.java:134)
>       at java.awt.color.ICC_ColorSpace.toRGB(ICC_ColorSpace.java:166)
>       at 
> org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB.init(PDDeviceRGB.java:69)
>       at 
> org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB.toRGB(PDDeviceRGB.java:103)
>       at org.apache.pdfbox.rendering.PageDrawer.getPaint(PageDrawer.java:237)
>       at 
> org.apache.pdfbox.rendering.PageDrawer.getNonStrokingPaint(PageDrawer.java:529)
>       at org.apache.pdfbox.rendering.PageDrawer.fillPath(PageDrawer.java:600)
>       at 
> org.apache.pdfbox.contentstream.operator.graphics.FillNonZeroRule.process(FillNonZeroRule.java:36)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:446)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:178)
>       at 
> org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:70)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:446)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149)
>       at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:189)
>       at 
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:145)
>       at 
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:68)
>       at 
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:55)
>       at 
> org.apache.pdfbox.rendering.TestRendering.render(TestRendering.java:79)
> {code}
> In PDDeviceRGB the non-static init method is synchronized using the instance 
> of the class as lock object. So far so good. But as the class is used a 
> singleton a static object has to be used as lock object.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to