ICEpdf
  1. ICEpdf
  2. PDF-585

OutOfMemoryError due to ImageUtility.makeImageWithRasterFromBytes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.1
    • Fix Version/s: 5.0.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      Pro, JAI
    • Salesforce Case Reference:
    • Workaround Description:
      The image is quite large 4959x3506. Recommend increasing the heap sized to -Xmx256m .

      Description

      The PDF renders correctly, when compared to Adobe, but the following exception is thrown:

      java.lang.OutOfMemoryError: Java heap space
      at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
      at java.awt.image.Raster.createPackedRaster(Raster.java:458)
      at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorMo
      del.java:1015)
      at java.awt.image.BufferedImage.<init>(BufferedImage.java:324)
      at org.icepdf.core.pobjects.ImageUtility.makeImageWithRasterFromBytes(ImageUtil
      ity.java:1461)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:403)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:295)
      at org.icepdf.core.pobjects.graphics.ImageStreamReference.run(ImageStreamRefere
      nce.java:66)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
      va:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
      18)
      at java.lang.Thread.run(Thread.java:680)

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved: