ICEpdf
  1. ICEpdf
  2. PDF-1031

OutOfMemoryError: Requested array size exceeds VM limit

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.1.2
    • Fix Version/s: 6.1.3
    • Component/s: Core/Rendering
    • Labels:
      None
    • Environment:
      All

      Description

      When rendering the provided PDF file, the following error is thrown which is preventing the content from displaying properly:

      WARNING: Error creating buffer, page: 0
      java.lang.OutOfMemoryError: Requested array size exceeds VM limit
      at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:75)
      at java.awt.image.Raster.createPackedRaster(Raster.java:467)
      at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032)
      at java.awt.GraphicsConfiguration.createCompatibleImage(GraphicsConfiguration.java:186)
      at org.icepdf.core.pobjects.ImageUtility.createTranslucentCompatibleImage(ImageUtility.java:142)
      at org.icepdf.core.pobjects.graphics.TilingPattern.paintPattern(TilingPattern.java:389)
      at org.icepdf.core.pobjects.graphics.commands.TilingPatternDrawCmd.paintOperand(TilingPatternDrawCmd.java:45)
      at org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:148)
      at org.icepdf.core.pobjects.Page.paintPageContent(Page.java:596)
      at org.icepdf.core.pobjects.Page.paint(Page.java:544)
      at org.icepdf.ri.common.views.PageViewComponentImpl.createBufferedPageImage(PageViewComponentImpl.java:973)
      at org.icepdf.ri.common.views.PageViewComponentImpl.access$400(PageViewComponentImpl.java:80)
      at org.icepdf.ri.common.views.PageViewComponentImpl$PagePainter.run(PageViewComponentImpl.java:1097)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

        Activity

        Hide
        Patrick Corless added a comment -

        Kind of a cool looking PDF. The memory peek is coming from a very large image tile that is 1016000x1016000 after being converted to page space. this large a tile hasn't shown up before in our test set. It's pretty easy to detect such a large image and shrink it accordingly. Once this code is added the PDF renders correctly.

        Show
        Patrick Corless added a comment - Kind of a cool looking PDF. The memory peek is coming from a very large image tile that is 1016000x1016000 after being converted to page space. this large a tile hasn't shown up before in our test set. It's pretty easy to detect such a large image and shrink it accordingly. Once this code is added the PDF renders correctly.
        Hide
        Patrick Corless added a comment -

        Interestingly enough this PDF can't be opened with Acrobat.

        Show
        Patrick Corless added a comment - Interestingly enough this PDF can't be opened with Acrobat.
        Hide
        Patrick Corless added a comment -

        Marking as fix but this change will require a full QA round.

        Show
        Patrick Corless added a comment - Marking as fix but this change will require a full QA round.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: