You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2016/11/10 16:51:58 UTC

[jira] [Resolved] (PDFBOX-3562) PDFBox hangs indefinately when rendering certain files

     [ https://issues.apache.org/jira/browse/PDFBOX-3562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr resolved PDFBOX-3562.
-------------------------------------
    Resolution: Fixed

Thanks for submitting this file. The code didn't take care of padding for flag sizes < 8 bits and we've never had this before. Your file displays within seconds now. A build will be available here within a few hours.
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.4-SNAPSHOT/


> PDFBox hangs indefinately when rendering certain files
> ------------------------------------------------------
>
>                 Key: PDFBOX-3562
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3562
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.3
>         Environment: Ubuntu 14.04, Oracle Java SE 1.8
>            Reporter: Zaid Amir
>            Assignee: Tilman Hausherr
>              Labels: shading
>             Fix For: 2.0.4, 2.1.0
>
>         Attachments: PDFBOX-3562-BitsPerFlag2.pdf, PDFBOX-3562-BitsPerFlag2.pdf-1.png
>
>
> There seems to be an issue with PDFBox when rendering certain PDF files, when calling renderImageWithDPI; the call seems to hang indefinitely.
> My jar file is ruunning with the parameter: -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider
> I noticed this issue on this file:[ https://1drv.ms/b/s!Av-Yk52R4YupvcUEZFueSnXFh6_pXw]
> Here is the call to renderImageWithDPI:
> {quote}
> PDDocument doc = PDDocument.load(file);
> PDFRenderer renderer = new PDFRenderer(doc);
> BufferedImage img = renderer.renderImageWithDPI(0, 300.0f, ImageType.RGB);
> {quote}
> checking the stack trace using jstack gives me the following:
> {quote}
> "pool-3-thread-1" #14 prio=5 os_prio=0 tid=0x00007f0bd41d2000 nid=0x76d4 runnable [0x00007f0bb44db000]
>    java.lang.Thread.State: RUNNABLE
>         at org.apache.log4j.Category.getEffectiveLevel(Category.java:442)
>         at org.apache.log4j.Category.log(Category.java:855)
>         at org.slf4j.impl.Log4jLoggerAdapter.log(Log4jLoggerAdapter.java:595)
>         at org.apache.commons.logging.impl.SLF4JLocationAwareLog.warn(SLF4JLocationAwareLog.java:179)
>         at org.apache.pdfbox.pdmodel.graphics.shading.Type4ShadingContext.collectTriangles(Type4ShadingContext.java:152)
>         at org.apache.pdfbox.pdmodel.graphics.shading.Type4ShadingContext.<init>(Type4ShadingContext.java:64)
>         at org.apache.pdfbox.pdmodel.graphics.shading.Type4ShadingPaint.createContext(Type4ShadingPaint.java:66)
>         at sun.java2d.pipe.AlphaPaintPipe.startSequence(AlphaPaintPipe.java:84)
>         at sun.java2d.pipe.AAShapePipe.renderTiles(AAShapePipe.java:168)
>         at sun.java2d.pipe.AAShapePipe.renderPath(AAShapePipe.java:159)
>         at sun.java2d.pipe.AAShapePipe.fill(AAShapePipe.java:68)
>         at sun.java2d.pipe.PixelToParallelogramConverter.fill(PixelToParallelogramConverter.java:164)
>         at sun.java2d.pipe.ValidatePipe.fill(ValidatePipe.java:160)
>         at sun.java2d.SunGraphics2D.fill(SunGraphics2D.java:2527)
>         at org.apache.pdfbox.rendering.PageDrawer.shadingFill(PageDrawer.java:933)
>         at org.apache.pdfbox.contentstream.operator.graphics.ShadingFill.process(ShadingFill.java:41)
>         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.renderImageWithDPI(PDFRenderer.java:94)
>         at com.documentconverter.PDFManager_Box.GetThumbPDF(PDFManager_Box.java:58)
> {quote}
> I left my application running over the weekend to see if the call will eventually return, three days later and still the application is at the same spot.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org